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 / Counter Strike Like Bomb Script

Author
Message
GraPix
User Banned
Posted: 3rd Jun 2010 16:43
Hey,

I'm making a counter strike like bomb defusable script, but I don't know how to check if player is pressing the key continuaslly or not.

In more detail:

Like in CS, to defuse bomb, you have to keep pressing a button to defuse the bomb (a bar will appear). SCANCODEKEYPRESSED=X command I think checks only if a person taps the button.

Any suggestion?
DiDiT
15
Years of Service
User Offline
Joined: 30th May 2010
Location: England
Posted: 3rd Jun 2010 21:27 Edited at: 3rd Jun 2010 22:12
uh... If you've got fenix mod, I think that has a command to see if the button has been released, you could have that restart the script.

Let me check...


Edit: Yeah, fenix mod has 'keypressed= x y', 'y' being either '1' for the button being pressed or '0' for the button being released.
so, something like this:



That work for you?

Yeah, It was me... :3
GraPix
User Banned
Posted: 5th Jun 2010 10:16
I don't have fenix Is there a way to do that in Project Blue?

Thanks for your time anyway!
Marc Steene
FPSC Master
19
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 5th Jun 2010 12:13
Quote: "Is there a way to do that in Project Blue?"


The condition is the same for both Fenix Mod and Project Blue (keypressed=X X).


[b]FPSC MIGRATION: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21
GraPix
User Banned
Posted: 7th Jun 2010 17:08
Quote: "
The condition is the same for both Fenix Mod and Project Blue (keypressed=X X)."


Okay thanks for confirming!

Quote: "uh... If you've got fenix mod, I think that has a command to see if the button has been released, you could have that restart the script.

Let me check...


Edit: Yeah, fenix mod has 'keypressed= x y', 'y' being either '1' for the button being pressed or '0' for the button being released.
so, something like this:

+ Code Snippet

;DiDiT's horrendously written yet simple hold-button script.
;Note: NEEDS fenix mod.

:state=0,keypressed=28 1:timerstart,state=1
:activated=0,keypressed=28 0:timerstart,state=0
:state=1,keypressed=28 1,timergreater=15000:state=2
:state=2:activate=1,state=3



That work for you?"


yeah, it worked! Thanks A bunch

Login to post a reply

Server time is: 2025-05-31 02:11:42
Your offset time is: 2025-05-31 02:11:42