Actor moving, turning then shooting (then repeat)
Hello,
I'm trying to figure out how to move an actor (enemy actor) to a random place on the screen then turn toward the player then shoot Please note that the player will be moving. I want this all to happen every few seconds. I have been unsuccessful lately because it always ended up turning while moving and just ended up turning out bad. If anyone has the solution to this that would be great! Thanks
I'm trying to figure out how to move an actor (enemy actor) to a random place on the screen then turn toward the player then shoot Please note that the player will be moving. I want this all to happen every few seconds. I have been unsuccessful lately because it always ended up turning while moving and just ended up turning out bad. If anyone has the solution to this that would be great! Thanks
Comments
Every (add time here) secs
In the enemy actor
Move to X pos = random(0,480)
Move to Y pos = random(0,320)
rotate to position x game.mycharacterpositionx - make this attribute
rotate to position y game.mycharacterpositiony - make this attribute
Every .1 secs or use contrain
In my character
Change attribute game.mycharacterpositionx to self position x
Change attribute game.mycharacterpositiony to self position y