- Joined
- Jul 19, 2010
- Messages
- 6
Hello,
can you help me fixing my triggers?
What i want to do is, when hero learns a spell, it should damage a random enemy unit at the heroe very 2,5 seconds.
seconds trigger:
And the spell must not be MUI since there can only be that one unit with that spell.
can you help me fixing my triggers?
What i want to do is, when hero learns a spell, it should damage a random enemy unit at the heroe very 2,5 seconds.
-
Learn WizardsGift
-
Events
- Unit - A unit Learns a skill
-
Conditions
- (Learned Hero Skill) Equal to Wizards Gift /// Grandmage
-
Actions
- Set VariableSet Grandmage = (Triggering unit)
- Trigger - Add to Wizards Gift <gen> the event (Time - Every 2.50 seconds of game time)
- Trigger - Turn off (This trigger)
-
Events
seconds trigger:
-
Wizards Gift
- Events
-
Conditions
- (Grandmage is alive) Equal to Wahr
-
Actions
- Set VariableSet WizardsGiftLVL = (Level of Wizards Gift /// Grandmage for Grandmage)
- Set VariableSet Grandmage = Grandmage2
- Set VariableSet WizardsGiftGroup = (Units within 700.00 of (Position of Grandmage) matching (((Picked unit) belongs to an enemy of (Owner of Grandmage).) Equal to Wahr).)
- Unit - Create 1 DAMAGEDUMMY for (Owner of Grandmage) at (Center of (Playable map area)) facing Default building facing degrees
-
Unit Group - Pick every unit in (Random 1 units from WizardsGiftGroup) and do (Actions)
-
Loop - Actions
- Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Undead\DarkRitual\DarkRitualCaster.mdl
- Unit - Cause (Last created unit) to damage (Picked unit), dealing (100.00 x (Real(WizardsGiftLVL))) damage of attack type Hero and damage type Normal
- Unit - Cause Grandmage2 to damage (Picked unit), dealing ((Real((Intelligence of Grandmage (Include bonuses)))) x (0.10 x (Real(WizardsGiftLVL)))) damage of attack type Chaos and damage type Normal
-
Loop - Actions
- Unit - Remove (Last created unit) from the game
- Unit Group - Remove all units from WizardsGiftGroup.
- Custom script: call DestroyGroup(udg_WizardsGiftGroup)
- Set VariableSet Grandmage2 = No unit
And the spell must not be MUI since there can only be that one unit with that spell.
Last edited: