Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
6 registered members (TipmyPip, Niels, dBc, Ed_Love, 3run, 1 invisible), 17,843 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Calculating keypress times #487091
01/15/23 13:09
01/15/23 13:09
Joined: Jan 2012
Posts: 108
G
gamers Offline OP
Member
gamers  Offline OP
Member
G

Joined: Jan 2012
Posts: 108
Hi Dear 3DGS Developers,

How can I write a code that will start counting the time when I press the "space key" once, and stop counting the time when I press the "space key" once again, and calculate the distance between the time the space key is pressed.
Can you help with this?
Thanks a lot.

Re: Calculating keypress times [Re: gamers] #487101
01/16/23 17:14
01/16/23 17:14
Joined: May 2009
Posts: 5,377
Caucasus
3run Online
Senior Expert
3run  Online
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
Hey!

I would use 'on_space' event to toggle the boolean variable from false to true. And then would have an additional function with a loop in it, where the timer would run if boolean is toggled to true and stop (show results, or whatever) when boolean is set to false. Read manual about 'on_' functions that could be assigned to a specific key.

Best regards.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Calculating keypress times [Re: 3run] #487102
01/16/23 18:22
01/16/23 18:22
Joined: Jan 2012
Posts: 108
G
gamers Offline OP
Member
gamers  Offline OP
Member
G

Joined: Jan 2012
Posts: 108
Thank you 3run, I'll try this method.


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1