Player spawn sound (no hero)

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Player spawn sound (no hero)

Post by Deviss »

hi there :D , lastly i am needing more help than usual xD, today is adding spawn sound to units standard no hero but this dont work :S.

commando.odf
Hidden/Spoiler:
[GameObjectClass]
ClassParent = "rep_inf_commando"

[Properties]
GeometryName = "imp_inf_Phase3_Imperial_Commando"
GeometryLowRes = "imp_inf_Phase3_Imperial_Commando_low1"
FirstPerson = "dev\dev;rep_inf_Republic_Clone_Commando_fpm"

MaxShield = 400
AddShield = 5

AnimationName = "elite"

WEAPONSECTION = 1
WeaponName = "rep_weap_DC-17m_Blast"
WeaponAmmo = 8

WEAPONSECTION = 2
WeaponName = "rep_weap_DC-17m_Anti_Armor"
WeaponAmmo = 4

WEAPONSECTION = 3
WeaponName = "rep_weap_DC-17m_Sniper_Rifle"
WeaponAmmo = 5

WEAPONSECTION = 4
WeaponName = "rep_weap_DC-15_Side_Arm"
WeaponAmmo = 0

WEAPONSECTION = 5
WeaponName = "rep_weap_inf_detpack"
WeaponAmmo = 3
WeaponChannel = 1

WEAPONSECTION = 6
WeaponName = "rep_weap_inf_sonicgrenade"
WeaponAmmo = 3
WeaponChannel = 1

WEAPONSECTION = 7
WeaponName = "com_weap_melee_attack"
WeaponAmmo = 0
WeaponChannel = 1

SndHeroSpawned = "delta38_spawn"
ABC_music_config.snd
Hidden/Spoiler:
SoundStreamProperties()
{
Name("delta38_spawn");
Group("hero_vo");
Inherit("Hero_battle_chatter_template");
Stream("ABC_stream");
SegmentList()
{
Segment("spawn_D38MK003", 200.0, 10.0, 3.0); // General Kenobi, reporting for duty.
Segment("spawn_D38ZZ016", 200.0, 10.0, 3.0); // Obi-Wan Kenobi here, I've engaged the enemy.
}
}
ABC_stream.stm
Hidden/Spoiler:
streams\spawn_D38MK003.wav -resample pc 22050
streams\spawn_D38ZZ016.wav -resample pc 22050
thanks in advance :P
NOTE: yeah sounds in lua etc are right setting because others sounds work fine :)
Last edited by Deviss on Thu May 20, 2010 12:02 am, edited 2 times in total.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: player spawn sound (no hero)

Post by AQT »

Everything looks right but I think the sound will only play if you set commando as a hero unit in your LUA.
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: player spawn sound (no hero)

Post by Deviss »

AQT wrote:Everything looks right but I think the sound will only play if you set commando as a hero unit in your LUA.
i put him as hero so i have 2 heroes and now spawn sound work fine, but there is anyway (ihope no hardcoded) for make commando class have special atributes the same hero?
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: Player spawn sound (no hero)

Post by 501st_commander »

give him the com_jedi_default or the com_hreo_default odf?
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Player spawn sound (no hero)

Post by Deviss »

501st_commander wrote:give him the com_jedi_default or the com_hreo_default odf?
dont work :( , anyway thanks by the idea, look nice the commando in new pose when is killed :D
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Player spawn sound (no hero)

Post by AQT »

It has to be hard-coded then. The ODF parameter even hints that the sound will only play when a unit spawns as a hero.
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Player spawn sound (no hero)

Post by Deviss »

AQT wrote:It has to be hard-coded then. The ODF parameter even hints that the sound will only play when a unit spawns as a hero.
so this topic can to be locked
solution: put unit as hero xD
User avatar
StarkillerMarek
Rebel Colonel
Rebel Colonel
Posts: 611
Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.

Re: Player spawn sound (no hero) [Solved]

Post by StarkillerMarek »

I don't know too much about this, but you could set the Lua up to play a specific sound/music when you spawn as a hero, I think.
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Player spawn sound (no hero) [Solved]

Post by Deviss »

StarkillerMarek wrote:I don't know too much about this, but you could set the Lua up to play a specific sound/music when you spawn as a hero, I think.
yeah but as hero, so yes or yes i need unit as hero :(
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: Player spawn sound (no hero) [Solved]

Post by lucasfart »

I'm no expert but couldn't you make it a unit, check on spawn to see if the unit is your commando, and play the sound if it is???

It sounds like it would work, i'm just not sure how to make the sound play.....
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Player spawn sound (no hero) [Solved]

Post by Deviss »

lucasfart wrote:I'm no expert but couldn't you make it a unit, check on spawn to see if the unit is your commando, and play the sound if it is???

It sounds like it would work, i'm just not sure how to make the sound play.....
i am a bit silly, how i make that :) ?

i tried also changing class to commando as in lua appear:

SndcommandoSpawned = "delta38_spawn"
but dont worked :P
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: Player spawn sound (no hero) [Solved]

Post by 501st_commander »

correct me if I'm wrong, but I dont think "SndcommandoSpawn" exists in the bf2 version of lua.
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Player spawn sound (no hero) [Solved]

Post by Deviss »

501st_commander wrote:correct me if I'm wrong, but I dont think "SndcommandoSpawn" exists in the bf2 version of lua.
dont exist but how original is sndherospawn so i changed hero to the real class i use in this case commando :) , yeah was one of my strange ideas xD
User avatar
StarkillerMarek
Rebel Colonel
Rebel Colonel
Posts: 611
Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.

Re: Player spawn sound (no hero) [Solved]

Post by StarkillerMarek »

StarkillerMarek wrote:I don't know too much about this, but you could set the Lua up to play a specific sound/music when you spawn as a hero, I think.
Oops, I meant spawn as any unit. As in, have the lua check to see what unit class you are, and then if you spawn and are that certain unit class, play an ingame sound.
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Player spawn sound (no hero) [Solved]

Post by Deviss »

StarkillerMarek wrote:
StarkillerMarek wrote:I don't know too much about this, but you could set the Lua up to play a specific sound/music when you spawn as a hero, I think.
Oops, I meant spawn as any unit. As in, have the lua check to see what unit class you are, and then if you spawn and are that certain unit class, play an ingame sound.
yeah but how i modify the lua for make that XD?
User avatar
StarkillerMarek
Rebel Colonel
Rebel Colonel
Posts: 611
Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.

Re: Player spawn sound (no hero) [Solved]

Post by StarkillerMarek »

I don't know exactly, but I will try to look into to if for you :wink: .
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Player spawn sound (no hero) [Solved]

Post by Deviss »

StarkillerMarek wrote:I don't know exactly, but I will try to look into to if for you :wink: .
many thanks ;) , i hope can :)
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Re: Player spawn sound (no hero)

Post by myers73 »

im pretty sure that hero assault plays the sounds....
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Player spawn sound (no hero)

Post by Deviss »

myers73 wrote:im pretty sure that hero assault plays the sounds....
what you mean xD? when i spawn in hero assault using boba or vader they havent spawn sound :S
User avatar
StarkillerMarek
Rebel Colonel
Rebel Colonel
Posts: 611
Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.

Re: Player spawn sound (no hero)

Post by StarkillerMarek »

Code: Select all

OnCharacterSpawn: function(player)
         if GetEnityClass(player) == FindEnityClass("commandoclassnamehere") then
         ScriptCB_SndPlaySound("commandospawnsound")
       end
end
This is what I think will work, by the way. I am not sure that it will work, and I'd appreciate it if someone could correct me if I am wrong.
Post Reply