Hello guys, today i want to know how i can play a sound after a player use a trigger. I also need to know how i can convert the sounds or something like this and where i have to place the soundfile.
If you want scripts / features made for you, then contact me by PM or email / skype etc it will cost you tho so if you have no intention of reciprocating don't even waste my time
that way all u need is the soundallieas name and the origin
From what I've read in 3archs scripts playsoundatposition is really only used for playing sounds on players. Or at least that's the only time they use it in _ambientPackage.
From what I've read in 3archs scripts playsoundatposition is really only used for playing sounds on players. Or at least that's the only time they use it in _ambientPackage. ive never seen this. When you say it makes models spawn randomly what do you mean exactly?
they use for the blockers that u buy.. _zombiemode_blockers.gsc:438 _zombiemode_blockers_new.gsc:197 _zombiemode_dogs.gsc:316
this is the best method for 3d sounds... but 2d sounds i recommend playsound()
in the video I will show you how you need to convert the sound file and where you need to place them and also I have a simple script made that you can use it.
I will explain all that in the video and maybe more
they use for the blockers that u buy.. _zombiemode_blockers.gsc:438 _zombiemode_blockers_new.gsc:197 _zombiemode_dogs.gsc:316
this is the best method for 3d sounds... but 2d sounds i recommend playsound()
from looking at _ambientpackage and those 3 scripts i dont think it matters between 2d and 3d sounds. it looks is it is based on a combination of scripter preference and if said scripter wants the thread to stop and wait for the sound to end or not
From what I've read in 3archs scripts playsoundatposition is really only used for playing sounds on players. Or at least that's the only time they use it in _ambientPackage. ive never seen this. When you say it makes models spawn randomly what do you mean exactly?
trust me it does, took me forever to find out why a random zombie pair of legs kept appearing at my pap - that was why
same thing happened to sethnorris, again by playing his sound during firesales on the trigger
i trust you, it just sounds really weird for an engine function to randomly spawn models like that. but then again it is WAW so lots of weird things happen with the engine
i trust you, it just sounds really weird for an engine function to randomly spawn models like that. but then again it is WAW so lots of weird things happen with the engine
I think its coz it cannot use a trigger to do it, so spawns a ent so it can - and assigns a random model
is a bit strange. Looks like it spawns an entity near origin (0,0,0) and only plays the sound at that origin instead of the specified entity. Perhaps its because i'm using trigger_radius's for triggers... not really sure TBH.
You can try play_sound_on_entity...
Quote
I think its coz it cannot use a trigger to do it, so spawns a ent so it can - and assigns a random model
Sounds more like an extremely bad script runtime error screwing with the engine.
Had something random like that happen WAY back when i started scripting and didn't know anything - tried creating an alternate power switch and it would always become an STG or FG42 buy trigger, was like: "WTF!?". The trigger had literally nothing to do with the weapon buy trigs and wasn't anywhere near them.
Turns out it was because I didn't have the actual power switch in the map... or atleast that fixed the trigger bug.
i trust you, it just sounds really weird for an engine function to randomly spawn models like that. but then again it is WAW so lots of weird things happen with the engine
Assuming your talking purely scripting...
99% of that is from people not debugging their scripts and running code on undefined entities/objects(script runtime errors) or general logic fails. That is entirely on the person who made the code, not the engine. Given how bad some of the scripts people use are at times, I'm shocked the CoD engine doesn't implode more often.
is a bit strange. Looks like it spawns an entity near origin (0,0,0) and only plays the sound at that origin instead of the specified entity. Perhaps its because i'm using trigger_radius's for triggers... not really sure TBH.
You can try play_sound_on_entity...
Sounds more like an extremely bad script runtime error screwing with the engine.
Had something random like that happen WAY back when i started scripting and didn't know anything - tried creating an alternate power switch and it would always become an STG or FG42 buy trigger, was like: "WTF!?". The trigger had literally nothing to do with the weapon buy trigs and wasn't anywhere near them.
Turns out it was because I didn't have the actual power switch in the map... or atleast that fixed the trigger bug.
Assuming your talking purely scripting...
99% of that is from people not debugging their scripts and running code on undefined entities/objects(script runtime errors) or general logic fails. That is entirely on the person who made the code, not the engine. Given how bad some of the scripts people use are at times, I'm shocked the CoD engine doesn't implode more often.
there was nothing wrong with mine or seths code, was literally just caused by calling play sound on a trigger use...
You may notice in treyarchs scripts they never play a sound "on" a trigger - possibly because of this. This is how I worked it out, spawn a ent to play on now and it's fine
Play sound at position is what treyarch do tho yea, just means it has to finish, can't end it early
Last Edit: March 30, 2016, 11:02:51 pm by Harry Bo21