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 (NewbieZorro, TipmyPip, 1 invisible), 19,045 guests, and 8 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
Page 2 of 2 1 2
Re: small question about panels ... [Re: Mafia_IR] #376630
07/05/11 09:49
07/05/11 09:49
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
on_click give a pointer to the clicked Panel as parameter:

function_choose(clicked_panel)
{
clicked_panel.pos_x = ...;
...
}

Is all explained in the manual (search for on_click), please search first there before you ask here!!

Re: small question about panels ... [Re: Widi] #376640
07/05/11 12:11
07/05/11 12:11
Joined: Aug 2010
Posts: 131
Iran
Mafia_IR Offline OP
Member
Mafia_IR  Offline OP
Member

Joined: Aug 2010
Posts: 131
Iran
but why i can't use this code in function ? i gave an error message that says pos_x is not member of function . sorry if these are so simple question .

Code:
function change(clicked_panel)
{
	PANEL* backgroundpan = pan_create("bmap = panels_bmp; pos_x = 0 ; pos_y = 0 ; alpha = 50 ; flags = SHOW | TRANSLUCENT; ",3);
	
	if(0 == object_one)
		backgroundpan.pos_x = clicked_panel.pos_x ;
		
}



Re: small question about panels ... [Re: Mafia_IR] #376649
07/05/11 13:08
07/05/11 13:08
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
Originally Posted By: Mafia_IR
but why i can't use this code in function ? i gave an error message that says pos_x is not member of function . sorry if these are so simple question .

Code:
function change(clicked_panel)
{
	PANEL* backgroundpan = pan_create("bmap = panels_bmp; pos_x = 0 ; pos_y = 0 ; alpha = 50 ; flags = SHOW | TRANSLUCENT; ",3);
	
	if(0 == object_one)
		backgroundpan.pos_x = clicked_panel.pos_x ;
		
}

try
Code:
function change(PANEL* clicked_panel)



Re: small question about panels ... [Re: MrGuest] #376718
07/06/11 03:40
07/06/11 03:40
Joined: Aug 2010
Posts: 131
Iran
Mafia_IR Offline OP
Member
Mafia_IR  Offline OP
Member

Joined: Aug 2010
Posts: 131
Iran
just two question :

1) i need to know number of panel when player clicked on it, becuase he should click on two panels and they should change their position with each other ?

2) how can i understand there are three or more panels in a line, have same picture .(so important)

if there were in a line and had same picture , i should delete them and create new panels ...

Thanks everyone, Especially somebody who helped me wink .

Last edited by Mafia_IR; 07/06/11 03:42.
Re: small question about panels ... [Re: Mafia_IR] #376785
07/06/11 18:42
07/06/11 18:42
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
1.)
Code:
PANEL* clickers[2];

function change(PANEL* clicked_panel)
{
	if(clickers[0] == NULL)
	{
		clickers[0] = clicked_panel;
	}
	else if(clickers[0] != NULL && clickers[0] != clicked_panel)//clickers[0] already contains a Panel, and it´s other than the now clicked
	{
		clickers[1] = clicked_panel;
		
		//Add the Changing code here
		// Changing position of clickers[0] and clickers[1]
		//end of changing code
		clickers[0] = NULL;
	}
	
}



i think that should work.

2.)
give each Panel at creating a skill.. like that:
Code:
panname = pan_create(..);
panname.skill_x = 1



now you can say:
skill_x == 1 is 1st Pic
skill_x == 2 is 2nd Pic
skill_x == 3 is 3rd Pic
skill_x == 4 is 4th Pic
...etc..etc..

Now run thorugh your lines with a loop, and ask if 3 or more skill_xs in a row are the same


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: small question about panels ... [Re: Espér] #376868
07/07/11 07:42
07/07/11 07:42
Joined: Aug 2010
Posts: 131
Iran
Mafia_IR Offline OP
Member
Mafia_IR  Offline OP
Member

Joined: Aug 2010
Posts: 131
Iran
about question two : ( so simple again grin )
how can i ask :
Quote:
if 3 or more skill_xs in a row are ...


Re: small question about panels ... [Re: Mafia_IR] #376989
07/08/11 15:16
07/08/11 15:16
Joined: Aug 2010
Posts: 131
Iran
Mafia_IR Offline OP
Member
Mafia_IR  Offline OP
Member

Joined: Aug 2010
Posts: 131
Iran
Any WAY ! ?

Page 2 of 2 1 2

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