- Joined
- Sep 28, 2016
- Messages
- 47
Hi all,
This is strange. I have a main unit which is stored in a variable and must remain in there throughout the game. At times the unit is switched, because the unit 'turns' into a building, and back. But at each point the variable carefully tracks the correct unit.
Now, all was well until I started making enemy wave spawns. The triggers to spawn enemy waves check what type of unit is in the main unit variable. Depending on which 'level' (unit type) of unit it is, the trigger will spawn easier or harder enemies. After a couple of waves, the unit variable starts showing as "(null)" (I set a trigger to show me the unit name of the variable every 1 seconds(s)).
Anyone have any idea why a unit variable can just be emptying like this? I've gone through the object editor and traced every mention of the variable and can't find anything that would empty it. Now I'm trying to do a unit group check (every unit in playable area matching correct unit type) and then put that into the variable to 'refresh' the variable manually so if it empties, it should fill again, but this is a bad workaround..
Seems like a bug.
This is strange. I have a main unit which is stored in a variable and must remain in there throughout the game. At times the unit is switched, because the unit 'turns' into a building, and back. But at each point the variable carefully tracks the correct unit.
Now, all was well until I started making enemy wave spawns. The triggers to spawn enemy waves check what type of unit is in the main unit variable. Depending on which 'level' (unit type) of unit it is, the trigger will spawn easier or harder enemies. After a couple of waves, the unit variable starts showing as "(null)" (I set a trigger to show me the unit name of the variable every 1 seconds(s)).
Anyone have any idea why a unit variable can just be emptying like this? I've gone through the object editor and traced every mention of the variable and can't find anything that would empty it. Now I'm trying to do a unit group check (every unit in playable area matching correct unit type) and then put that into the variable to 'refresh' the variable manually so if it empties, it should fill again, but this is a bad workaround..
Seems like a bug.