Gamestudio Links
Zorro Links
Newest Posts
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
Release 2.68 replacement of the .par format
by Martin_HH. 09/23/25 20:48
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
1 registered members (dBc), 17,435 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
need a bit of help! #316874
03/27/10 13:49
03/27/10 13:49
Joined: Feb 2010
Posts: 457
Norfolk,England
mikaldinho Offline OP
Senior Member
mikaldinho  Offline OP
Senior Member

Joined: Feb 2010
Posts: 457
Norfolk,England
how would you make a button start the game if it is pressed?

is it a function?

Re: need a bit of help! [Re: mikaldinho] #316877
03/27/10 14:09
03/27/10 14:09
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
Yes you can define a function, and then pass it as the 'FunctionClick' parameter in your button defintion.

If you want to suspend the game from running until the button is pressed, you can use a simple variable and a while loop in the main function...
Code:
var start_game = 0;

function main()
{
while(start_game==0){wait(1);}
...
// start game bla bla
}


Then your function attached to the button will simply set this variable to 1.

Last edited by DJBMASTER; 03/27/10 16:21.
Re: need a bit of help! [Re: DJBMASTER] #316896
03/27/10 15:54
03/27/10 15:54
Joined: Feb 2010
Posts: 457
Norfolk,England
mikaldinho Offline OP
Senior Member
mikaldinho  Offline OP
Senior Member

Joined: Feb 2010
Posts: 457
Norfolk,England
thanks DJBMASTER! that will help me out with my project.


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