I’m having a variable problem, I have some code where player presses x and you go to a different frame, but I’m trying to make a delay so that if you have x down you wont just zoom through the frames. The problem is that for some reason the variable is always 0. Heres my code on the frame before the talking scene:
_root.talktimer=100
right after that frame I have this code:
stop()
onEnterFrame=function(){
_root.talktimer-=1
if(_root.talktimer=0 & Key.isDown(88)){
gotoAndPlay(46)}}
For some reason when I get to the frame with talktimer-=1 the timer atomatically sets itself to 0. Can anyone help me with this?
OFF TOPIC:
How do global variable work and how can I make one show? Do I put this in the variable spot in a dynamic text (_global.variable)? Or do I do it some other way?