More spell trouble for me.
I am trying to make a spell that lets you tame a pet. You can only have one at once, and it revives when it dies. You can release it and tame another though.
It just won't work. My guess is it has to do with the unit group.
Here are all my triggers.
I am trying to make a spell that lets you tame a pet. You can only have one at once, and it revives when it dies. You can release it and tame another though.
It just won't work. My guess is it has to do with the unit group.
Here are all my triggers.
-
Tame
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Tame Best
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Target unit of ability being cast) Equal to (Random unit from Animals)
-
Then - Actions
- Unit - Change ownership of (Target unit of ability being cast) to (Triggering player) and Change color
- Unit - Remove Tame Best from (Triggering unit)
- Unit - Add Release to (Triggering unit)
- Set Selected_Animal = (Target unit of ability being cast)
- Trigger - Turn on Death <gen>
-
Else - Actions
- Unit - Order (Triggering unit) to Stop
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Animals
-
Events
- Map initialization
- Conditions
-
Actions
- Unit Group - Add (Random unit from (Units of type Eagle)) to Animals
- Unit Group - Add (Random unit from (Units of type Lion)) to Animals
- Unit Group - Add (Random unit from (Units of type Panther)) to Animals
- Unit Group - Add (Random unit from (Units of type Tiger)) to Animals
- Unit Group - Add (Random unit from (Units of type White Tiger)) to Animals
-
Events
-
Release
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Release
-
Actions
- Unit - Change ownership of Selected_Animal to Neutral Hostile and Change color
- Unit - Remove Release from (Triggering unit)
- Unit - Add Tame Best to (Triggering unit)
- Trigger - Turn off Death <gen>
-
Events
-
Death
-
Events
- Unit - A unit Dies
-
Conditions
- (Triggering unit) Equal to Selected_Animal
-
Actions
- Countdown Timer - Create a timer window for (Last started timer) with title Animal Revive
- Countdown Timer - Show (Last created timer window) for Player 1 (Red)
- Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in 30.00 seconds
- Wait 30.00 seconds
- Unit - Create 1 (Unit-type of Selected_Animal) for (Owner of Archer 0013 <gen>) at (Position of Archer 0013 <gen>) facing Default building facing degrees
-
Events