Changing target after first actor is destroyed
I'm trying to make a tower defence game but the problem is that if I build a tower and 2 actors come in the same overlapping range of the tower the tower will shoot the first enemy but the second enemy will be ignored. I'm checking which enemy is entering via begin and endoverlap. Does anyone have an idea how to fix this?
asked Jun 18 '16 at 10:26 AM in Blueprint Scripting
When its done shooting the first target have it do a GetAllOverlappingActors, if you want it to prioritize at that point its kinda going to be up to you. You could do distance from tower to target, or if you have some kind of variable on the targets for how close they are to the end goal you could have it pick its target based on that. If you get all overlapping actors and there are no actors to attack then just have it sit there until one triggers the OnBeginOverlap again.
Follow this question
Once you sign in you will be able to subscribe for any updates here