- Joined
- May 15, 2009
- Messages
- 192
Ok so I really need help, this is the first spell im making with hashTables involved.
I tried to do a "Walking Plague." It (should) deal damage to a target enemy over time(30 seconds to be precise) and if enemies get too close to the main target, they will also be affected by the spell.
First I tried simply adding the Disease Cloud ability and have it works on friends, sadly this simple looking trigger diden't do anything. So I went to try Hashtables since it has to be MUI with all those units involved.
My problem is, that neither damage nor spreading occurs, advice please? Thanks in advance.
I tried to do a "Walking Plague." It (should) deal damage to a target enemy over time(30 seconds to be precise) and if enemies get too close to the main target, they will also be affected by the spell.
First I tried simply adding the Disease Cloud ability and have it works on friends, sadly this simple looking trigger diden't do anything. So I went to try Hashtables since it has to be MUI with all those units involved.
My problem is, that neither damage nor spreading occurs, advice please? Thanks in advance.
-
Walking Plague Initiate
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Walking Plague
-
Actions
- Hashtable - Save 30.00 as 0 of (Key (Target point of ability being cast)) in WalkingPlague_Hash
- Unit Group - Add (Target unit of ability being cast) to WalkingPlague_Group
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Triggering unit)) Equal to Plague Bearer
-
Then - Actions
- Set WalkingPlague_Caster = (Triggering unit)
- Else - Actions
-
If - Conditions
-
Events
-
Walking Plague Loop
-
Events
- Time - Every 1.00 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in WalkingPlague_Group and do (Actions)
-
Loop - Actions
- Set WalkingPlague_RemainingTime = (Load 0 of (Key (Picked unit)) from WalkingPlague_Hash)
- Set WalkingPlague_PickedLoc = (Position of (Picked unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- WalkingPlague_RemainingTime Greater than 0.00
-
Then - Actions
- Unit - Cause WalkingPlague_Caster to damage (Picked unit), dealing ((Real((Level of Walking Plague for WalkingPlague_Caster))) + 99999.00) damage of attack type Spells and damage type Normal
- Hashtable - Save (WalkingPlague_RemainingTime - 1.00) as 0 of (Key (Picked unit)) in WalkingPlague_Hash
-
Unit Group - Pick every unit in (Units within 200.00 of WalkingPlague_PickedLoc matching ((((Matching unit) is A structure) Not equal to True) and (((Matching unit) belongs to an ally of (Owner of (Picked unit))) Equal to True))) and do (Actions)
-
Loop - Actions
- Unit - Cause WalkingPlague_Caster to damage (Picked unit), dealing ((Real((Level of Walking Plague for WalkingPlague_Caster))) + 8.00) damage of attack type Spells and damage type Normal
- Unit - Create 1 Dummy for (Owner of WalkingPlague_Caster) at WalkingPlague_PickedLoc facing Default building facing degrees
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- Unit - Add Walking Plague (Unit) to (Last created unit)
- Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike (Picked unit)
- Unit Group - Add (Picked unit) to WalkingPlague_Group
- Custom script: call RemoveLocation(udg_WalkingPlague_PickedLoc)
-
Loop - Actions
-
Else - Actions
- Unit Group - Remove (Picked unit) from WalkingPlague_Group
- Hashtable - Clear all child hashtables of child (Key (Picked unit)) in WalkingPlague_Hash
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in WalkingPlague_Group and do (Actions)
-
Events