i am looking for a way to put a unit from the database in a global variable. I dont want to spawn the unit and than do that. i just want that the unit "zergling" got a global variable, so i can trigger a Event like... "Global variable: Zergling moves in center of region XY" Without that global each unit would trigger it. Normaly i would spawn the unit and put it to a global unit group. But now i just want 1 Unit from the Database to be avaible for triggers without spawning befor.
Units cannot be available before they are spawned.
Use Any unit enters region and then add a condition to that trigger:
Triggering Unit == YourGlobalVariable
Then, as soon as your Zergling spawns you set YourGlobalVariable to this zergling.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi there,
i am looking for a way to put a unit from the database in a global variable. I dont want to spawn the unit and than do that. i just want that the unit "zergling" got a global variable, so i can trigger a Event like... "Global variable: Zergling moves in center of region XY" Without that global each unit would trigger it. Normaly i would spawn the unit and put it to a global unit group. But now i just want 1 Unit from the Database to be avaible for triggers without spawning befor.
Can someone help me out please?
Units cannot be available before they are spawned.
Use Any unit enters region and then add a condition to that trigger:
Triggering Unit == YourGlobalVariable
Then, as soon as your Zergling spawns you set YourGlobalVariable to this zergling.