- Joined
- Sep 9, 2006
- Messages
- 92
The idea of the spell is that it lifts the target up into the air for up to 2 seconds dealing damage. Moving stops you from raising the target. Once the target stops being raised, it is thrown from its position back a distance depending on the height it was raised (or rather how long it was being raised). It's composed of 4 total triggers plus an init to set some variables and create the hash: (would've had the triggers hide defaultly but I'm not sure how )
How do i fix it so it gets tossed back? (also, does my way of resetting the index make sense/work? I threw it together last minuite just to give it something; i thought the only other way would be to have 2 indices)
-
init
-
Events
- Map initialization
- Conditions
-
Actions
- Hashtable - Create a hashtable
- Set DR_Hash = (Last created hashtable)
- Set DR_MaxTime = 2.00
- Set DR_DmgConst = 0.90
- Visibility - Disable fog of war
- Visibility - Disable black mask
-
Events
-
DR Init
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Death's Respite
-
Actions
- Set DR_Index = (DR_Index + 1)
- Hashtable - Save Handle Of(Target unit of ability being cast) as (Key Target) of DR_Index in DR_Hash
- Hashtable - Save Handle Of(Triggering unit) as (Key Caster) of DR_Index in DR_Hash
- Hashtable - Save 0.00 as (Key Time) of DR_Index in DR_Hash
- Hashtable - Save False as (Key Throw) of DR_Index in DR_Hash
- Hashtable - Save True as (Key Lifting) of DR_Index in DR_Hash
- Hashtable - Save (Strength of (Triggering unit) (Include bonuses)) as (Key Str) of DR_Index in DR_Hash
- Hashtable - Save (Intelligence of (Triggering unit) (Include bonuses)) as (Key Int) of DR_Index in DR_Hash
- Hashtable - Save (Level of Death's Respite for (Triggering unit)) as (Key Lvl) of DR_Index in DR_Hash
- Trigger - Turn on DR Lift <gen>
- Trigger - Turn on DR Throw <gen>
- Trigger - Turn on DR StopChanneling <gen>
- Unit - Pause (Target unit of ability being cast)
-
Events
-
DR Lift
-
Events
- Time - Every 0.02 seconds of game time
- Conditions
-
Actions
-
For each (Integer A) from 1 to DR_Index, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load (Key Lifting) of (Integer A) from DR_Hash) Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load (Key Time) of (Integer A) from DR_Hash) Greater than DR_MaxTime
-
Then - Actions
- Hashtable - Save False as (Key Lifting) of (Integer A) in DR_Hash
- Unit - Unpause (Load (Key Target) of (Integer A) in DR_Hash)
- -------- Throw --------
- Hashtable - Save True as (Key Throw) of (Integer A) in DR_Hash
- Hashtable - Save (400.00 x (Load (Key Time) of (Integer A) from DR_Hash)) as (Key MaxDist) of (Integer A) in DR_Hash
- Hashtable - Save ((Load (Key MaxDist) of (Integer A) from DR_Hash) / 2.00) as (Key CurDist) of (Integer A) in DR_Hash
- Hashtable - Save (100.00 x (Load (Key Time) of (Integer A) from DR_Hash)) as (Key MaxHeight) of (Integer A) in DR_Hash
- Set TempPt = (Position of (Load (Key Target) of (Integer A) in DR_Hash))
- Set TempPt2 = (Position of (Load (Key Caster) of (Integer A) in DR_Hash))
- Hashtable - Save Handle Of(TempPt offset by (200.00 x (Load (Key Time) of (Integer A) from DR_Hash)) towards (Angle from TempPt2 to TempPt) degrees) as (Key EndPt) of (Integer A) in DR_Hash
- Hashtable - Save Handle OfTempPt as (Key TargetPt) of (Integer A) in DR_Hash
- Custom script: call RemoveLocation(udg_TempPt)
- Custom script: call RemoveLocation(udg_TempPt2)
-
Else - Actions
- Hashtable - Save ((Load (Key Time) of (Integer A) from DR_Hash) + 0.02) as (Key Time) of (Integer A) in DR_Hash
- Unit - Add Storm Crow Form to (Load (Key Target) of (Integer A) in DR_Hash)
- Animation - Change (Load (Key Target) of (Integer A) in DR_Hash) flying height to ((Current flying height of (Load (Key Target) of (Integer A) in DR_Hash)) + 2.00) at 1000000000.00
- Unit - Remove Storm Crow Form from (Load (Key Target) of (Integer A) in DR_Hash)
- Unit - Cause (Load (Key Caster) of (Integer A) in DR_Hash) to damage (Load (Key Target) of (Integer A) in DR_Hash), dealing ((((Real((Load (Key Int) of (Integer A) from DR_Hash))) + (Real((Load (Key Str) of (Integer A) from DR_Hash)))) x ((Real((Load (Key Lvl) of (Integer A) from DR_Hash))) x DR_DmgConst)) x 0.02) damage of attack type Magic and damage type Normal
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to DR_Index, do (Actions)
-
Events
-
DR StopChanneling
-
Events
- Unit - A unit Stops casting an ability
-
Conditions
- (Ability being cast) Equal to Death's Respite
-
Actions
-
For each (Integer A) from 1 to DR_Index, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Triggering unit) Equal to (Load (Key Caster) of (Integer A) in DR_Hash)
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load (Key Lifting) of (Integer A) from DR_Hash) Equal to True
-
Then - Actions
- Hashtable - Save False as (Key Lifting) of (Integer A) in DR_Hash
- Unit - Unpause (Load (Key Target) of (Integer A) in DR_Hash)
- -------- Throw --------
- Hashtable - Save True as (Key Throw) of (Integer A) in DR_Hash
- Hashtable - Save (400.00 x (Load (Key Time) of (Integer A) from DR_Hash)) as (Key MaxDist) of (Integer A) in DR_Hash
- Hashtable - Save ((Load (Key MaxDist) of (Integer A) from DR_Hash) / 2.00) as (Key CurDist) of (Integer A) in DR_Hash
- Hashtable - Save (100.00 x (Load (Key Time) of (Integer A) from DR_Hash)) as (Key MaxHeight) of (Integer A) in DR_Hash
- Set TempPt = (Position of (Load (Key Target) of (Integer A) in DR_Hash))
- Set TempPt2 = (Position of (Load (Key Caster) of (Integer A) in DR_Hash))
- Hashtable - Save Handle Of(TempPt offset by (200.00 x (Load (Key Time) of (Integer A) from DR_Hash)) towards (Angle from TempPt2 to TempPt) degrees) as (Key EndPt) of (Integer A) in DR_Hash
- Hashtable - Save Handle OfTempPt as (Key TargetPt) of (Integer A) in DR_Hash
- Custom script: call RemoveLocation(udg_TempPt)
- Custom script: call RemoveLocation(udg_TempPt2)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to DR_Index, do (Actions)
-
Events
-
DR Throw
-
Events
- Time - Every 0.02 seconds of game time
- Conditions
-
Actions
-
For each (Integer A) from 1 to DR_Index, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load (Key Throw) of (Integer A) from DR_Hash) Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load (Key MaxDist) of (Integer A) from DR_Hash) Greater than (Load (Key CurDist) of (Integer A) from DR_Hash)
-
Then - Actions
- Set TempPt = (Load (Key TargetPt) of (Integer A) in DR_Hash)
- Set TempPt2 = (TempPt offset by 6.00 towards (Angle from (Load (Key TargetPt) of (Integer A) in DR_Hash) to (Load (Key EndPt) of (Integer A) in DR_Hash)) degrees)
- Hashtable - Save Handle OfTempPt2 as (Key TargetPt) of (Integer A) in DR_Hash
- Hashtable - Save ((Load (Key CurDist) of (Integer A) from DR_Hash) + 6.00) as (Key CurDist) of (Integer A) in DR_Hash
- Set DR_TempReal = (((4.00 x (Load (Key MaxHeight) of (Integer A) from DR_Hash)) / (Load (Key MaxDist) of (Integer A) from DR_Hash)) x (((Load (Key MaxDist) of (Integer A) from DR_Hash) - (Load (Key CurDist) of (Integer A) from DR_Hash)) x ((Load (Key CurDist) of (Integer A) fr
- Unit - Move (Load (Key Target) of (Integer A) in DR_Hash) instantly to (Load (Key TargetPt) of (Integer A) in DR_Hash)
- Unit - Add Storm Crow Form to (Load (Key Target) of (Integer A) in DR_Hash)
- Animation - Change (Load (Key Target) of (Integer A) in DR_Hash) flying height to DR_TempReal at 1000000000.00
- Unit - Remove Storm Crow Form from (Load (Key Target) of (Integer A) in DR_Hash)
- Custom script: call RemoveLocation(udg_TempPt)
- Custom script: call RemoveLocation(udg_TempPt2)
-
Else - Actions
- Unit - Add Storm Crow Form to (Load (Key Target) of (Integer A) in DR_Hash)
- Animation - Change (Load (Key Target) of (Integer A) in DR_Hash) flying height to 0.00 at 1000000000.00
- Unit - Remove Storm Crow Form from (Load (Key Target) of (Integer A) in DR_Hash)
- Hashtable - Clear all child hashtables of child (Integer A) in DR_Hash
- Set TempBool = False
-
For each (Integer B) from 1 to DR_Index, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load (Key Caster) of (Integer B) in DR_Hash) Not equal to No unit
-
Then - Actions
- Set TempBool = True
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TempBool Equal to True
- Then - Actions
-
Else - Actions
- Set DR_Index = 0
-
If - Conditions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to DR_Index, do (Actions)
-
Events
How do i fix it so it gets tossed back? (also, does my way of resetting the index make sense/work? I threw it together last minuite just to give it something; i thought the only other way would be to have 2 indices)