Make multiple sprites AI completely independent

0 favourites
  • 3 posts
From the Asset Store
Latency independent responsive controls. Beginner friendly documented.
  • Making an attempt at some very base- type controls, not trying to use behaviors as much as possible, though it has a timer. I feel I've almost basically achieved it, just one thing that isn't making sense to me. I'm sure there are better ways to do it

    Enemy sprites ai, I'm just starting with simple Idle behaviors, they rotate quite quickly randomly, then (are supposed to)move to a random location after a random time but there are a few issues I've tried it a million different ways it seems at this point. It currently has the closest I could get it to random rotation, here is how it goes-

    Each sprite has a variable for their rotation, it randomly chooses (0,360) after their timer behavior is up. It seems to be working! But for a random enemy. Not the one that just had their timer end. If you look in the debugger most always when the timer reaches 0, the variable doesn't change and the same enemy doesn't rotate.

    There are the remains of trying to get them to move after some time of idling but that doesn't work at all. nevermind that part haha

    dropbox.com/s/ymhdqi3nag3birl/rpg.capx

    Another tip- use the "test" and "Gamerules" layout and event sheet

    Tagged:

  • See if this is closer to what you want. Your main issue is you can not have triggers (On timer) inside a for-each loop. You need triggers to be at the top level, and do the for-each inside.

    blackhornettechnologies.com/Construct2Stuff/Samples/rpg_Uglypenguin.zip

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ahh, sorry for the late reply. Need to do more studying on conditions for sure I'm so glad to learn what I was doing wrong, I can learn from this and build off it, it is exactly what I was trying to do. Thank you for solving a hugely long time issue for me :)

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