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
3 registered members (AndrewAMD, TipmyPip, OptimusPrime), 15,359 guests, and 7 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
Question about keys #211537
06/17/08 07:07
06/17/08 07:07
Joined: Feb 2007
Posts: 53
N
n00bie Offline OP
Junior Member
n00bie  Offline OP
Junior Member
N

Joined: Feb 2007
Posts: 53
Hi,

Code:
problem solved, code deleted


These function is called in the main function. When I press "1" the jingle 1 comes. But when I press Lshift and 1, the jingle 1 comes still instead of jingle 11. What is wrong?

Last edited by n00bie; 06/17/08 07:38.
Re: Question about keys [Re: n00bie] #211541
06/17/08 07:29
06/17/08 07:29
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
NL_3DGS_n00b Offline
Member
NL_3DGS_n00b  Offline
Member

Joined: Jul 2005
Posts: 262
Earth, The Netherlands
I think you have to make a WHILE which checks if the shift key is still down.
As soon as you press shift, it will go through the IF statement once.


The best games are the games you create yourself.
Re: Question about keys [Re: NL_3DGS_n00b] #211543
06/17/08 07:37
06/17/08 07:37
Joined: Feb 2007
Posts: 53
N
n00bie Offline OP
Junior Member
n00bie  Offline OP
Junior Member
N

Joined: Feb 2007
Posts: 53
Thanks, It was a little stupid mistake but it works now smile

Re: Question about keys [Re: n00bie] #211576
06/17/08 11:29
06/17/08 11:29
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
NL_3DGS_n00b Offline
Member
NL_3DGS_n00b  Offline
Member

Joined: Jul 2005
Posts: 262
Earth, The Netherlands
A common mistake.
2 things to keep in mind:

An IF statement, loops only once, IF the conditions match. (Duh :P)

A WHILE loop, loops infinitely until you break the loop within the loop.
OR you can also make a condition in the WHILE so it keeps looping until the conditions don't match.

In your case, keep looping (=> keep checking the keys) as long as the left SHIFT key is on.


The best games are the games you create yourself.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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