Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Help with this script.

Author
Message
ravenvince2
11
Years of Service
User Offline
Joined: 13th Jan 2013
Location:
Posted: 3rd Mar 2013 02:10
What I'm trying to do is create a script where the player walks across the sound zone the sound will play but then stop after about 3-5 secs. Here's a copy of the script.

The audio works but don't stop when I need it to.



;Artificial Intelligence Script

;Header

desc =Heartbeat Timer

;Triggers

:state=0,plrwithinzone=1:sound=audiobank\user\Abduction\heartbeat.ogg,state=1
:state=1:timerstart,state=2
:state=2,timergreater=300:stopsound

;End of Script
Pirate Myke
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, Ca
Posted: 3rd Mar 2013 07:43 Edited at: 3rd Mar 2013 07:56
Try using etimer and etimergreater instead and see if that works for you.

Also the time is measured in Milliseconds and 3 secs is 3000 and 5 seconds is 5000.

etimergreater=3000.

Try this
;Artificial Intelligence Script

;Header

desc =Heartbeat Timer

;Triggers

:state=0,plrwithinzone=1:sound=audiobank\user\Abduction\heartbeat.ogg,state=1
:state=1,plrwithinzone=0:etimerstart,state=2
:state=2,etimergreater=3000:stopsound,state=100

;End of Script

ravenvince2
11
Years of Service
User Offline
Joined: 13th Jan 2013
Location:
Posted: 3rd Mar 2013 12:06
Thank so much that worked. Yeah I see what I did put 3 miliseconds lol I just noticed. I forgot to hit another 0 when I was posting this.

Thanks again.
Pirate Myke
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, Ca
Posted: 4th Mar 2013 04:16

Login to post a reply

Server time is: 2024-11-23 17:12:06
Your offset time is: 2024-11-23 17:12:06