Gamestudio Links
Zorro Links
Newest Posts
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
2 registered members (AbrahamR, 1 invisible), 858 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
if (key_t) to open menu? #372852
06/05/11 00:51
06/05/11 00:51
Joined: Apr 2009
Posts: 81
J
JakeBilbe Offline OP
Junior Member
JakeBilbe  Offline OP
Junior Member
J

Joined: Apr 2009
Posts: 81
I want an in game menu to be accessible by pressing t I have set the code and everything but it wont show up, I get no syntax errors so here is the panel code and the function statement I am using in the main.c script not the player.c:

Code:
PANEL* main_pan =
{
  bmap = "main.png";
  pos_x = 250;     
  pos_y = 200;    
  }

function escape_menu()
{
if (key_t)
set (main_pan, OVERLAY | SHOW);	
}



Re: if (key_t) to open menu? [Re: JakeBilbe] #372853
06/05/11 01:10
06/05/11 01:10
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
where exactly do you call escape_menu? try
Code:
PANEL* main_pan = {
  bmap = "main.png";
  pos_x = 250;     
  pos_y = 200;
  flags = OVERLAY;
}

void escape_menu(){
  set(main_pan, SHOW);
}

void main(){
  on_t = escape_menu;
}



Re: if (key_t) to open menu? [Re: MrGuest] #372855
06/05/11 01:25
06/05/11 01:25
Joined: Apr 2009
Posts: 81
J
JakeBilbe Offline OP
Junior Member
JakeBilbe  Offline OP
Junior Member
J

Joined: Apr 2009
Posts: 81
I have no idea, I am still halfway through the workshops. I just assumed a function would be loaded and executed the same way my function main_player() is. I replaced my code with yours but it doesn't show still. I am basically making a player menu that appears when you press T showing different icons and instructions but it wont appear.

Re: if (key_t) to open menu? [Re: JakeBilbe] #372937
06/05/11 21:40
06/05/11 21:40
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
You'd probably find it easier to finish the workshops then start again trying to rewrite your code in lite-c


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