salmo
08-10-2012, 08:32 AM
I have a problem that I'm hoping some fresh brains can offer a solution for. The pseudocode is as follows:
a. When an AiAircraft actor is created I want to test to see if there is a previous version of the same actor (aircraft).
b. If a previous (ealier spawned) version exists, then I want to delete (remove) the earlier AiAircraft from the battle.
Options:
1. I tried using actor.tag to hold the spawn time of the actor but this keeps throwing null errors after deleting actors.
2. Log spawning times of actors? Clunky?
3. get mission number of an actor & look for lower mission number?
4. other methods?
Below some non-working code:
code removed by author
a. When an AiAircraft actor is created I want to test to see if there is a previous version of the same actor (aircraft).
b. If a previous (ealier spawned) version exists, then I want to delete (remove) the earlier AiAircraft from the battle.
Options:
1. I tried using actor.tag to hold the spawn time of the actor but this keeps throwing null errors after deleting actors.
2. Log spawning times of actors? Clunky?
3. get mission number of an actor & look for lower mission number?
4. other methods?
Below some non-working code:
code removed by author