runtime.trigger from onCreate

For developers using the Construct 2 Javascript SDK

Post » Sat May 03, 2014 2:02 pm

Is there a reason it doesn't work when called from there? Is there a way to work around this? (such as setting a timeout to the trigger?)

I'm aware of being able to do stuff when system is done loading, but I'm looking for something more specific to the plugin.
B
5
S
1
Posts: 28
Reputation: 431

Post » Sun May 04, 2014 12:50 pm

I don't know, but surely the built-in 'On created' trigger does what you want anyway?
Scirra Founder
B
395
S
232
G
88
Posts: 24,368
Reputation: 193,746

Post » Sun May 04, 2014 4:50 pm

Maybe it's because the event is being triggered before the object that's listening to it is created?

Yeah finding a workaround is indeed not a problem, it's just that the event is being triggered on a few occasions in addition to onCreate so it'd have been nice to solve the whole thing with 1 event listener.
B
5
S
1
Posts: 28
Reputation: 431


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 1 guest