Jump to content
Sign in to follow this  
daimyo21

Playsound custom sounds locally for MP dedicated server?

Recommended Posts

So im trying to get custom sounds to work when a basic zombie attacks the player. It works perfectly in sp following the cfgsounds and using playsound "soundname"; etc.

Heres my script of the zombie who attacks selected unit.

Pay attention to #attack. Once it gets there it plays sound but not when the file is running dedicated.

;	Script für einen Selbstmordattentäter
;	Aufruf:
;	[Attentäter, Opfer] Exec "Options\SMAT.sqs"

_SMAT = _This Select 0
_Target = _This Select 1


@ ((_SMAT KnowsAbout _Target) > 1) || (! (Alive _SMAT))
? (! (Alive _SMAT)) : Goto "Exit"
_SMAT SetUnitPos "Up"
_SMAT SetSpeedMode "Full"
_SMAT SetCombatMode "Red"
_SMAT SetBehaviour "Careless"
_Speak = False

#Loop
_SMAT DoMove GetPos _Target
? ((_SMAT Distance _Target) < 5) || (! (Alive _SMAT)) && (Random 10 > 1) : GoTo "Attack"
? (! (Alive _SMAT)) : Exit
~ (12 + random 1.5)
GoTo "Loop"

#Attack
_SMAT setVehicleInit "playsound 'dead_growl'"
processInitCommands
_Target setDamage (damage _Target + 0.3)
~ 2
GoTo "loop"
Exit

When I run a dedicated in the OA Demo (I have real game but I like making missions that ppl will play, ie newbs whom of which have bought game after playing my missions cause listen servers are horrid to advertise game). The sounds no longer play locally. So I tried this instead

#Attack
_trg=createTrigger["zombie_hiss",getPos _SMAT]; _trg setTriggerArea[10,10,0,false];
_trg setTriggerActivation["west","PRESENT",true];
_trg setTriggerStatements["this", "_SMAT setVehicleInit "playsound 'dead_growl'", "processInitCommands"];
_Target setDamage (damage _Target + 0.3)
~ 2
GoTo "loop"
Exit

Now I dont know if creating a trigger locally would do the trick but how else can I do this for MP? That trigger might be written wrong too as Im not really experinced at all.

I really want my zombies to have scary sounds for demo.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×