- Joined
- Mar 1, 2013
- Messages
- 555
KILLCIDE I'm gonna kill you!!! 
I'll fix it tonight, thanks.

I'll fix it tonight, thanks.
ini

Events


Map initialization

Conditions

Actions


-------- This following spell can be used anywhere in your map as an alternative to pause --------


Set _Pause = Pause


-------- configurable --------


Set Config_CH_Spell = Chronosphere


Set Config_CH_Unit = Chronosphere


Set Config_CH_Duration = 2.00


Set Config_CH_lvlDuration = 2.00


Set Config_CH_AoE = 400.00


Set Config_CH_lvlAoE = 0.00


-------- Model causes lag on first cast.... Preloading. --------


Custom script: call RemoveUnit(CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), udg_Config_CH_Unit, 0, 0, 0))
Chronosphere ini

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Config_CH_Spell

Actions


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



If - Conditions




CH_Dex Equal to 0



Then - Actions




Trigger - Turn on Chronosphere loop <gen>



Else - Actions


Set CH_Dex = (CH_Dex + 1)


Set CH_Caster[CH_Dex] = (Triggering unit)


Set CH_lvl = (Level of Config_CH_Spell for CH_Caster[CH_Dex])


Set CH_p = (Target point of ability being cast)


-------- Chronosphere dummy must be owned by caster, otherwise true sight will not work --------


Unit - Create 1 Config_CH_Unit for (Owner of CH_Caster[CH_Dex]) at CH_p facing Default building facing degrees


Custom script: call RemoveLocation(udg_CH_p)


Set CH_Effect[CH_Dex] = (Last created unit)


Unit - Add a (Config_CH_Duration + ((Real(CH_lvl)) x Config_CH_lvlDuration)) second Generic expiration timer to CH_Effect[CH_Dex]


Set CH_AoE[CH_Dex] = (Config_CH_AoE + ((Real(CH_lvl)) x Config_CH_lvlAoE))


-------- Next function has no effect if AoE is 400 --------


-------- The chronosphere looks odd if it's size is not 100%. I'm not a modeler so I can't fix it. If that is a probelm, use a diffirent model or fix it yourself. --------


Animation - Change CH_Effect[CH_Dex]'s size to ((CH_AoE[CH_Dex] / 4.00)%, 0.00%, 0.00%) of its original size
Chronosphere loop

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


For each (Integer CH_i) from 1 to CH_Dex, do (Actions)



Loop - Actions




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





If - Conditions






(CH_Effect[CH_i] is alive) Equal to True





Then - Actions






Set CH_p = (Position of CH_Effect[CH_i])






Custom script: set bj_wantDestroyGroup=true






-------- I know I don't have to filter Chronosphere since it has locust and won't be picked, but for some reason - if I don't filter chronosphere - then the chronospheres can pause each other... --------






Unit Group - Pick every unit in (Units within CH_AoE[CH_i] of CH_p) and do (Actions)







Loop - Actions








Set CH_unit = (Picked unit)








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









If - Conditions










CH_unit Not equal to CH_Caster[CH_i]










(Unit-type of CH_unit) Not equal to Chronosphere









Then - Actions










Unit Group - Add CH_unit to CH_Group










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











If - Conditions












(CH_unit is in CH_Group2) Equal to False











Then - Actions












Unit - Add _Pause to CH_unit












Unit - Order CH_unit to Human Footman - Defend












Unit - Pause the expiration timer for CH_unit












Animation - Change CH_unit's animation speed to 0.00% of its original speed












Unit Group - Add CH_unit to CH_Group2











Else - Actions









Else - Actions






Custom script: call RemoveLocation(udg_CH_p)





Else - Actions






Set CH_Caster[CH_i] = CH_Caster[CH_Dex]






Set CH_Effect[CH_i] = CH_Effect[CH_Dex]






Set CH_AoE[CH_i] = CH_AoE[CH_Dex]






Set CH_Dex = (CH_Dex - 1)






Set CH_i = (CH_i - 1)






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







If - Conditions








CH_Dex Equal to 0







Then - Actions








Trigger - Turn off (This trigger)







Else - Actions


Unit Group - Pick every unit in CH_Group2 and do (Actions)



Loop - Actions




Set CH_unit = (Picked unit)




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





If - Conditions






(CH_unit is in CH_Group) Equal to False





Then - Actions






Unit - Remove _Pause from CH_unit






Unit - Unpause the expiration timer for CH_unit






Animation - Change CH_unit's animation speed to 100.00% of its original speed






Unit Group - Remove CH_unit from CH_Group2





Else - Actions


Unit Group - Remove all units from CH_Group