Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Play a sound when the player is seen, but only once...but it's not working?!

Author
Message
PsychoPop
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location:
Posted: 15th Jan 2010 01:31
Alright, I have a script that is supposed to play a "hey! you!" sound or something similar when the player is seen. This works, but the problem is, the "hey! you!" is played EVERY time the player is seen...so I end up hearing it several times before the enemy dies. I've been tinkering with the script for a while, and I currently have this:



local variable 1 has not been mentioned or touched outside of this area...so what's the problem?
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 16th Jan 2010 04:52
This bit of code is a bit redundant:


Whether localvar 1 is equal to 1 or 0, it has the same outcome... it goes to state 3.

Since all variables are defaulted to a value of 0... I'm thinking that it MUST be set to something somewhere else in your script.

Would you mind posting the entire script here so we can take a look?

There might also be other concerns as to why it's doing what it's doing, such as mistyping a state value or whatnot.


The one and only,


PsychoPop
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location:
Posted: 16th Jan 2010 05:15
Here's the entire thing.

Login to post a reply

Server time is: 2024-11-25 03:55:53
Your offset time is: 2024-11-25 03:55:53