- Joined
- Sep 12, 2008
- Messages
- 657
Hey, im helping a friend at his zombie shooting map..
and im kind of stuck with the missle system, i thought of using hashtables,
but i waned to use the index looping instead..
each time i use the spell, it creates the missle, and shoots it forward..
but when 1 missle ends, it removes all indexing.. (i've made a text to check it.)
and it just stops the whole code..
any help?
heres the code:
thanks in advance =]
and im kind of stuck with the missle system, i thought of using hashtables,
but i waned to use the index looping instead..
each time i use the spell, it creates the missle, and shoots it forward..
but when 1 missle ends, it removes all indexing.. (i've made a text to check it.)
and it just stops the whole code..
any help?
heres the code:
-
Shoot
-

Events
-


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

Conditions
-


(Ability being cast) Equal to Shoot
-
-

Actions
-


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



If - Conditions
-




CBS_Index[1] Equal to 0
-
-



Then - Actions
-




Trigger - Turn on Shoot Loop <gen>
-
-



Else - Actions
-
-


-------- ------------------------------------------------ --------
-


Set CBS_Index[1] = (CBS_Index[1] + 1)
-


Game - Display to (All players) the text: (String(CBS_Index[1]))
-


Set CBS_Index[2] = (CBS_Index[2] + 1)
-


Game - Display to (All players) the text: (String(CBS_Index[2]))
-


-------- ------------------------------------------------ --------
-


Set CBS_DummyType[CBS_Index[2]] = Bullet
-


Set CBS_Speed[CBS_Index[2]] = 600.00
-


Set CBS_DamageAllies[CBS_Index[2]] = False
-


Set CBS_Priority[CBS_Index[2]] = True
-


Set CBS_BloodDamage[CBS_Index[2]] = 35.00
-


Set CBS_KillTrees[CBS_Index[2]] = False
-


Set CBS_TreesKill[CBS_Index[2]] = True
-


Set CBS_MountainsKill[CBS_Index[2]] = True
-


Set CBS_DummyFacing[CBS_Index[2]] = (Facing of (Triggering unit))
-


Set CBS_DummyPoint[CBS_Index[2]] = (Position of (Triggering unit))
-
-
-
Shoot Loop
-

Events
-


Time - Every 0.05 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer CBS_Index[3]) from 1 to CBS_Index[2], do (Actions)
-



Loop - Actions
-




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





If - Conditions
-






CBS_DummyUnit[CBS_Index[3]] Equal to No unit
-
-





Then - Actions
-






Unit - Create 1 CBS_DummyType[CBS_Index[3]] for Neutral Passive at CBS_DummyPoint[CBS_Index[3]] facing CBS_DummyFacing[CBS_Index[3]] degrees
-






Set CBS_DummyUnit[CBS_Index[3]] = (Last created unit)
-
-





Else - Actions
-
-




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





If - Conditions
-






CBS_SpeedCheck[CBS_Index[3]] Less than CBS_Speed[CBS_Index[3]]
-
-





Then - Actions
-






Set CBS_MovePoint = ((Position of CBS_DummyUnit[CBS_Index[3]]) offset by 3.00 towards CBS_DummyFacing[CBS_Index[3]] degrees)
-






Unit - Move CBS_DummyUnit[CBS_Index[3]] instantly to CBS_MovePoint
-






Set CBS_SpeedCheck[CBS_Index[3]] = (CBS_SpeedCheck[CBS_Index[3]] + 3.00)
-
-





Else - Actions
-






Unit - Kill CBS_DummyUnit[CBS_Index[3]]
-






Set CBS_Index[1] = (CBS_Index[1] - 1)
-






Game - Display to (All players) the text: (String(CBS_Index[1]))
-






Set CBS_DummyUnit[CBS_Index[3]] = No unit
-






Set CBS_SpeedCheck[CBS_Index[3]] = 0.00
-






Set CBS_Speed[CBS_Index[3]] = 0.00
-
-
-




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





If - Conditions
-






CBS_Index[1] Equal to 0
-
-





Then - Actions
-






Set CBS_Index[2] = 0
-






Trigger - Turn off (This trigger)
-
-





Else - Actions
-
-
-
-
-
thanks in advance =]



