working with javascript

Oct 14, 2015

hi,

I tried to the following code but it does not work, why?

var player = GetPlayer();

var a = player.GetVar("x");
var b = player.GetVar("y");
var sum;

sum = a+ b;

player.SetVar("s", "sum");

 

where, x,y and s are variable i created in storyline.

can anybody help?

thanks!

 

 

 

 

5 Replies
Christie Pollick

Hi, Suma -- Thanks for your question and welcome to the community! Unfortunately, I am not equipped to provide support on JavaScript coding, however, I did want to provide this information on JS Best Practices so you have it handy. I know we have lots of JS gurus in the community, so hopefully, someone will be able to chime in to assist you further! :)

This discussion is closed. You can start a new discussion or contact Articulate Support.