mawilbolou
(mawilbolou)
1
Hi..
I’m making a simple Tower defense game
I have made an enemy AI character that moves point to point between target points in the scene.
On begin play I call the MoveToTargetpoint
When the enemy reaches the last target point I would like them to find the tower and shoot at it.
My question is how do I get the enemy to locate the tower and shoot at it?
Thanks for any help.
mawilbolou
(mawilbolou)
2
I found the answer.
Begin play Cast to and set the target.
Then on a custom event, set actor rotation
From rotation pin, turn look at rotation
Between the enemy get actor location (start) and the targets actor location (target)
Then spawn projectile on a looping timer and clear timers on destroy actor