Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Okay I had a question from a viewer on my YT channel, about locks for doors. I have made a few but this is what he wanted. A number lock, and while I do have a way to do this, I thought (like in Construct 2) we could have a write to variable. If click on set >if variable has a value do something> action> write number to variable ( if you click on button (1) then it will write a 1 in the variable. Then if you click on the number (2) button then it will write a 2 next to the one. if variable X is + to viable y then do something. |
||||
|
i think you can do using javascipt I.- Number to string var number = 10; var string_var = number.toString(); II.- String to a int or float (number) var number = "10"; var int_var = parseInt(number); var float_var = parseFloat(number); In Ccb only for experiment. var value = parseInt( ccbGetCopperCubeVariable('my_Ccb_var') ); if ( value > 10 ){ var action = This.Space_Is_For_Niko; ccbInvokeAction(action); ccbSetCopperCubeVariable('my_Ccb_var',0) } |
|