-
Amiga freak
wait?
Is there a "wait" or something simular to use in scripts?... like:
If enemy hitTest me
wait 20 sec
goto "die"
???
-
Senior Member
You can use getTimer() for these
If enemy hitTest me
starttime=getTimer()
If getTimer()-starttime>20000
goto "die"
-
SaphuA
:)
I use the timer code
onClipEvent(load){
timer = 20;
}
onClipEvent(enterFrame){
if(dead == true){
if(timer>0){
timer--;
} else if(timer == 0){
doubleDead = true;
}
}
-
Amiga freak
-
Lunatic
mosterdfles_flash, you're way depends on the framerate. When I want to wait 20 sec. on a movie with a framerate of 30, I need to wait 20*30 frames (=600). So:
onClipEvent(load){
timer = 600;
}
Just wanted to say, before anyone makes any mistakes.
-
SaphuA
hehe
Yeah I'm aware of that...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|