Whole Number display in Storyline

Hi anyone out there in Storyline 3 land.

I am counting seconds from the start of a module and when I get to the end, I divide that number by 4 and only want a whole number displayed.

i.e.   13 divided by 4 should display 3 not 3.25

It is driving me crazy and one solution I found did not seem to work….

Any help appreciated. 


9 Replies
Ross Dewstow

Using JavaScript we finally cracked it.

Using a variable "thenum" that counts the seconds that the module has been open, we did this.


var mynum = player.GetVar("thenum");

Having a field with %thenum% displays a whole number.  :)

Ross Dewstow

Hi Leslie, That is OK. My problem was that I was counting the time that a person was using and interaction and then dividing this total by 4 and wanted a whole number to display.

It did not matter if it was truncated or rounded but I did not want an decimals.

Worked really well in the end with a few brains working it out. :)