- Joined
- May 11, 2010
- Messages
- 278
Why is all returned values 0?
Dance is based on Channel.
I have created the hashtable.
DanceLevel, Dance Damage and AbilityDuration are Real variables.
Dance is based on Channel.
I have created the hashtable.
DanceLevel, Dance Damage and AbilityDuration are Real variables.
-
Dance
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Dance (ChiKan)
-
Actions
- Hashtable - Save (Level of Dance (ChiKan) for (Triggering unit)) as (Key dancelevel) of (Key (Target unit of ability being cast)) in AbilityTable
- Set DanceLevel = (Load (Key dancelevel) of (Key (Target unit of ability being cast)) from AbilityTable)
- Game - Display to (All players) the text: (Level of ability beeing cast is + (String(DanceLevel)))
- Hashtable - Save 6.00 as (Key danceduration) of (Key (Target unit of ability being cast)) in AbilityTable
- Unit Group - Add (Target unit of ability being cast) to ChiKanDanceGroup
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Dance Loop <gen> is on) Equal to False
-
Then - Actions
- Trigger - Turn on Dance Loop <gen>
- Else - Actions
-
If - Conditions
-
Events
-
Dance Loop
-
Events
- Time - Every 1.00 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in ChiKanDanceGroup and do (Actions)
-
Loop - Actions
- Set AbilityDuration = (Load (Key danceduration) of (Key (Picked unit)) from AbilityTable)
- Set DanceLevel = (Load (Key dancelevel) of (Key (Picked unit)) from AbilityTable)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- AbilityDuration Greater than 0.00
-
Then - Actions
- Hashtable - Save (AbilityDuration - 1.00) as (Key danceduration) of (Key (Picked unit)) in AbilityTable
- Game - Display to (All players) the text: (Level of Dance is + (String(DanceLevel)))
- Set DanceDamage = ((Life of (Picked unit)) x (DanceLevel x 0.01))
- Game - Display to (All players) the text: (Dance Damage is + (String(DanceDamage)))
- Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - DanceDamage)
-
Else - Actions
- Unit Group - Remove (Picked unit) from ChiKanDanceGroup
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in ChiKanDanceGroup) Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in ChiKanDanceGroup and do (Actions)
-
Events