Script Not Executing with Event Begin Overlap

Hi All,

I’m scratching my head at this problem that I’m having. In this current game that I’m making, I spawn four actors into a level for a player to shoot at. When the player’s projectile begins overlapping with one of the actors, I execute three small scripts sequentially. The first updates the player’s score, the second spawns some generic explosion particles, and the third should teleport the actor to a random point within the spawn volume that I’m using.

The problem that I’m having is that sometimes I can see that I’ve hit a target, and the score even updates, but the actor doesn’t teleport to a new location.

I was having a similar problem with this script when I wasn’t teleporting the actors, but just spawning new ones. An actor would get hit, the score would update, the explosion particles would emit, the actor would get destroyed, but then sometimes it wouldn’t spawn a new actor. One-by-one an actor would get destroyed, occasionally not trigger the spawn of a new one, until all actors were gone and I was stuck without any actors to shoot at.

Any and all help would be greatly appreciated.

Well in that example you are not teleporting but assuming you were trying to teleport after you destroy the same as you are trying to spawn after destroying that may be your problem.

You are destroying the actor that you want to run the logic for spawning or teleporting. How can it run the logic if it doesn’t exist to run the logic? Anything called after destroy will not run.

Call it before destroy and it should work.