- Joined
- May 27, 2009
- Messages
- 94
Hello I would like some help for two spells I'm making which I've attempted to learn indexing for due to the fact I would like the spell to be able to stack.
But every time I've attempted I've ran into a couple of problems
Thanks in advance.
But every time I've attempted I've ran into a couple of problems
-
Ghost of the past
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Ghost of the past10
-
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




GOTP_INDEX Equal to 0
-
-



Then - Actions
-




Trigger - Turn on Ghost of the past Copy <gen>
-
-



Else - Actions
-
-


Set GOTP_INDEX = (GOTP_INDEX + 1)
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




GOTP_INDEX Greater than GOTP_INDEXMAX
-
-



Then - Actions
-




Set GOTP_INDEX2[GOTP_INDEX] = GOTP_INDEX
-




Set GOTP_INDEXMAX = GOTP_INDEX
-
-



Else - Actions
-
-


Set GOTP_INDEX3 = GOTP_INDEX2[GOTP_INDEX]
-


Set GOTP_Caster[GOTP_INDEX3] = (Triggering unit)
-


Set GOTP_target[GOTP_INDEX3] = (Target unit of ability being cast)
-


Set GOTP_time_between_ghost_summon[GOTP_INDEX3] = 50
-


Set GOTP_summon_ammount[GOTP_INDEX3] = (1 + (2 x (Level of Ghost of the past10 for (Triggering unit))))
-


Game - Display to (All players) the text: (String(GOTP_INDEX))
-


Game - Display to (All players) the text: (String(GOTP_summon_ammount[GOTP_Loop]))
-
-
-
Ghost of the past Copy
-

Events
-


Time - Every 0.10 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer GOTP_Loop) from 1 to GOTP_INDEX, do (Actions)
-



Loop - Actions
-




Game - Display to (All players) the text: (String(GOTP_Loop))
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






GOTP_summon_ammount[GOTP_Loop] Greater than 0
-
-





Then - Actions
-






Set GOTP_timer_integer[GOTP_Loop] = (GOTP_timer_integer[GOTP_Loop] + 1)
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








GOTP_time_between_ghost_summon[GOTP_Loop] Equal to GOTP_timer_integer[GOTP_Loop]
-
-







Then - Actions
-








Set GOTP_summon_ammount[GOTP_Loop] = (GOTP_summon_ammount[GOTP_Loop] - 1)
-








Game - Display to (All players) the text: (String(GOTP_summon_ammount[GOTP_Loop]))
-








Set GOTP_location = (Position of GOTP_target[GOTP_Loop])
-








Unit - Create 1 Ghost of the past for (Owner of GOTP_Caster[GOTP_Loop]) at GOTP_location facing Default building facing degrees
-








Unit - Order (Last created unit) to Attack GOTP_target[GOTP_Loop]
-








Set GOTP_timer_integer[GOTP_Loop] = 0
-








Custom script: call RemoveLocation(udg_GOTP_location)
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










GOTP_summon_ammount[GOTP_Loop] Equal to 0
-
-









Then - Actions
-










Set GOTP_INDEX2[GOTP_INDEX] = GOTP_INDEX2[GOTP_INDEX]
-










Set GOTP_INDEX2[GOTP_INDEX] = GOTP_Loop
-










Set GOTP_INDEX = (GOTP_INDEX - 1)
-










Game - Display to (All players) the text: (String(GOTP_INDEX))
-
-









Else - Actions
-
-
-







Else - Actions
-
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








GOTP_INDEX Less than or equal to 0
-
-







Then - Actions
-








Trigger - Turn off (This trigger)
-
-







Else - Actions
-
-
-





Else - Actions
-
-
-
-
-
-
Katon Fire bullet Release
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Katon: Fire Bullet Release
-
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




KFBR_index_size Equal to 0
-
-



Then - Actions
-




Trigger - Turn on Katon Fire Bullet Release LOOP2 <gen>
-
-



Else - Actions
-
-


Set KFBR_index_size = (KFBR_index_size + 1)
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




KFBR_index_size Greater than KFBR_maxsize
-
-



Then - Actions
-




Set KFBR_index[KFBR_index_size] = KFBR_index_size
-




Set KFBR_maxsize = KFBR_index_size
-
-



Else - Actions
-
-


Set KFBR_indexy3 = KFBR_index[KFBR_index_size]
-


Set KFBR_caster[KFBR_indexy3] = (Triggering unit)
-


Set KFBR_target[KFBR_indexy3] = (Target unit of ability being cast)
-


