I'm trying to make a trigger that transforms a unit into a werewolf during the night:
to add make the unit learn spells i have these triggers:
-
Night2
-
Events
- Game - The in-game time of day becomes Equal to 18.00
- Conditions
-
Actions
- Set BjarturNormalPoint = (Position of BjarturNormal)
- Set BjarturWereWolfPoint = (Position of BjarturWereWolf)
- Special Effect - Create a special effect at BjarturNormalPoint using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
- Special Effect - Destroy (Last created special effect)
- Unit - Change ownership of BjarturWereWolf to (Owner of BjarturNormal) and Change color
- Unit - Change ownership of BjarturNormal to Neutral Passive and Change color
- Unit - Move BjarturNormal instantly to BjarturWereWolfPoint
- Unit - Move BjarturWereWolf instantly to BjarturNormalPoint
- Hero - Set BjarturWereWolf experience to (Hero experience of BjarturNormal), Hide level-up graphics
- Unit - Set level of Lycanthropy (Bjartur) for BjarturWereWolf to (Level of Lycanthropy (Bjartur) for BjarturNormal)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- AttributeLearned Equal to True
-
Then - Actions
- Unit - Set level of Attribute Bonus for BjarturWereWolf to (Level of Attribute Bonus for BjarturNormal)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- BiteLearned Equal to True
-
Then - Actions
- Unit - Set level of Bite (Bjartur) for BjarturWereWolf to (Level of Bite (Bjartur) for BjarturNormal)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ReturnAtOnceLearned Equal to True
-
Then - Actions
- Unit - Set level of Return at once (Bjartur) for BjarturWereWolf to (Level of Return at once (Bjartur) for BjarturNormal)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- JumpLearned Equal to True
-
Then - Actions
- Unit - Set level of Jump (Bjartur) for BjarturWereWolf to (Level of Jump (Bjartur) for BjarturNormal)
- Else - Actions
-
If - Conditions
- Unit - Create 1 Dummy (Locust) (All) for (Owner of BjarturWereWolf) at (Center of BjarturDummy <gen>) facing Default building facing degrees
- Set BjarturDummyAura = (Last created unit)
- Unit - Add Lycanthropy Dummy (Bjartur) to BjarturDummyAura
- Unit - Set level of Lycanthropy Dummy (Bjartur) for BjarturDummyAura to (Level of Lycanthropy (Bjartur) for BjarturNormal)
- Hero - Modify unspent skill points of BjarturWereWolf: Set to (Unspent skill points of BjarturNormal) points
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
- Hero - Give (Item carried by BjarturNormal in slot (Integer A)) to BjarturWereWolf
-
Loop - Actions
- Unit - Set life of BjarturWereWolf to (Percentage life of BjarturNormal)%
- Unit - Set mana of BjarturWereWolf to (Percentage mana of BjarturNormal)%
- Selection - Select BjarturWereWolf for (Owner of BjarturWereWolf)
- Custom script: call RemoveLocation(udg_BjarturNormalPoint)
- Custom script: call RemoveLocation(udg_BjarturWereWolfPoint)
- Trigger - Turn on Day2 <gen>
- Trigger - Turn off (This trigger)
-
Events
to add make the unit learn spells i have these triggers:
-
Learn Bite2
-
Events
- Unit - A unit Learns a skill
-
Conditions
- (Learned Hero Skill) Equal to Bite (Bjartur)
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Triggering unit) Equal to BjarturNormal
-
Then - Actions
- Hero - Learn skill for BjarturWereWolf: Bite (Bjartur)
- Set BiteLearned = True
- Trigger - Turn off (This trigger)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Triggering unit) Equal to BjarturWereWolf
-
Then - Actions
- Hero - Learn skill for BjarturNormal: Bite (Bjartur)
- Set BiteLearned = True
- Trigger - Turn off (This trigger)
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events