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 Models and Media / need help with sound and triggering it

Author
Message
Siphon_Studios
11
Years of Service
User Offline
Joined: 20th Jan 2013
Location: @ the Mr. Coffee
Posted: 25th Jan 2013 06:19
So I want to make a certain audio clip play when the character walk into it, I know how to do this. But i want it to only play that one time. So if the person walks through it again, it wont play.

Sort of like a one time only sound.

THANKS!
Ross tra damus
3D Media Maker
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Looking to Escape London
Posted: 25th Jan 2013 09:42
Siphon_Studios

This should be in the 'Scripts' Thread just for future reference.

Check out the link below which might help you out:

http://forum.thegamecreators.com/?m=forum_view&t=200589&b=23

Its not what you want but by using the 'Destroy' action in the script for the triggerzone (after the audio has been triggered) the trigger zone can be used no more.
I'm not a scripter but I think you might have to use a 'timer' (etimer) before you use the 'Destroy' action just to allow the audio to begin playing before the Trigger zone is shut down.

Hope this hlps in some way.
BlackFox
FPSC Master
15
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 25th Jan 2013 15:47
Quote: "by using the 'Destroy' action in the script for the triggerzone (after the audio has been triggered) the trigger zone can be used no more."


Correct, the "destroy" action will terminate the script.

Quote: " I think you might have to use a 'timer' (etimer) before you use the 'Destroy' action just to allow the audio to begin playing before the Trigger zone is shut down."


It depends on how it is scripted, etc. It IS better to use an etimer as you suggested, give it a 1 second time, then destroy the script. Even when the script is destroyed, the sound will play to the end then stop.


There's no problem that can't be solved without applying a little scripting.
Siphon_Studios
11
Years of Service
User Offline
Joined: 20th Jan 2013
Location: @ the Mr. Coffee
Posted: 25th Jan 2013 20:54
Ah ok thanks. This makes more sense now. Thanks!
Siphon_Studios
11
Years of Service
User Offline
Joined: 20th Jan 2013
Location: @ the Mr. Coffee
Posted: 25th Jan 2013 21:05
Ok, so if i set the sound zone to have an etimer script, no audio plays and it only terminates the zone after set time. Do i put this on a trigger zone or what?
Siphon_Studios
11
Years of Service
User Offline
Joined: 20th Jan 2013
Location: @ the Mr. Coffee
Posted: 26th Jan 2013 01:12
So im trying to figure out how to script this timer into the "destroy" script. What to i include for the Main script though? and what about the If Used section? It IS a trigger zone and not sound zone, so do i also modify the script to play a specific audio file?

Login to post a reply

Server time is: 2024-04-28 02:40:46
Your offset time is: 2024-04-28 02:40:46