variable help

9 posts

Flag Post

how would i make it so that when a variable reaches 6 you go to a certain frame

 
Flag Post

any help here

 
Flag Post

you need to give more info is the scene going to a new frame or is a movie clip, and what is the variable called?

 
Flag Post

the variable is score and when it reaches six i need to gotoandplay 297
btw i need the scean to play

 
Flag Post

Just make it check to see if the variable reached 6 whenever you changed it.

 
Flag Post

idk but maybe somthinglike

if (score == 6) {_root.gotoAndPlay();}

could wourk

 
Flag Post

I don’t know the specifics of action script, but here’s an example of how you might do it.

In the object that changes score:

variable score+1 if score>=6 then goto frame 297

someone convert that to action script.

 
Flag Post

Put this on the frame:

onEnterFrame = function() {
if (score == 6) {
gotoAndPlay(297);
}

Cloud, you’re pretty much correct lolz.

 
Flag Post

hurray im getting grood!!…i mean. good…and great…good and great