Datguy5
Senior Member
Posts: 629
Threads: 25
Joined: Dec 2011
Reputation:
12
|
RE: Sound not playing
(05-21-2012, 03:52 PM)Putmalk Wrote: (05-21-2012, 03:48 PM)Datguy5 Wrote: (05-21-2012, 03:44 PM)Putmalk Wrote: Hey i3670,
I like your script, it's a bit complicated (than what I'm used to seeing on here) but it seems like it does its job efficiently.
Did you name your areas "WindSound_1", "WindSound_2", etc.?
Are you sure your timer is sounding off properly?
What I would do is add the following lines of code inside your WindTimer function:
AddDebugMessage("Firing WindTimer function", false);
(after the variables are declared)
AddDebugMessage("Playing sound WindSound_"+iWind, false);
Tell me what the results are. Make sure debug messages are enabled for your profile!
(05-21-2012, 03:26 PM)Stepper321 Wrote: iWind? fWind? What the fuck is going on?
He's creating variables to randomize the time and area at which the sounds are played. "fWind" is a float, while "iWind" is an integer; floats are floating point numbers (decimals) while integers are 1, 2, 3, etc. A.K.A. Some pretty nice(and possibly)advanced scripting ![Big Grin Big Grin](https://www.frictionalgames.com/forum/images/smilies/biggrin.gif) Yup, I'll be using that technique in my custom story at some point (when I start to script random events like wind blowing or voice hearing and other stuff). It's a pretty nifty skill to have.
Heres a one way to make random voice hearings and stuff like that.Just place insanity area in the level editor and when the player collides with it(no scripting needed)it will trigger a random insanity effect.I usually hear someone talking and i sometimes get cockroaches in my face too
(This post was last modified: 05-21-2012, 04:49 PM by Datguy5.)
|
|
05-21-2012, 04:48 PM |
|