KryptoPixel's Forum Posts

  • Try adding Else to the "X is fire"

  • Fix

    Had to set it to -40 db.

    It says -10 is half as loud so you would think -20 would be silent

    If -10 is half of its original volume, -20 is half of -10, -30 is half of -20

  • Im not sure if I understood what you need but see my image

  • Yeah, its not a problem but I need more information to visualize the whole mechanics.

    Can you describe better what is your character, how it should move, what are you expecting of each movement/key, so I can think of an approach for the answer?

    Example:

    "Its a side character that moves left/right using arrows keys.. if the arrow is held for 2 seconds it does this or that.. If nothing is pressed it should play an idle animations.."

    As much information as you could provide

  • Send me a msg on discord, I will try to help you

    KryptoPixel#1694

  • is this right?

    It only moves by 2 pixels and all animations don't work.

    You have to invert both sub conditions, right click on it: invert, see on my pitcure it has an X in front of it, it means: invert

    If you hold the -> key, it will move forward 2 pixels

    Sub conditions: if there is not a timer "W" already running: Do start it with 2 seconds

    if the animation "An1" is not playing, Play "AnTo_1"

    On timer "W" it is going to play "An1"

  • Try this

  • Keyboard -> is down is being checked every tick, so lets say that your game is running at 60 fps, this condition is being checked 60 times per second and its true every time, so every second it is going to set your actions about 60 times.

    Its not playing An1 because you are reseting the timer W every tick that is being checked, and when you release the key it will not reset and play after 2 seconds..

    You need to change this logic, tell us what is your C sprite and what are you trying to achieve

  • You do not have permission to view this post

  • Just use the condition compare variable as sub condition of On Created..

  • Thanks for the help guys, is way better now, not perfect but way better.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is normally a pretty difficult task with the official PF behavior. However EasyStar works really fast and doesn't require map recalculations, so it's quite easy to modify the obstacle map for each enemy on every step. Check out this demo:

    https://www.dropbox.com/s/kkghcotqlz051nt/TileMovement_PF.c3p?dl=0

    Ohh I see...

    I was moving tiles of the tileset to use as obstacles but it has the options to add and remove obstacles... and force recalculation.. Thanks I will try it, good example!

  • dropbox.com/s/apv49zqadv9rotn/easystartilemove.c3p

    Thanks but it doesnt show the same problem because there are no multiples sprites finding path and moving simultaneos, enemies moving should also "move" the tiles because they are obstacles.

  • From your code, you should only have a single enemy finding a path every 0.15 seconds cause you are only picking one instance with the "pick random" condition.

    Your last event could be causing the problems though because it would be setting has_moved to false on the same tick that an enemy is finding a path and setting Has_Moved to true.

    What is the behaviour that you are trying to achieve? Do you want all of your enemies to find a valid path on the same tick?

    This is actually my last attempt, i tried another ways, using for.. for each.. etc

    What I want to achieve is:

    All enemies should move 1 tile closer to the player like "every 0.5 seconds" all them move to the next square of the path found. And they are moving, what I think that is happening, is all them are calculing the path togheter, and when they try to move, if there are 2 enemies closer, sometimes they try to move to the same tile

  • Sure, here