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 / [LOCKED] FPSC advanced hurt script HELP!!!!!!!!

Author
Message
FPS USER
13
Years of Service
User Offline
Joined: 23rd Dec 2010
Location: Lithuania
Posted: 31st May 2011 15:47
OK... I need an [fpi] (FPS Creator) script that would play different hurt sounds.
EX.: if life==100% start random sound (hurt1, hurt2, hurt3)
if life==60 < >100% start random sound (hurt4, hurt5, hurt6)
if life==20 < >60% start random sound (hurt7, hurt8, hurt9)
if life==0 < >20% start random sound (hurt10, hurt11, hurt12)
it means that if players life are lower than 100% but more than 60%, the program should start random sound of hurt4, hurt5, hurt6...
I am creating FPS game called Robin Hood Is Robin My Hood.
So I want to create some variety...
Cose strange sounds from FPSC Sound Folder like [tsssss] sounds superb strange...
I love you fellas
Please help

P.S By the way. I know the way with replacing hurt1, hurt2 and hurt3 files... I need more variety...
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 31st May 2011 22:10
Quote: "Robin Hood Is Robin My Hood"


Has to be the greatest title for a game. EVER! I almost choked laughing when I read it.

Since you made me chuckle, I'll have a go at the script for you.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 31st May 2011 22:55
I've got bad news:

What you want is not actually possible. The player is limited to a maximum of three hurt sounds and the order of these sounds cannot be altered via fpi scripts.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 31st May 2011 23:51
What about the random command?

God help me, Please.

Come on down to my site [href]http://unleashfps.webs.com/]Unleashed FPSCreators[/href]
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 1st Jun 2011 00:06
Unfortunately it's not the random command that's the issue here, it's the way FPSC plays sounds.

In order for the sound to be always at the player's location we need to use the "plrsound=" command. The other sound commands "sound=" and "music" are not suitable: "sound=" can play other sound files, but they are 'placed' at the location of the entity running the script so if the player were to far away from the entity running the script, the hurt sounds would not be heard. "music=" plays the sound at the player's location, but loops the sound continuously.

Because of limitations of "sound=" and "music=" the only option is to use "plrsound=", but this command is limited to only playing sounds within the sound set for the player. There are only 9 sounds in a player's sound set, 3 of which are hurt sounds. So the best we could do is randomly play 3 hurt sounds. However, our headaches don't end there.

The player's sound set is also played automatically when the player is hurt, so even if we were to randomly play a hurt sound, the game would actually play two hurt noises, one automatic and one driven by the script. Which, frankly, would sound awful.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
Wraith Staff
17
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: Hamilton, OH
Posted: 1st Jun 2011 00:30 Edited at: 1st Jun 2011 00:31
Use the sound command and build it into setuplevel.fpi That's what I always do

New sig in the process of being made
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 1st Jun 2011 00:43
Good point Wraith Staff.

Here's the script I cam up with anyway:



You will also need to make blank hurt sounds within the player's sound set otherwise they will still play when you take a hit.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
FPS USER
13
Years of Service
User Offline
Joined: 23rd Dec 2010
Location: Lithuania
Posted: 2nd Jun 2011 14:16
1. Thankyou for your commennts, i am very graitfull...
2. Is this script purelly working?
3. Where to add this script in the setuplevel.fpi?
4. Sorry for my bad english... I am from Lithuanija...
Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 10th Jun 2011 19:29
Please read this thread.

I reject your reality and substitute my own...

Login to post a reply

Server time is: 2024-11-24 08:55:53
Your offset time is: 2024-11-24 08:55:53