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
Posts: 3772 Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2
Post
by Deviss » Mon May 17, 2010 11:24 am
hi there
, 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
ABC_music_config.snd
ABC_stream.stm
thanks in advance
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
Posts: 4910 Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA
Post
by AQT » Mon May 17, 2010 5:31 pm
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
Posts: 3772 Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2
Post
by Deviss » Mon May 17, 2010 8:25 pm
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
Posts: 1570 Joined: Wed Dec 10, 2008 7:48 pm
Post
by 501st_commander » Tue May 18, 2010 11:30 am
give him the com_jedi_default or the com_hreo_default odf?
Deviss
Master of the Force
Posts: 3772 Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2
Post
by Deviss » Tue May 18, 2010 11:47 am
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
AQT
Gametoast Staff
Posts: 4910 Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA
Post
by AQT » Tue May 18, 2010 10:29 pm
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
Posts: 3772 Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2
Post
by Deviss » Tue May 18, 2010 10:42 pm
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
StarkillerMarek
Rebel Colonel
Posts: 611 Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.
Post
by StarkillerMarek » Tue May 18, 2010 10:43 pm
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
Posts: 3772 Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2
Post
by Deviss » Tue May 18, 2010 10:46 pm
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
lucasfart
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
Post
by lucasfart » Wed May 19, 2010 5:22 am
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
Posts: 3772 Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2
Post
by Deviss » Wed May 19, 2010 9:40 am
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
501st_commander
Master Bounty Hunter
Posts: 1570 Joined: Wed Dec 10, 2008 7:48 pm
Post
by 501st_commander » Wed May 19, 2010 11:07 am
correct me if I'm wrong, but I dont think "SndcommandoSpawn" exists in the bf2 version of lua.
Deviss
Master of the Force
Posts: 3772 Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2
Post
by Deviss » Wed May 19, 2010 11:28 am
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
StarkillerMarek
Rebel Colonel
Posts: 611 Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.
Post
by StarkillerMarek » Wed May 19, 2010 12:15 pm
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
Posts: 3772 Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2
Post
by Deviss » Wed May 19, 2010 12:25 pm
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?
StarkillerMarek
Rebel Colonel
Posts: 611 Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.
Post
by StarkillerMarek » Wed May 19, 2010 12:26 pm
I don't know exactly, but I will try to look into to if for you
.
Deviss
Master of the Force
Posts: 3772 Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2
Post
by Deviss » Wed May 19, 2010 12:37 pm
StarkillerMarek wrote: I don't know exactly, but I will try to look into to if for you
.
many thanks
, i hope can
myers73
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
Post
by myers73 » Mon May 24, 2010 12:49 am
im pretty sure that hero assault plays the sounds....
Deviss
Master of the Force
Posts: 3772 Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2
Post
by Deviss » Mon May 24, 2010 1:09 am
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
StarkillerMarek
Rebel Colonel
Posts: 611 Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.
Post
by StarkillerMarek » Mon May 24, 2010 10:22 am
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.