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 / Enemy sounds?

Author
Message
SOLO DESIGN
16
Years of Service
User Offline
Joined: 30th Jul 2008
Location:
Posted: 8th Jan 2010 12:59
Hi,
Does anyone know how the following can be acheived -

1. enemy entity in map has x6 vocal sounds attributed to it.

2. I need the sounds to randomly play throughout the game after a specific period, eg. after 5 seconds another sound is selected and played and so on.

3. No sound is played by the enemy once killed.

Also can entity's use sound zones? or just the player?


Thanks I am a noob at scripting
Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 8th Jan 2010 15:23
This will not play the sounds at random but in a sequence. Replace the YOURSOUND parameter with your sound file.

:state=0:timerstart,state=1
:state=1,timergreater=5000:sound=audiobank\YOURSOUND.wav,timerstart,state=2
:state=2,timergreater=5000:sound=audiobank\YOURSOUND2.wav,timerstart,state=3
:state=3,timergreater=5000:sound=audiobank\YOURSOUND3.wav,timerstart,state=4
:state=4,timergreater=5000:sound=audiobank\YOURSOUND4.wav,timerstart,state=5
:state=5,timergreater=5000:sound=audiobank\YOURSOUND5.wav,timerstart,state=6
:state=6,timergreater=5000:sound=audiobank\YOURSOUND6.wav,timerstart,state=1

:healthless=1:state=100
:state=100:stopsound,state=100


FPSC MIGRATION: http://bit.ly/5I8LYO
FPSC NUCLEAR EXPLOSION: http://bit.ly/67v8GI
SOLO DESIGN
16
Years of Service
User Offline
Joined: 30th Jul 2008
Location:
Posted: 10th Jan 2010 14:42
Hi,
Many thanks Marc Steene, I have implemented this but I have an issue with the entity animating now.

All the sounds play without the entity moving.

I put runfpidefault=1 in the code but then the other sounds after this code does not execute.

By the way I am using this script as an init script for an entity.

See below my script :-

;Artificial Intelligence Script

;Header

desc = Init Script (sound, animation)

;Triggers

:state=0,isdarkaiseeing:timerstart,sound=audiobank\user\BERZERK\low\hdis.wav,state=1,runfpidefault=1
:state=1,timergreater=5000:sound=audiobank\user\BERZERK\low\ia.wav,timerstart,state=2
:state=2,timergreater=5000:sound=audiobank\user\BERZERK\low\dth.wav,timerstart,state=3
:state=3,timergreater=5000:sound=audiobank\user\BERZERK\low\tnpgnm.wav,timerstart,state=4
:state=4,timergreater=5000:sound=audiobank\user\BERZERK\low\hsuaaph.wav,timerstart,state=5
:state=5,timergreater=5000:sound=audiobank\user\BERZERK\low\thmne.wav,timerstart,state=6
:state=6,timergreater=5000:sound=audiobank\user\BERZERK\low\rlfhah.wav,timerstart,state=7
:state=7,timergreater=5000:sound=audiobank\user\BERZERK\low\hmbd.wav,timerstart,state=8
:state=8,timergreater=5000:sound=audiobank\user\BERZERK\low\cflar.wav,timerstart,state=1

:healthless=1:state=100
:state=100:stopsound,state=100
;End of Script

where am I going wrong???

Many thanks


SOLO DESIGN
16
Years of Service
User Offline
Joined: 30th Jul 2008
Location:
Posted: 12th Jan 2010 11:27
Hi,
Has anyone figured this out yet?

I think it is because the code asks to runfpidefault=1
and then leaves this script before all can be executed............as I said I think....hahahahahahaha

Perhaps it cannot be done and will have to be attached to a non moving entity to simulate the sounds coming from the enemy...mmmmmmmmmm a work around but not what I intended.

Any thoughts would be very helpful.

Many thanks




Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 12th Jan 2010 13:04
SOLO DESIGN, I got your email but I thought it would be more beneficial for everyone if I posted here instead. The script I created is supposed to be merged with the main script of your enemy.


FPSC MIGRATION: http://bit.ly/5I8LYO
FPSC NUCLEAR EXPLOSION: http://bit.ly/67v8GI
SOLO DESIGN
16
Years of Service
User Offline
Joined: 30th Jul 2008
Location:
Posted: 12th Jan 2010 13:08
ah ok!
The main script is a DARKAI script as I am using X10, so it becomes quite complicated to insert your code but I will have a go and let you know.

Thanks!
SOLO DESIGN
16
Years of Service
User Offline
Joined: 30th Jul 2008
Location:
Posted: 20th Jan 2010 14:03
Well I could never get this working in my main AI script as there was far too many states. So I have a work around that works perfectly I did all x6 voice sounds one after another and created x1 sound sample.

Then played this with a INIT script attached to my enemy model using Loopsound x command and bingo!

Now all enemies can talk/shout at the player when fighting him.

Login to post a reply

Server time is: 2024-11-25 04:00:16
Your offset time is: 2024-11-25 04:00:16