Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by k_ivan. 04/25/26 19:13
ZorroGPT
by TipmyPip. 04/25/26 16:09
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 3,407 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
valino, juergenwue, VladMak, Geir, ondrej
19209 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Panels - using Lite-C Free #273213
06/22/09 02:43
06/22/09 02:43
Joined: Jun 2009
Posts: 4
Sheffield (England)
Onlydying Offline OP
Guest
Onlydying  Offline OP
Guest

Joined: Jun 2009
Posts: 4
Sheffield (England)
Hi i really need help with panels using Lite-C free edition. i am a begginner programmer so pleas dont throw random code at me i really want to try get my head around everything best i can smile

erm ok so the problem im having is that although in the past i have used c-script and created panels with ease i just cant do it in lite-c. ill give you an example of a piece of code i used to do:

bmap random_image = "random_image.bmp";

panel random_panel
{
bmap = random_image;
layer = 1;
flags = overlay, visible;
}

function main()
{
level_load("level1.wmb";
wait(3);
sleep(10);
random_panel.visible = off;
sleep(10);
random_panel.visible = on;
}

so thats easy enough (hopefully that code is right just did it off top of my head).

but with lite-c im having to do this:

PANEL first_pan = // why is there an "=" sign?
{
bmap = "grass.bmp";
pos_x = 0;
pos_y = 0;
layer = 1;
flags = VISIBLE;
}

my first [problem is that the grass bitmap (64x64) is not appearing on the screen at all. (ive tried using the SHOW flag too).

function main()
{
first_pan =.visible = on;
etc etc...
}

how can i call the panel in functions like this? taking away the = sign doesnt solve the problem as it keeps telling me it is an unidentified identifier.

sorry about the length of this esspecially as there is probably a simple solution lol but yeah thanks in advance smile

Re: Panels - using Lite-C Free [Re: Onlydying] #273215
06/22/09 02:50
06/22/09 02:50
Joined: Jul 2005
Posts: 187
L
lostzac Offline
Member
lostzac  Offline
Member
L

Joined: Jul 2005
Posts: 187
You missed the * on PANEL should be PANEL* marking it as a pointer, that is also why you need the = sign as a reference to the object the pointer holds...


John C Leutz II

Re: Panels - using Lite-C Free [Re: lostzac] #273218
06/22/09 02:57
06/22/09 02:57
Joined: Jun 2009
Posts: 4
Sheffield (England)
Onlydying Offline OP
Guest
Onlydying  Offline OP
Guest

Joined: Jun 2009
Posts: 4
Sheffield (England)
Oh man thanks alot haha it shows the bmp on screen now smile funny how one tiny thing got me frustrated for 30+ minutes lol

how do i call it in a function to make it invisible again though?

first_pan.VISIBLE = off; doesnt work, ive probably missed something obvious again lol

Re: Panels - using Lite-C Free [Re: Onlydying] #273220
06/22/09 03:05
06/22/09 03:05
Joined: Jul 2005
Posts: 187
L
lostzac Offline
Member
lostzac  Offline
Member
L

Joined: Jul 2005
Posts: 187
set(PANEL_NAME,SHOW)
also read up on this for toggle, reset, and is in the manual

and do not get to frustrated we were all new once


John C Leutz II

Re: Panels - using Lite-C Free [Re: lostzac] #273222
06/22/09 03:11
06/22/09 03:11
Joined: Jun 2009
Posts: 4
Sheffield (England)
Onlydying Offline OP
Guest
Onlydying  Offline OP
Guest

Joined: Jun 2009
Posts: 4
Sheffield (England)
ah that makes sense cool ill look it up now

and thanks you've helped alot smile

Re: Panels - using Lite-C Free [Re: Onlydying] #273224
06/22/09 03:16
06/22/09 03:16
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline
Member
gamingfan101  Offline
Member
G

Joined: Jun 2009
Posts: 148
and also if you havnt go through the workshops, thats really helped me alot. Im also new to this and i also get frustrated a lot. And remember dont hesitate to ask questions.


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: Panels - using Lite-C Free [Re: Onlydying] #273225
06/22/09 03:17
06/22/09 03:17
Joined: Jul 2005
Posts: 187
L
lostzac Offline
Member
lostzac  Offline
Member
L

Joined: Jul 2005
Posts: 187
No a problem you'll find most the people here are friendly and have a lot of good advice and a lot you can learn from them


John C Leutz II

Re: Panels - using Lite-C Free [Re: gamingfan101] #273226
06/22/09 03:20
06/22/09 03:20
Joined: Jun 2009
Posts: 4
Sheffield (England)
Onlydying Offline OP
Guest
Onlydying  Offline OP
Guest

Joined: Jun 2009
Posts: 4
Sheffield (England)
I havent gone through the workshops yet but if its helped you alot then yeah ill work through them sounds like a good idea smile

@lostzac

and yeah its great being able to just ask and get help almost instantly tis a great community smile

Last edited by Onlydying; 06/22/09 03:22.

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