Set KFBR_damage[KFBR_indexy3] = ((Real((Intelligence of (Triggering unit) (Include bonuses)))) x (0.25 + (0.25 x (Real((Level of Katon: Fire Bullet Release for (Triggering unit)))))))
-


Set KFBR_ammount[KFBR_indexy3] = 5
-
-
-
Katon Fire Bullet Release LOOP2
-

Events
-


Time - Every 0.25 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer KFBR_loop) from 1 to KFBR_index_size, do (Actions)
-



Loop - Actions
-




Set KFBR_ammount[KFBR_loop] = (KFBR_ammount[KFBR_loop] - 1)
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






KFBR_ammount[KFBR_loop] Greater than 0
-
-





Then - Actions
-






Set KFBR_point_Copy = (Position of KFBR_target[KFBR_loop])
-






Set KFBR_point = (Position of KFBR_caster[KFBR_loop])
-






Unit - Create 1 Katon: Fire Bullet Release for (Owner of KFBR_caster[KFBR_loop]) at KFBR_point facing KFBR_point_Copy
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








KFBR_index_size_Copy Equal to 0
-
-







Then - Actions
-








Trigger - Turn on Katon Fire Bullet Release LOOP1 <gen>
-
-







Else - Actions
-
-






Set KFBR_index_size_Copy = (KFBR_index_size_Copy + 1)
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








KFBR_index_size_Copy Greater than KFBR_maxsize_Copy
-
-







Then - Actions
-








Set KFBR_index_Copy[KFBR_index_size_Copy] = KFBR_index_size_Copy
-








Set KFBR_maxsize_Copy = KFBR_index_size_Copy
-
-







Else - Actions
-
-






Set KFBR_indexy3 = KFBR_index_Copy[KFBR_index_size_Copy]
-






Set KFBR_missle[KFBR_indexy3] = (Last created unit)
-






Set KFBR_caster_Copy[KFBR_indexy3] = KFBR_caster[KFBR_loop]
-






Set KFBR_target_Copy[KFBR_indexy3] = KFBR_target[KFBR_loop]
-






Set KFBR_damage_Copy[KFBR_indexy3] = KFBR_damage[KFBR_loop]
-
-





Else - Actions
-
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






KFBR_ammount[KFBR_loop] Equal to 0
-
-





Then - Actions
-






Set KFBR_index[KFBR_index_size] = KFBR_index[KFBR_index_size]
-






Set KFBR_index[KFBR_loop] = KFBR_index[KFBR_loop]
-






Set KFBR_maxsize = (KFBR_maxsize - 1)
-






Set KFBR_index_size = (KFBR_index_size - 1)
-
-





Else - Actions
-
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






KFBR_index_size Equal to 0
-
-





Then - Actions
-






Trigger - Turn off (This trigger)
-
-





Else - Actions
-
-
-
-
-
-
Katon Fire Bullet Release LOOP1
-

Events
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer KFBR_loop_Copy) from 1 to KFBR_index_size_Copy, do (Actions)
-



Loop - Actions
-




Set KFBR_point = (Position of KFBR_missle[KFBR_loop_Copy])
-




Set KFBR_point_Copy = (Position of KFBR_target_Copy[KFBR_loop_Copy])
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Distance between KFBR_point and KFBR_point_Copy) Greater than or equal to 15.00
-
-





Then - Actions
-






Set KFBR_point_Copy_Copy = (KFBR_point offset by 15.00 towards (Angle from KFBR_point to KFBR_point_Copy) degrees)
-






Unit - Move KFBR_missle[KFBR_loop_Copy] instantly to KFBR_point_Copy_Copy
-






Custom script: call RemoveLocation(udg_KFBR_point_Copy_Copy)
-
-





Else - Actions
-






Unit - Kill KFBR_missle[KFBR_loop_Copy]
-






Unit - Cause KFBR_caster_Copy[KFBR_loop_Copy] to damage KFBR_target_Copy[KFBR_loop_Copy], dealing KFBR_damage_Copy[KFBR_loop_Copy] damage of attack type Spells and damage type Normal
-






Set KFBR_index_Copy[KFBR_index_size_Copy] = KFBR_index_Copy[KFBR_index_size_Copy]
-






Set KFBR_maxsize_Copy = (KFBR_maxsize_Copy - 1)
-






Set KFBR_index_size_Copy = (KFBR_index_size_Copy - 1)
-
-
-




Custom script: call RemoveLocation(udg_KFBR_point)
-




Custom script: call RemoveLocation(udg_KFBR_point_Copy)
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






KFBR_index_size_Copy Equal to 0
-
-





Then - Actions
-






Trigger - Turn off (This trigger)
-
-





Else - Actions
-
-
-
-
-
Thanks in advance.
