Moderator
M
Moderator
Reviewed by Maker, , 14th Jan 2013
Approved
GUI

Events


Map initialization

Conditions

Actions


-------- creates hashtable --------


Hashtable - Create a hashtable


Set ISD_hashtable = (Last created hashtable)


-------- List tree or whatever you want to detect here --------


Custom script: call SaveBoolean(udg_ISD_hashtable, 'LTlt', 0, true)
Demo

Events


Player - Player 1 (Red) skips a cinematic sequence

Conditions

Actions


-------- you MUST store this variable into the destructable you want to detect --------


Set ISD_Destructable = Summer Tree Wall 0000 <gen>


-------- loads info from hashtable --------


Custom script: set udg_ISD_check= LoadBoolean(udg_ISD_hashtable, GetDestructableTypeId(udg_ISD_Destructable), 0)


-------- checks if true or false --------


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



If - Conditions




ISD_check Equal to True



Then - Actions




Game - Display to (All players) the text: Destructable is a t...



Else - Actions




Game - Display to (All players) the text: Destructable is not...
init

Events


Map initialization

Conditions

Actions


Hashtable - Create a hashtable


Set ISD_hash = (Last created hashtable)


-------- Creates a dummy unit, hiding it and storing it. --------


Set ISD_loc = (Center of (Playable map area))


Unit - Create 1 Peasant for Neutral Passive at ISD_loc facing Default building facing degrees


Set ISD_dummy = (Last created unit)


Unit - Add Invulnerable (Neutral) to ISD_dummy


Unit - Hide ISD_dummy


Custom script: call RemoveLocation(udg_ISD_loc)
system

Events

Conditions

Actions


-------- orders unit to try to harvest the tree --------


Unit - Order ISD_dummy to Harvest ISD_d


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



If - Conditions




(Current order of ISD_dummy) Equal to (Order(harvest))



Then - Actions




Set ISD_boolean = True




Set ISD_p = (Position of ISD_dummy)




Unit - Move ISD_dummy instantly to ISD_p




Custom script: call RemoveLocation(udg_ISD_p)



Else - Actions




Set ISD_boolean = False
demo

Events


Player - Player 1 (Red) skips a cinematic sequence

Conditions

Actions


Destructible - Pick every destructible in (Playable map area) and do (Actions)



Loop - Actions




Set ISD_d = (Picked destructible)




Trigger - Run system <gen> (checking conditions)




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





If - Conditions






ISD_boolean Equal to True





Then - Actions






Game - Display to (All players) the text: true





Else - Actions






Destructible - Remove ISD_d






Game - Display to (All players) the text: false