OnEvent - theRAPTLab/gsgo GitHub Wiki
[[toc]]
The onEvent
code block will run ONCE every time the event is fired.
There are currently four available events:
-
RoundInit
-- Fires when the "PREP ROUND" button is pushed -
Costumes
-- Fires when the "PICK CHARACTERS" button is pushed -
Start
-- Fires when the "START ROUND" button is pushed -
RoundStop
-- Fires when the "STOP ROUND" round button is pushed. NOTE that agent scripts will not run at RoundStop because of the switch to thePOSTRUN
sim loop. See #442.
onEvery <event> [[ <code> ]]
Where
-
<event>
is eitherRoundInit
,Costumes
,Start
, orRoundStop
-
<code>
is a block of code to run whenever the event fires.
onEvent RoundStop [[
dbgOut 'Game Over!'
]]