Forum Discussion
Modify storyline variable with a variable that derives from a javascript
I think you just need to declare the player variable and read in the tempo variables from Storyline first.
Change the contents of your fist (currently disabled) executeJavaScript trigger on CONTEGGIO to the following, and enable the trigger.
let player = GetPlayer();
let tempo_q1 = player.GetVar("tempo_q1");
let tempo_q1_2 = player.GetVar("tempo_q1_2");
let tempo_q1_3 = player.GetVar("tempo_q1_3");
let tempo_q1_4 = player.GetVar("tempo_q1_4");
let tempo_q1_5 = player.GetVar("tempo_q1_5");
let tempo_q1_6 = player.GetVar("tempo_q1_6");
let tempo_q1_7 = player.GetVar("tempo_q1_7");
let tempo_q1_8 = player.GetVar("tempo_q1_8");
let tempo_q1_9 = player.GetVar("tempo_q1_9");
let tempo_q1_10 = player.GetVar("tempo_q1_10");
let tempo_q1_11 = player.GetVar("tempo_q1_11");
let tempo_q1_12 = player.GetVar("tempo_q1_12");
let tempo_q1_13 = player.GetVar("tempo_q1_13");
let tempo_q1_14 = player.GetVar("tempo_q1_14");
let tempo_q1_15 = player.GetVar("tempo_q1_15");
let tempo_q1_16 = player.GetVar("tempo_q1_16");
let tempo_q1_17 = player.GetVar("tempo_q1_17");
let tempo_q1_18 = player.GetVar("tempo_q1_18");
let tempo_q1_19 = player.GetVar("tempo_q1_19");
let tempo_q1_20 = player.GetVar("tempo_q1_20");
let tempo_q1_21 = player.GetVar("tempo_q1_21");
let tempo_q1_22 = player.GetVar("tempo_q1_22");
let tempo_q1_23 = player.GetVar("tempo_q1_23");
let tempo_q1_24 = player.GetVar("tempo_q1_24");
let tempo_q1_25 = player.GetVar("tempo_q1_25");
var variableValues = [tempo_q1, tempo_q1_2, tempo_q1_3, tempo_q1_4, tempo_q1_5, tempo_q1_6, tempo_q1_7, tempo_q1_8, tempo_q1_9, tempo_q1_10, tempo_q1_11, tempo_q1_12, tempo_q1_13, tempo_q1_14, tempo_q1_15, tempo_q1_16, tempo_q1_17, tempo_q1_18, tempo_q1_19, tempo_q1_20, tempo_q1_21, tempo_q1_22, tempo_q1_23, tempo_q1_24, tempo_q1_25];
var ValoreMax = Math.max.apply(null, variableValues);
player.SetVar("Valore_Max", ValoreMax);
Related Content
- 7 months ago
- 7 months ago