inject JS code

Discussion and feedback on Construct 2

Post » Mon Dec 08, 2014 1:10 pm

I am wondering if it's possible to inject JS code directly by writing code via a plugin.

For instance i would like to change the value of a global variable not with events but with code.
Is this possible?
B
9
S
3
G
1
Posts: 128
Reputation: 1,116

Post » Mon Dec 08, 2014 2:27 pm

You can integrate arbitrary javascript code using the Javascript SDK.

Plugins should not do things like change global variables, because it is extremely confusing for the user. They want to be able to control them with their own events, and not have plugins pull the rug out from under their feet and do things behind the scenes. It's possible, but I strongly discourage it.
Scirra Founder
B
395
S
232
G
88
Posts: 24,368
Reputation: 193,746

Post » Sun Dec 21, 2014 8:04 pm

I am so stupid. I just saw that browser plugin plugin had "execute JS code" :D
B
9
S
3
G
1
Posts: 128
Reputation: 1,116


Return to Construct 2 General

Who is online

Users browsing this forum: gamecorpstudio, SaRaB and 3 guests