OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Zayfod on 10 Jun 2003, 12:49:28
-
I would like to introduce a sound as an addon when in MP it is only heard by one of the players. Ive thought through many options and Im stumped so far. ???
The sound will be the sonic crack (not the whiz) when the bullet flies past the players head. Its all set and ready to go cept at the moment every bugger on the map hears the crack when any bullet flies past anyones head (which aint right).
If I can find a way to make it so only the guy that gets the "close shave" hears the crack then all will be sweet.
Also offered in the addon will be delayed sound of the actuall flying bullet (this time im talkin about the whiz).
Help needed urgently on this one.
All suggestions appreciated.
Zay out
-
Hey Zay,
what about instantly set'possing a gamelogic
to the bullet and let the: gamelogic say "soniccrack"
Or do it with a trigger with a specified radius (let's say 5 meters)
and use the trigger effect's menu to yell that sound.
Off course u need to setpos the trigger like suggested
for the gamelogic above.
Or you could try to check the distance from bullet to the player
and let the bullet itself: bullet say "soniccrack"
haven't tried that yet for myself, but maybe you find summit helpful here.
~S~ CD
-
Hey Chriss nice to see ya mate. ;D
Yup yup but thats not the problem dude. I already have all that sorted. The crack is all working fine BUT everyone hears it.
It sould ONLY be heard by the guy who has the bullet pass his head.
But I have an idea that im putting to the addon society. Uses vehicleradio. Have a look in the addons ideas in about 5 mins dude Ill finish the post there.
See if we can trick the game into thinking the player is in an imaginary vehicle then we can use vehicleradio for the crack sound and no one else will hear it
hope its possible
-
Hi Zayfod, make sure the sound is only played on the computer that is nearest the bullet. If you need help doing this I will try to help you in a while.
RED
-
Hi red,
hmm yeah if we locally camcreate a logic it might work. ;D
Ever since create vehicle came out Ive forgotten about camcreate but it might work for this purpose.
The other computers shouldnt hear it. Is this correct?
Zay out
-
Yes that should work in theory :) give it a go.
RED
-
hmm - what about exec'ing a script and passing the
unit (player name) who should hear the sound with?
like: w1 matches the condition to receive the soniccrack,
then: [w1] exec "socra.sqs"
;<socra.sqs>
?!(local w1): exit
blablabla "soniccrack"
exit
I'm not sure, wether the other clients will hear the sound
or not (still not tried this yet).
What i still remember from one of my first missions is:
I've had a trigger with a 20/20 meter radius (covering a house
and a garden and a few meters around). The trigger was
activated by west/present and in the trigger effects menu
i was using the BIS dog sounds to simulate some "anti-postman-weapon" ;D combined with russians being alerted
by the dog.
Now whenever anybody of the west players has entered
the trigger area, the dog's sound appeared only for players
inside the trigger area, not for those outside.
This looks to me, as the trigger becomes local to the clients
inside its area and remains remote for those outside the
trigger.
Therefore i suggested above that you could try it with a trigger
following the bullet.
:note - the situation above i've made with OFP 1.3, so i also
don't really know if this trigger-area local/remote thingy
has already been fixed by BIS, as i've always used ways to
get around this problem sine that time.
~S~ CD
-
Sounds like a nice workaround but he can't use triggers for what he is doing as it is going to be part of an addon.
Anymore ideas? camcreating a gamelogic should work, I will try it later.
RED
-
Is it possible to change the volume the sonic crack sound is played at for every guy except the one that the bullet flies by? That way you could make it play so quite that it isn't even heard by the people that shouldn't hear the sonic crack. The one that does hear it plays at normal sound level.