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
Creating panels in a loop #200842
04/05/08 20:18
04/05/08 20:18
Joined: Aug 2006
Posts: 652
Netherlands
bstudio Offline OP
User
bstudio  Offline OP
User

Joined: Aug 2006
Posts: 652
Netherlands
This is the code I use:
 Code:
PANEL* currentBrick;

void createBricks(int bricksNum){
	var i;
	for(i=0; i<bricksNum; i++){
		var newPos = i*40;
		PANEL* currentBrick = {
			pos_x = 0;
			pos_y = 0;
			bmap = "brick.tga";
		}
		set(currentBrick, VISIBLE);
	}
}


Is this even possible or do I need to create a seperate panel for each brick? apperantly I also cannot use a variable for the x position. It gives me the error: number syntax newPos

Last edited by bstudio; 04/05/08 20:19.

BASIC programmers never die, they GOSUB and don't RETURN.
Re: Creating panels in a loop [Re: bstudio] #200843
04/05/08 20:23
04/05/08 20:23
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
check out the pan_create function


3333333333
Re: Creating panels in a loop [Re: Quad] #200844
04/05/08 20:24
04/05/08 20:24
Joined: Aug 2006
Posts: 652
Netherlands
bstudio Offline OP
User
bstudio  Offline OP
User

Joined: Aug 2006
Posts: 652
Netherlands
Ugh, to think I didn't find that in the manual. Thanks a lot.


BASIC programmers never die, they GOSUB and don't RETURN.

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