Autorotation AI problem
mystic 2628
Member Posts: 45
I've been trying to get a pirate ship to sail after a players' ship in a game I'm creating. Currently, the pirate ship is moving to and rotating towards the players' ship, but it seems that after a couple of seconds rotating and moving to the player, the pirate ship just simply stops rotating or moving to the player but instead sails off in a straight line into the edge of the map.
I have the pirate ship set to move to game.PlayerX+100 and game.PlayerY+100, and then he rotates to game.PlayerRotation+60. These are all simply loose behaviours not in any rules because I want the enemies to do this constantly but I seems that they don't like doing it constantly...
I have the pirate ship set to move to game.PlayerX+100 and game.PlayerY+100, and then he rotates to game.PlayerRotation+60. These are all simply loose behaviours not in any rules because I want the enemies to do this constantly but I seems that they don't like doing it constantly...
Comments
What you need is to put those behaviors inside of an every 0 seconds timer. That will constrain the expression values to the CURRENT values of the game attributes you are referencing.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User