using variables in external scripts and vice versa

Get help using Construct 2

Post » Thu Mar 29, 2012 2:24 am

OK,

so i have a script called myscript.js

it has a function called setvars().

in the runtime.js file i set some variables (global i think) like so

[CODE]     var typeProto = pluginProto.Type.prototype;

    //our custom vars
     var name = "";
     var info = "";[/CODE]

now i import the myscript.js file using %.getscript jquery function.

when i call the new function setvars() i set the vars in it
like so

[CODE]name="monica";
info="nice";[/CODE]

but these variable are not set in construct2 actually it causes some form of background error. So the question is how to get and set runtime global variables in external imported scripts?
B
7
S
1
Posts: 65
Reputation: 821

Post » Thu Mar 29, 2012 8:41 am

Have a look at the Call Javascript plugin.Joe72012-03-29 08:49:19
B
14
S
6
G
5
Posts: 173
Reputation: 4,742


Return to How do I....?

Who is online

Users browsing this forum: MarkThomas, Yahoo [Bot] and 0 guests