Last active
August 29, 2015 14:23
-
-
Save anthkris/efec7f02b3da20d914a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//this goes in User.js in storyline output | |
//creates a way to access variables made in Storyline | |
var player = GetPlayer(); | |
function getVar(x) { | |
return player.GetVar(x); | |
} | |
//function to set variable | |
function setVar(x,v) { | |
return player.SetVar(x,v); | |
} | |
/* this goes inside of Construct 2 | |
embed construct 2 game as a webobject instide of Storyline | |
construct 2 requires double quotes around the JS | |
use browser object in Construct to to execute javascript | |
match variable name to variable created in Storyline | |
value can be text or number, match to value needed in Storyline */ | |
“parent.setVar(‘variablename’, variablevalue);” |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment