Quote:
Originally Posted by Chompy
Well, no.
PHP Code:
// This is an event that occurs when the WNPC is updated function onCreated() { this.string = "foo"; }
function onTrigger() { this.string = "bar"; }
Since onTrigger() isn't triggered, this.string will be "foo"
However,
PHP Code:
function onCreated() { this.string = "foo";
onTrigger(); }
function onTrigger() { this.string = "bar"; }
Would now make this.string equal "bar" since the function is triggered.
|
So I write functions like normal basically in GS1, but to call a trigger, I have to make a function... also?
So, creating the function onCreated() basically itself is a trigger, so you have to use that trigger to initialize all other triggers?