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 / script question

Author
Message
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 22nd Nov 2008 04:48
would their be a possible way to play a head shot sound (a guy saying "head shot") right after you get the head shot by using the script below with a few edits if so can i get some tips how? (I know its better to try it your self then have someone to do it for you)
P.S.-I already have the headshot.wav




ww2theaftermathgame.webs.com
work in progress demo coming soon.
Punk13
17
Years of Service
User Offline
Joined: 7th Oct 2007
Location: In EpikLand!
Posted: 22nd Nov 2008 07:05
I'm no scripting wiz infact i just started yesterday getting help from my good friend Rampage but i think if you would add a "sound=" with the file path to the sound in your fpsc folder it might work. But then again i could be wrong

Hope it helps


Xtinction Coming Soon.
Plystire
22
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 22nd Nov 2008 07:45
@Punk13:

That's how you play a 3d sound. A sound for a voice coming in and saying "HEADSHOT!" would probably be best played as a "plrsound".

To get this working you would need some way of detecting when the entity recieved a headshot.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
maikyy
16
Years of Service
User Offline
Joined: 29th Jul 2008
Location: between my front and back door
Posted: 22nd Nov 2008 13:29
hmmmm maybe something for in ply's mod

sorry for my bad english (i am dutch)
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 22nd Nov 2008 15:35 Edited at: 22nd Nov 2008 15:49
ply i figured that if i put plrsound after headshot=1 that it would work because headshot=1 states that the headshot is "true" right?

Remember i'm new to fpi. Here are my two attempts that failed.






ww2theaftermathgame.webs.com
work in progress demo coming soon.
Plystire
22
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 23rd Nov 2008 00:53
"headshot=1" is an action. And actions are there to [/b]do[/b] things. In order to check for something that has happened you will need to use a condition.

Here's what a line of script looks like:
:Conditions:Actions

Notice that the conditions come after the first colon, and the actions come after the second colon.


Also note that there is no "headshot=X" condition, there is only an action for headshots that will tell the engine to allow the entity to recieve a headshot. So, as of right now there is no way of detecting if the entity has received a headshot.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.

Login to post a reply

Server time is: 2025-05-24 13:38:04
Your offset time is: 2025-05-24 13:38:04