MPPlantOfficial's Forum Posts

  • Here you go: drive.google.com/file/d/1gWmuDCdXqwTvVzKiLHpyYyuX8KCDHAGP/view

    I used the existing Bomberman example as template. I gave the pushable box the tile movement behavior as well. There are probably better ways of doing it like checking for overlapping at offset but I personally like to use a separate collision box always in front of player because it can double as a separate collision box for melee attacks or spawner for bullets, things like that...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • You do not have permission to view this post

  • got a problem, i can go into 3d mode, run around. i can spawn a 3d object in front of player (meele attack). set its side to a sprite, it plays the animation. super

    but i want the block to disappear after.

    there isn't a ^when animation ends^ trigger for a 3d block.. i put in a wait on created then destroy.

    but the animation no longer plays

    i could ignore it as its invisible..... surely that will clutter performance?

    any advice? thanks all

    That honestly sounds like a waste of memory.

    A better solution would be to always have that one 3D object as a collision box in front of you, always set to invisible. Then you'd have a separate animation skin on top of it.

    On (press of a button) - set 3D-Object collisions enabled

    - Animation-Sprite play animation

    On Animation-Sprite is finished - set 3D-Object collisions disabled

  • > That said I still think pathfinding is valuable for the nodes and I'm thinking of using pathfinding to recalculate path, setting the nodes, then using MoveTo or Bullet to move from one node to the next.

    MoveTo behavior has "Move along pathfinding path" action, super easy to use.

    Just a quick update: I used the "Move along pathfinding path" action and initially critters were occasionally getting stuck in walls as the MoveTo does not have its own built-in system to combat solids. I then tried out the 8-direction behavior turning off the default controls and it's working as intended!

  • > That said I still think pathfinding is valuable for the nodes and I'm thinking of using pathfinding to recalculate path, setting the nodes, then using MoveTo or Bullet to move from one node to the next.

    MoveTo behavior has "Move along pathfinding path" action, super easy to use.

    Yoooo I didn't know about this! Will check it out for sure

    This is something I have in one of my old projects. It's a capx I found for Galaga like following and formation. It should be a very good start for you. These picks start with the events, then the enemies and what you need to add to them and then the nodes and what you need to add to those so Hope this helps! MPPlantOfficial

    Nice! will study this as well!

    Thanks for the help as always, guys!

  • You should not use pathfinding in a hurry. This behavior takes time to perform the search process and is very CPU consuming. What you can do is change the properties to reduce the calculation process, but this will impact the accuracy and vice versa.

    I have a few ideas. One of which is critter spawns a trail of breadcrumbs while chasing player (using Bullet or MoveTo behavior) it can then retrace these breadcrumbs on return back to origin.

    This is all hypothetical for now but my problem is if it's 2 or more critters chasing sprite at the same time how can I be sure each breadcrumb is assigned specifically to a critter when it's 2 different critters of the same type?

  • I can never get the Pathfinding movement speeds right. Doesn't matter if it's set to 200 or 12 the sprites always seem to move in the same speeds.

    The solution I came up with instead is Bullet or MoveTo for most movement needs however pathfinding comes into play when say a critter is spots my character and moves out of origin point and when I'm no longer in a critter's line of sight I want them to return to origin. In the many tests I've ran it doesn't matter how much or how little I set the max speed. It always moves at the same rate.

    When it comes to the return to origin scenario I described I noticed the

    "on Pathfinding arrived" condition is never met in some cases thus a critter is stuck in limbo until I retrigger it by moving into its line of sight.

    That said I still think pathfinding is valuable for the nodes and I'm thinking of using pathfinding to recalculate path, setting the nodes, then using MoveTo or Bullet to move from one node to the next.

    Any ideas how I can do this? How do I count the nodes to begin with and how do I go about moving through them without using the Pathfinding move along path action?

  • So I've finished level 1 for my game and gave most objects in there (locks, enemies) the persist behavior. Working as intended.

    Now how do I reset them to default state when exiting to main menu? Given that main menu is just counted as another layout in and of itself once I click start game I restart the entire game with enemies now 'dead' doors now unlocked...

    Sorry I cannot provide c3p for this example since it contains personal sprites and assets

    Tagged:

  • What to do when your own family discourages you from making games?

  • You can do it with the qarp() expression.

    x=lerp(ax, bx, t)

    y=qarp(ay, (ay+by)/2-400, by, t)

    where ax,ay and bx,by are the two endpoints and t is a variable that you'd gradually change from 0 to 1 and vise versa to go back.

    In the example I just set t to a triangle wave that ping pongs from 0 to 1 and back with abs((time/duration+1)%2-1) since it matches your example.

    alternately you could just do set t to clamp(self.t+dir*dt/duration, 0, 1) where dir is -1 or 1, and the clamp avoids overshoot. You could then compare if t is 0 or 1 to see where it's landed.

    https://www.dropbox.com/scl/fi/zxa5wnncpmhyrovadxia0/jumpArc.c3p?rlkey=5n5s9v0bqg8hxu8ctm2nxsqh8

    Oh man you're a life saver. I just never understood how to use qarp particularly what to enter in the last value.

  • I figured the X component is fine. I only want the Y component to have that arc

    I am garbage at this

    dropbox.com/scl/fi/1fz1wgskcobehqiasxtn6/JUMP_BW_POINTS.c3p

    Tagged:

  • The masking sounds like it should work, and does in the simple mirrored floor case, but I'm curious if we may run into issues with wall mirrors or something.

    Anyways here's a semi-simple floor mirroring test by duplicating things.

    https://www.dropbox.com/scl/fi/tg6b00a8oeaiuwaaw7i5u/floor_mirror.c3p?rlkey=h70lqijh99j88m5i92unydzta

    Yeah something like this was my theoretical solution as well but if I had to theoretically duplicate the entire level for a mirror effect I imagine that wouldn't be a very efficient use of memory.

    I'll consider doing it with a smaller draw distance. Thank you.

  • Hi guys as you can probably tell this is just a 2D overlay UI on top of a 3D environment. I was wondering if Canvas could project a second camera to give off this effect.

    This is from a game called Carmaggedon released in 97.

  • Mesh points are positioned relative to the object’s quad. 0,0 for one corner and 1,1 for the other opposite one. It’s a bit different but setting the pos to 0,0 and the size to 1,1 is one way to let you use layout coordinates and mesh point positions. Another way is to take and xy position and convert it with:

    (X-self.x)/self.width

    (Y-self.y)/self.height

    Oh I see. Will definitely try that. Thanks again!