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 / Sound Effects When Collecting Health Packs

Author
Message
Callag
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: UK
Posted: 4th Aug 2010 22:51
Can anyone tell me if there is a way of having a .WAV file play when a health pack is collected.I use the "MakeEntitiesFromXFiles" utility to create FPSC compatible entities but the sound file options are not included when using entity type 6 (HEALTH) like they are in others such as doors. Is it possible to write a new "disappear.fpi" file to include a sound when it is used.

Cal
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 5th Aug 2010 01:56
You can alter the main script that the entity is using to have it play a sound.

Open up the script that your health pack uses and look for "playertake" in there. Right next to that, you can add in ",sound=$0"

The "$0" will make it play the sound given to it in its properties (right-click the entity in the Editor after placing on the map to view it's properties)


Hope that all made sense for you.


The one and only,


Callag
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: UK
Posted: 5th Aug 2010 21:10
Thanks for the prompt reply Plystire. In case anyone else is interested I did some digging around and found a script called "Healthuse" containing this line:-

plrsound=audiobank\items\healthup.wav

Changing this will set a new sound for ALL health pickups in your game.

thanks again, Callag

Cal
Insane Arts
15
Years of Service
User Offline
Joined: 19th Sep 2009
Location: Australia
Posted: 9th Aug 2010 08:07
or if you can't be bothered scripting you could place the entity and then a sound/trigger zone over the top? so when you enter the trigger zone (located ontop of the entity) it will play the sound you've selected?

AMD phenom II X2 550 @ 3.1ghz, 4GB Ram, Nvidia 1GB GT240, 3tb of HDD space, Dual monitor setup, Windows Vista Ultimate.

yeah, FPS Creator development charm.

Login to post a reply

Server time is: 2024-11-24 21:38:22
Your offset time is: 2024-11-24 21:38:22