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
EDIT Question about light #203485
04/22/08 12:55
04/22/08 12:55
Joined: Feb 2007
Posts: 53
N
n00bie Offline OP
Junior Member
n00bie  Offline OP
Junior Member
N

Joined: Feb 2007
Posts: 53
Hi,

With the Lite-c tutorial (who is very usefull) I've created my own menu. Except one thing: the user must open the menu anytime with the escape key. This won't work. The script:

 Code:
*solved*


What's wrong?


Last edited by n00bie; 04/24/08 13:24.
Re: Problem with panels... [Re: n00bie] #203493
04/22/08 14:08
04/22/08 14:08
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline
Serious User
PadMalcom  Offline
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
Try instead of "Achterground_1280X1024.falgs = VISIBLE"

"set(Achterground_1280X1024,VISIBLE);"

Re: Problem with panels... [Re: PadMalcom] #203500
04/22/08 14:24
04/22/08 14:24
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Your flag definition is alright. But you have to place "on_esc = open_menu;
" inside a function, e.g. the main function or start_simulate. Event definitions are not allowed outside functions in Lite-C.


Always learn from history, to be sure you make the same mistakes again...
Re: Problem with panels... [Re: Uhrwerk] #203548
04/22/08 18:14
04/22/08 18:14
Joined: Feb 2007
Posts: 53
N
n00bie Offline OP
Junior Member
n00bie  Offline OP
Junior Member
N

Joined: Feb 2007
Posts: 53
 Originally Posted By: Uhrwerk
Your flag definition is alright. But you have to place "on_esc = open_menu;
" inside a function, e.g. the main function or start_simulate. Event definitions are not allowed outside functions in Lite-C.


Thanks! Before I used C-lite I've worked many years with C-script \:\)

Re: Problem with panels... [Re: n00bie] #203833
04/24/08 13:23
04/24/08 13:23
Joined: Feb 2007
Posts: 53
N
n00bie Offline OP
Junior Member
n00bie  Offline OP
Junior Member
N

Joined: Feb 2007
Posts: 53
A new question in this topic:

What's wrong with this while I convert it from C-script to Lite-C?

 Code:
action stroboscoop ()
{
	my.lightrange = 600;
	set(my,LIGHT);
	while (1)
	{
	if(key_space == 0)
		{
			my.red = 0;
			my.blue = 0;
			my.green = 0;
		}
	if(key_space == 1)
		{
			my.red = 255;
			my.blue = 255;
			my.green = 255;
			
			wait(-0.075)
			
			my.red = 0;
			my.blue = 0;
			my.green = 0;
			
			wait(-0.075)
		}
	}
	wait(1);
}


Re: Problem with panels... [Re: n00bie] #203858
04/24/08 16:13
04/24/08 16:13
Joined: Apr 2007
Posts: 582
Germany
Poison Offline
User
Poison  Offline
User

Joined: Apr 2007
Posts: 582
Germany
 Code:
action stroboscoop ()
{
	my.lightrange = 600;
	set(my,LIGHT);
	while (1)
	{
	if(key_space == 0)
		{
			my.red = 0;
			my.blue = 0;
			my.green = 0;
		}
	if(key_space == 1)
		{
			my.red = 255;
			my.blue = 255;
			my.green = 255;
			
			wait(-0.075)
			
			my.red = 0;
			my.blue = 0;
			my.green = 0;
			
			wait(-0.075)
		}
         wait(1); //<------------ That was your failure	
         }
	
}


You forgot to set wait(1) into the while loop.


Everything is possible, just Do it!
Re: Problem with panels... [Re: Poison] #203940
04/25/08 06:33
04/25/08 06:33
Joined: Feb 2007
Posts: 53
N
n00bie Offline OP
Junior Member
n00bie  Offline OP
Junior Member
N

Joined: Feb 2007
Posts: 53
EDIT: solved

Last edited by n00bie; 04/25/08 07:27.

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