I need a cog that makes a key file play (once) in random intervals... with a min wait time of about 30 seconds... (with a wide range... it's a LONG keyfile))... also the cog needs to play a sound everytime the key file is played (hopefully from the 3do that the key is on) also the sound distance range needs to be great enough for you to be able to hear it from some distance (maybe 15)...
someone sent me a cog, but when the level starts, the 3do is still for about 2 seconds, then the keyfile plays, but before the key is finished animating, it plays over again.. and again.. and again..
i set the multiplier as "10" and the mintime value to "3"
any ideas?
[ Code tags, please... ]
someone sent me a cog, but when the level starts, the 3do is still for about 2 seconds, then the keyfile plays, but before the key is finished animating, it plays over again.. and again.. and again..
i set the multiplier as "10" and the mintime value to "3"
any ideas?
Code:
# Plays an animation on thing "focus" at random intervals. #==============================================================# symbols message startup message timer thing focus keyframe anim flex multiplier flex min_time flex time local sound giveway int channel local end #==============================================================# code #------------------------------------------------------ startup: Sleep(0.5); while(time<min_time) { time=Rand()*multiplier; } SetTimer(time); return; #------------------------------------------------------ timer: PlayKey(focus, anim, 1, 0x8); channel=PlaySoundThing(giveway, focus, .8, 1, 3, 0x0); while(time<min_time) { time=Rand()*multiplier; } SetTimer(time); return; #------------------------------------------------------ end
[ Code tags, please... ]