Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (LucasJoshua, Ayumi, AndrewAMD, 1 invisible), 546 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Moving between Panels #427848
08/14/13 14:01
08/14/13 14:01
Joined: Feb 2006
Posts: 33
Herts, UK
D
danohu Offline OP
Newbie
danohu  Offline OP
Newbie
D

Joined: Feb 2006
Posts: 33
Herts, UK
Hi

I have a number of panels each with layers in my script. I want to know if you can move both back and forward between panels using an 'if' condition or whether the panels will appear sequentially irrespective of the condition based on their layer value? e.g. Panel 2 layer value is 50 and Panel 5 layer value is 20. Panels 1, 3 and 4 would have layer values of 60, 40 and 30 respectively.

In the first example panel 2 is reset and panel 5 appears based on the if condition e.g.

if (some condition is true)
reset (Xpanel_2, SHOW) && set (Xpanel_5)


In the second example panel 5 is reset and panel 2 appears.

if (some condition is true)
reset (Xpanel_5, SHOW) && set (Xpanel_2)

Is there the possibility that this would work for a while and then the system would get confused and default to running panels sequentially e.g. 1 then 2 then 3 then 4 then 5 simply based on their layer values and ignore the if condition? Perhaps the layers are not necessary?

Re: Moving between Panels [Re: danohu] #427849
08/14/13 14:15
08/14/13 14:15
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
I am sorry but I don't understand your question at all, can you try to state it again precisely in other words?

The system does not get "confused", no matter what you do or how long your code/ while loop is running, provided that you don't mess up the code on your side.
You can set and reset the SHOW (and any other) flag as often as you like, you are just changing the value of a panel struct's number/ member. It does not get rendered immediately but at the end of the frame after all script execution and world rendering.
You can use the function layer_sort(void* element, var layer) to change the layer of any screen element at runtime.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends

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

Gamestudio download | chip programmers | 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