OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: illmatic on 10 Apr 2004, 20:11:54

Title: player hears sound, not everyone!
Post by: illmatic on 10 Apr 2004, 20:11:54
-------------------------------------------------------------------
#check
?vehicle guy1 == cessna1: goto "takeoff"
~0.2
goto "check"

#takeoff

playsound "takeoff"
-------------------------------------------------------------------
how can i make "guy1" when he enters the "cessna1" only he hears this sound rather than everyone plzzzzzzz, ty if u can help  8) 8) ;D ::)
Title: Re:player hears sound, not everyone!
Post by: Artak on 10 Apr 2004, 20:42:33
-------------------------------------------------------------------
#check
?vehicle guy1 == cessna1: goto "takeoff"
~0.2
goto "check"

#takeoff
?!local guy1: exit
playsound "takeoff"
-------------------------------------------------------------------
Try it like that.
Title: Re:player hears sound, not everyone!
Post by: illmatic on 10 Apr 2004, 23:28:24
still seems to play the sound so everyone can hear it this way too :(:( any other ideas??
Title: Re:player hears sound, not everyone!
Post by: illmatic on 10 Apr 2004, 23:41:35
a guy said the only way it works is with the add action command, how could the script be modifed, i didnt want to request the script via add actions  :-X :-X :-X

errrm..........now someone else has said
      
if u start this script by using [cop1] exec "SCRIPT.sqs" it normally must run only on this person

and that doesnt work..... no effect


----------------------------------
#check
?vehicle cop1 == cessna1: goto "takeoff1"

~0.2
goto "check"

#takeoff1
?!local cop1: exit
playsound "takeoff"
-------------------------------------

is this possible, surely this is a common problem???
Title: Re:player hears sound, not everyone!
Post by: Chris Death on 11 Apr 2004, 01:49:25
ey - you've moved here with your question

anywayz, in your case it should be easy to solve:

?vehicle player == cessna1: goto "takeoff"

This is the only thing you need to change in your script, and
everything should be fine.

player returns only the local player on each client,
so it will only run there, where the player is inside the cessna1

cop1 will be the unit cop1 on each client, but players are there
only one per client  ;)

~S~ CD
Title: Re:player hears sound, not everyone!
Post by: illmatic on 11 Apr 2004, 11:48:45
wow thanks m8, now only the player that enters it can hear the sound, not everyone w000t