Tiled Behavior Mis-Behaving

0 favourites
  • 3 posts
  • My enemy objects are using the tiled behavior and I need them to try and move only when the are not already moving. I am using the "X Tiled Movement is moving" but they seem to be moving anyway.

    Any help is appreciated.

    - Guess this isn't ReallyBasic after all...


    Here is a pic of what's going on. This is used for the other directions too

  • So if enemy is NOT moving, and it has a man to the left, you want the enemy to start moving to the left. Is this correct? What's really happening?

    If you have many enemies and men, you need to add "For each Enemies" to the top event. Conditions should be in this order:

    Enemies ValueLeft>=32
    For each Enemies
    Men pick nearest to Enemies
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you for your help!

    Conditions should be in this order:

    Yes and they are. However, once the enemy moves, it typically tries to move again while it is already moving. This causes the enemy to think it is moving twice, when it is only moving once, and subtracting from the variable ValueLeft. The enemy then moves a smaller distance then intended.

    I am double-checking stuff such as ValueLeft because after the enemy moves, it needs to make sure that it isn't moving and still has some of the var ValueLeft.

    Anyway, I do think I fixed the issue. I created yet another variable that does the same thing as what "X Tiled Movement is moving" and it seems to work. I will post an updated pic of the code later today. I am still having issues, so don't go away folks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)