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 Product Chat / holding down a key?

Author
Message
Beastlymaps
15
Years of Service
User Offline
Joined: 17th Nov 2010
Location:
Posted: 11th Dec 2010 21:10 Edited at: 12th Dec 2010 06:37
Hi, beastlymaps here, I was wondering if there was a certain command for holding down a key for activating an entity. Like when you walk up to the entity, you need to hold "enter" for X amount of seconds to activate it. Any help is appreciated, thank you.

-Beastlymaps



-Beastlymaps.webs.com
Plystire
23
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 12th Dec 2010 01:50
A combination of scancodekeypressed and a timer will achieve what you're looking for.

Example:


When the user holds TAB (keycode 15) for 1.5 seconds it will move to state 2, where you can do whatever you needed. If they let go early, it will go back to state 0.


The one and only,


Only those who sow the seeds of their desires will reap their benefits later.
However, I have seeds of my own to tend to. I don't have time to be someone else's watering can.

Login to post a reply

Server time is: 2026-07-03 09:53:38
Your offset time is: 2026-07-03 09:53:38