Scripts / On Death Sound

Author
Message
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 25th Sep 2019 11:43
I have been looking at the ai scripts, trying to figure this out. I would like to make my characters make noises when they are hurt and when they die. I am not sure how to go about it.

Any help would be much appreciated.
Julian - increasingly disillusioned and jaded
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 25th Sep 2019 19:25
In theory you simply choose a sound set for the character, in the sound set there are sound samples for different events, look in audiobank\character\male for example.
Been there, done that, got all the T-Shirts!
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 26th Sep 2019 13:33
OK. Thanks. I'll try.
Julian - increasingly disillusioned and jaded
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 26th Sep 2019 14:26
I can't seem to get the soundset field to do anything. Do I also need to use the sound1, 2, 3,...?
Julian - increasingly disillusioned and jaded
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 26th Sep 2019 19:43
It might also rely on the AI scripts to be compatible, which AI scripts are you using?
Been there, done that, got all the T-Shirts!
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 27th Sep 2019 17:58
ai_solder.lua
Julian - increasingly disillusioned and jaded
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 27th Sep 2019 18:17 Edited at: 27th Sep 2019 18:19
Aha, seems that when Lee re-did the ai scripts he changed the sound handling as well. The ai now uses sound slots 3 & 4 for the 'hurt' sound, basically it just chooses one at random.

There isn't a death sound though.

According to the script this is the sound mapping:
-- sound0 : Start moving A
-- sound1 : Start strike
-- sound2 : Start moving B
-- sound3 : Get hurt A
-- sound4 : Get hurt B
Been there, done that, got all the T-Shirts!
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 27th Sep 2019 22:55
OK, thanks. Shame the death sound bit was removed. I wonder if there's any way to reinstate it.
Julian - increasingly disillusioned and jaded
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 27th Sep 2019 23:33
Sure. Individual script attached to any always active object when
your selected characters die. (health <1) play sound

I couldn't even find ai_solder.lua anywhere, but you can look there
to see how the sounds are triggered.
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 28th Sep 2019 12:08 Edited at: 28th Sep 2019 12:57
ai_soldier.lua should be in your scriptbank.

It uses the ai/module_combatcore.lua 'module' so in the top of that script you will find all the animations and sounds listed.

I'll look into the soundset stuff and see if I can figure out if it still works.

Ok, so the soundset system does work:


The attached script simply plays a random soundset entry when you approach and resets when you walk away.
Demonstrates in as simple a way as I can think of how soundsets work.

By default GG loads the 'soldier' soundset, I'm not sure why Lee stopped using this system in the ai modules but it shouldn't be too hard to put it back in.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 28th Sep 2019 15:37
Like this?

Been there, done that, got all the T-Shirts!
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 28th Sep 2019 16:01
Thanks all. That should give me everything I need to get it working,
Julian - increasingly disillusioned and jaded
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 28th Sep 2019 16:04
These will help.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM

Login to post a reply

Server time is: 2024-12-22 08:53:14
Your offset time is: 2024-12-22 08:53:14