Teach101
New Member
- Reaction score
- 4
This is my first time using hashtables, everything works fine except for the dmg. Any ideas? (Dmg is on second part)
Trigger:
- Ring of Fire
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Lightning
- Actions
- Set TEMP = (Target point of ability being cast)
- Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TEMP facing Default building facing degrees
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- Unit Group - Add (Last created unit) to UnitGroup_RoF
- Hashtable - Save 0.50 as (Key Time) of (Key (Last created unit)) in HashTable_RoF
- Hashtable - Save 50.00 as (Key Size) of (Key (Last created unit)) in HashTable_RoF
- Hashtable - Save 500.00 as (Key Height) of (Key (Last created unit)) in HashTable_RoF
- Hashtable - Save (Intelligence of (Triggering unit) (Include bonuses)) as (Key Int) of (Key (Last created unit)) in HashTable_RoF
- Hashtable - Save Handle Of(Triggering unit) as (Key Handle) of (Key (Last created unit)) in HashTable_RoF
- Hashtable - Save Handle Of(Last created unit) as (Key Handle2) of (Key (Last created unit)) in HashTable_RoF
- Custom script: call RemoveLocation(udg_TEMP)
- Trigger - Turn on Ring of Fire 2 <gen>
- Events
Trigger:
- Ring of Fire 2
- Events
- Time - Every 0.10 seconds of game time
- Conditions
- Actions
- If ((UnitGroup_RoF is empty) Equal to True) then do (Trigger - Turn off (This trigger)) else do (Do nothing)
- Unit Group - Pick every unit in UnitGroup_RoF and do (Actions)
- Loop - Actions
- Set Timer = (Load (Key Time) of (Key (Picked unit)) from HashTable_RoF)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Timer Less than or equal to 0.00
- Then - Actions
- Hashtable - Clear all child hashtables of child (Key (Picked unit)) in HashTable_RoF
- Unit Group - Remove (Picked unit) from UnitGroup_RoF
- Else - Actions
- Set Size = (Load (Key Size) of (Key (Picked unit)) from HashTable_RoF)
- Set Int = (Load (Key int) of (Key (Picked unit)) from HashTable_RoF)
- Set PickedUnit = (Picked unit)
- Set Handle = (Picked unit)
- Set TEMP = (Position of (Picked unit))
- Unit - Create 1 Lightning for (Owner of (Picked unit)) at TEMP facing Default building facing degrees
- Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
- Animation - Change (Last created unit)'s size to (Size%, Size%, Height%) of its original size
- Hashtable - Save (Timer - 0.10) as (Key Time) of (Key (Picked unit)) in HashTable_RoF
- Hashtable - Save (Size + 50.00) as (Key Size) of (Key (Picked unit)) in HashTable_RoF
- Hashtable - Save (Height - 100.00) as (Key Height) of (Key (Picked unit)) in HashTable_RoF
- Set UnitGroupDmg[(Key (Picked unit))] = (Units within 300.00 of TEMP)
- Unit Group - Pick every unit in UnitGroupDmg[(Key (Picked unit))] and do (Actions)
- Loop - Actions
- Game - Display to (All players) for 30.00 seconds the text: dmg group
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Picked unit) belongs to an enemy of (Owner of (Load (Key Handle) of (Key Handle) in HashTable_RoF))) Equal to True
- Then - Actions
- Game - Display to (All players) for 30.00 seconds the text: dmg hit
- Unit - Cause (Load (Key Handle) of (Key Handle) in HashTable_RoF) to damage (Picked unit), dealing ((Real(Int)) x (3.00 / 5.00)) damage of attack type Spells and damage type Normal
- Else - Actions
- If - Conditions
- Loop - Actions
- Custom script: call RemoveLocation(udg_TEMP)
- Custom script: call DestroyGroup(udg_UnitGroupDmg[GetHandleIdBJ(udg_Handle)])
- If - Conditions
- Loop - Actions
- Events