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 / Sounds after "shotdamage" and multiple soundsets?

Author
Message
kms
15
Years of Service
User Offline
Joined: 9th Jan 2009
Location:
Posted: 30th Sep 2009 22:27 Edited at: 30th Sep 2009 22:28
Hey again. I'm back and wondering if it's possible to load multiple soundsets to one character entity. If so, how do I do this? I'm trying to have sounds play based on the current local variable, and it'd be easier to control this through full soundsets than having to add each sound manually into the script.

If not, I wanted to add the sounds individually so that they play when the character is hurt (not the hurt1, hurt2, hurt3 in the soundset). The problem is that I can't get this to work in any of the default scripts like 'pace.fpi'. I try to reference the sound file after the "shotdamage" condition, but nothing plays. I wasn't sure if it was a conflict with the default entity soundset, so I deleted it and still nothing. I'm also sure that it's not my file path because I can get the "sound=" action to work fine on "shotdamage" lines in other scripts. Am I putting the "sound=" action in the wrong place for these main scripts? Where should I be putting it?

Thanks. Any input would be appreciated.
Bibo4PC
16
Years of Service
User Offline
Joined: 17th Oct 2008
Location: Middle Earth
Posted: 1st Oct 2009 15:23
actually the (shotdamage) condition is for entities only not for the player, ur gonna have to use variables to check if the player has been shot..

Bibo4PC
16
Years of Service
User Offline
Joined: 17th Oct 2008
Location: Middle Earth
Posted: 1st Oct 2009 15:26
srry for the double post but it seems I've misunderstood u..

post the script to see what's going wrong..

kms
15
Years of Service
User Offline
Joined: 9th Jan 2009
Location:
Posted: 1st Oct 2009 16:30 Edited at: 1st Oct 2009 16:33
Hey, Bibo4PC. Sorry for the confusion, but yes, I am talking about when the character has been shot. I am not talking about when the player has been shot, so hopefully, "shotdamage" is the way to go. Anyway, as I mentioned, it's just the "pace.fpi" script with the "sound=" action added, so it might be a little hard to find. I tried to bold it, but they wouldn't let me put a bold tag inside a code tag. I also tried adding a separate "shotdamage" line to see if that would make a difference, but it didn't. Thanks for your help!




Bibo4PC
16
Years of Service
User Offline
Joined: 17th Oct 2008
Location: Middle Earth
Posted: 1st Oct 2009 17:34 Edited at: 1st Oct 2009 17:59
just a hint it's always better to make ur own AI in one script only and not use (shootplr) to call the shoot script, it helps keeping track of wuts going on with the overall code and avoid stats confusion..

here's the problem, u have the sound played in the first state which only works when there's no action between the player and the enemy (cause once player is seen the state is changed), so if u shoot the enemy when he hasn't seen u yet it will work, but once he rotates and start shooting the sound won't play anymore..

to solve this the script should be


also note that (sound=) plays the sound from the enemy's position, so if ur far away from him u won't hear any sound..

one more thing, if ur using a machine gun to shoot him everytime he recives damage the sound will stop and play again from the start and that would happen very quickly u'll probably hear the first milli second from the sound file, so u might wanna add a random conditon to overcome that..

hope that helps..

kms
15
Years of Service
User Offline
Joined: 9th Jan 2009
Location:
Posted: 2nd Oct 2009 04:43
Hey Bibo4PC! Thanks for all of your help, but unfortunately, that doesn't seem to work, either. I'm not sure why, since your logic makes good sense to me. Does it work on your machine? I also tried using "3dsound=" instead, even though I was really close, to see if it would make a difference, but it didn't.
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 2nd Oct 2009 05:38
use plrsound=

Bibo4PC
16
Years of Service
User Offline
Joined: 17th Oct 2008
Location: Middle Earth
Posted: 2nd Oct 2009 10:36
@hockeykid: actually (plrsound) works exactly like (sound) except the sound source is the player so it wouldn't work

@kms: my mistake usally deal with AI's in one script only..

u'd have to add the sound line

in the shoot script as well..

kms
15
Years of Service
User Offline
Joined: 9th Jan 2009
Location:
Posted: 22nd Jan 2010 00:14
Hey! I hope I don't get in trouble for bumping this thread, but I thought I already responded to those last posts before taking a forum-hiatus, and it turns out I didn't! I just really wanted to say, "Thank you!" because had indeed worked and I seriously appreciated the help. I also wanted to have it documented as such in case anyone else runs into a similar issue later on and comes across this thread via 'search'. I hate finding a thread with a question and never knowing if the suggestions did anything to fix the problem. (Apologies again, mods, if this was not allowed. I'll be more on-top of responses in the future.)

Login to post a reply

Server time is: 2024-11-25 03:57:28
Your offset time is: 2024-11-25 03:57:28