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 / Checking for key press only once

Author
Message
Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 29th Jan 2007 01:14
I have a script for a locked door that plays a sound if you use the USE key to try and open it



pretty simple, the problem is that if the player holds down the use key, the sound is played constantly and rapidly. What do I need to add so the player has to take his finder of the USE key and press it again.

Thanks.


xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 29th Jan 2007 01:26
:state=0,plrdistwithin=60,plrusingaction=1:sound=$0,state=2
:state=2,plrusingaction=0:state=0

I'm sorry, my answers are limited. You must ask the right question.

Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 29th Jan 2007 01:37
right, your saying after the player presses USE, go to state 2 and then check if the player isn't pressing USE, otherwise don't go anywhere. Is that correct?


xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 29th Jan 2007 01:39
Bingo!

I'm sorry, my answers are limited. You must ask the right question.

Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 29th Jan 2007 01:46
WooHoo! Lookout scripting, here I come!

Thanks xplosys.


Login to post a reply

Server time is: 2024-11-23 11:22:09
Your offset time is: 2024-11-23 11:22:09