Hello. I need to make a trigger that spawns a unit for the killing unit player in the corpse (or position) of the dead enemy player unit. And I need to make it so different tiers (evolutions) spawns different units.
I cant seem to make it work. I created a Mutate zombie upgrade with T0 that starts at map initialization to make the t0 zombie spawn on dead units.
This is the Setup
This is the trigger
I cant seem to make it work. I created a Mutate zombie upgrade with T0 that starts at map initialization to make the t0 zombie spawn on dead units.
This is the Setup
-
ZombieEvolution Setup
-
Events
- Time - Elapsed game time is 0.01 seconds
- Conditions
-
Actions
- Player - Set the current research level of Mutate Zombie T0 to 1 for Player 11 (Dark Green)
- Player - Set the current research level of Mutate Zombie T0 to 1 for Player 12 (Brown)
- -------- Number Of Evolutions --------
- Set VariableSet Evolution_Count = 4
- -------- Type of evolutions --------
- Set VariableSet ZombieEvolution_TechType[0] = Mutate Zombie T0
- Set VariableSet ZombieEvolution_TechType[1] = Mutate Zombie T2
- Set VariableSet ZombieEvolution_TechType[2] = Mutate Zombie T3
- Set VariableSet ZombieEvolution_TechType[3] = Mutate Zombie T4
-
Events
This is the trigger
-
Infestation
-
Events
- Unit - A unit Dies
-
Conditions
- ((Dying unit) belongs to an enemy of (Owner of (Killing unit)).) Equal to True
-
Actions
- Set VariableSet Point = (Position of (Dying unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Evolution_Count Equal to 0
-
Then - Actions
- If ((Owner of (Triggering unit)) Equal to Player 11 (Dark Green)) then do (Unit - Create 1 Zombie (T1) for Player 11 (Dark Green) at Point facing Default building facing degrees) else do (Do nothing)
- If ((Owner of (Triggering unit)) Equal to Player 12 (Brown)) then do (Unit - Create 1 Zombie (T1) for Player 12 (Brown) at Point facing Default building facing degrees) else do (Do nothing)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Killing unit)) Not equal to Player 11 (Dark Green)
- (Owner of (Killing unit)) Not equal to Player 12 (Brown)
-
Then - Actions
- Unit - Create 1 Zombie (T1) for (Owner of (Killing unit)) at Point facing Default building facing degrees
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
Events