I have 2 Enemy objects: Enemy 1 and Enemy2. It is a respawn game so there is always only one of each object at one time. Both enemies have an instance variable which determines their target. What I want to accomplish is having a function that gives them a new target everytime they die or they kill their target.
What I tried was having the function
EVENT - On FUNCTION
- -- SUBEVENT1 - Parameter 0 = 1
------ SUBEVENT1A - If .... then Enemy1 set instance variable Target to...
--- SUBEVENT 2 - Paramater 0 = 2
------ SUBEVENT2A - If .... then Enemy2 set instance variable Target to...
on Enemy1 destroyed - call FUNCTION(1)
But this does not work. The enemy keeps the same target that it had when it died. I also have:
ON start of layout - Call Function(1) & Call Function(2) but this doesn't seem to work either.