Page 1 of 3
Player spawn sound (no hero)
Posted: Mon May 17, 2010 11:24 am
by Deviss
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

Re: player spawn sound (no hero)
Posted: Mon May 17, 2010 5:31 pm
by AQT
Everything looks right but I think the sound will only play if you set commando as a hero unit in your LUA.
Re: player spawn sound (no hero)
Posted: Mon May 17, 2010 8:25 pm
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?
Re: Player spawn sound (no hero)
Posted: Tue May 18, 2010 11:30 am
by 501st_commander
give him the com_jedi_default or the com_hreo_default odf?
Re: Player spawn sound (no hero)
Posted: Tue May 18, 2010 11:47 am
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

Re: Player spawn sound (no hero)
Posted: Tue May 18, 2010 10:29 pm
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.
Re: Player spawn sound (no hero)
Posted: Tue May 18, 2010 10:42 pm
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
Re: Player spawn sound (no hero) [Solved]
Posted: Tue May 18, 2010 10:43 pm
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.
Re: Player spawn sound (no hero) [Solved]
Posted: Tue May 18, 2010 10:46 pm
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

Re: Player spawn sound (no hero) [Solved]
Posted: Wed May 19, 2010 5:22 am
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.....
Re: Player spawn sound (no hero) [Solved]
Posted: Wed May 19, 2010 9:40 am
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

Re: Player spawn sound (no hero) [Solved]
Posted: Wed May 19, 2010 11:07 am
by 501st_commander
correct me if I'm wrong, but I dont think "SndcommandoSpawn" exists in the bf2 version of lua.
Re: Player spawn sound (no hero) [Solved]
Posted: Wed May 19, 2010 11:28 am
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
Re: Player spawn sound (no hero) [Solved]
Posted: Wed May 19, 2010 12:15 pm
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.
Re: Player spawn sound (no hero) [Solved]
Posted: Wed May 19, 2010 12:25 pm
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?
Re: Player spawn sound (no hero) [Solved]
Posted: Wed May 19, 2010 12:26 pm
by StarkillerMarek
I don't know exactly, but I will try to look into to if for you

.
Re: Player spawn sound (no hero) [Solved]
Posted: Wed May 19, 2010 12:37 pm
by Deviss
StarkillerMarek wrote:I don't know exactly, but I will try to look into to if for you

.
many thanks

, i hope can

Re: Player spawn sound (no hero)
Posted: Mon May 24, 2010 12:49 am
by myers73
im pretty sure that hero assault plays the sounds....
Re: Player spawn sound (no hero)
Posted: Mon May 24, 2010 1:09 am
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
Re: Player spawn sound (no hero)
Posted: Mon May 24, 2010 10:22 am
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.