Gamestudio Links
Zorro Links
Newest Posts
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
1 registered members (M_D), 1,430 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
ESCAPE KEY??? #353914
01/14/11 07:06
01/14/11 07:06
Joined: Sep 2010
Posts: 97
C
carla_mariz Offline OP
Junior Member
carla_mariz  Offline OP
Junior Member
C

Joined: Sep 2010
Posts: 97
can someone pls help me about this problem?
i want my game to pause and show menu when key_esc is pressed..
but i have no idea. frown

pls help.

Re: ESCAPE KEY??? [Re: carla_mariz] #353915
01/14/11 07:13
01/14/11 07:13
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Why don't you look in one of the MENU examples from AUM? It was some were in 68-69 I guess.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: ESCAPE KEY??? [Re: 3run] #353916
01/14/11 07:18
01/14/11 07:18
Joined: Sep 2010
Posts: 97
C
carla_mariz Offline OP
Junior Member
carla_mariz  Offline OP
Junior Member
C

Joined: Sep 2010
Posts: 97
uhm..i found some and i tried it.. but when i run the script, it exits.. frown

is there something wrong with this?
Code:
function pause_escape()
{
   freeze_mode = 1;
   pause_panel.flags = SHOW | OVERLAY;
}

function main()
{
   on_esc = pause_escape;
   screen_size.x = 800;
   screen_size.y = 600;
   sun_light=100;	
}




what do you think?

Re: ESCAPE KEY??? [Re: carla_mariz] #353917
01/14/11 07:21
01/14/11 07:21
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
carla_mariz did you finish Workshops? Script is so simple and you can't see what is wrong here?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: ESCAPE KEY??? [Re: 3run] #353918
01/14/11 07:28
01/14/11 07:28
Joined: Sep 2010
Posts: 97
C
carla_mariz Offline OP
Junior Member
carla_mariz  Offline OP
Junior Member
C

Joined: Sep 2010
Posts: 97
no i did not..i have no time to finish workshops because of the deadline of the project. well sorry for that, i'm not a good programmer like you. thanks anyway, you've been helping me a lot. i'll search GST again.

Re: ESCAPE KEY??? [Re: carla_mariz] #353919
01/14/11 07:33
01/14/11 07:33
Joined: Jul 2010
Posts: 129
B
bk9iq Offline
Member
bk9iq  Offline
Member
B

Joined: Jul 2010
Posts: 129
ok so just make a copy of the default.c file and then delete the line::
if (!on_esc) on_esc = def_exit;
so that the engine never exits upon pressing escape ....
I am not sure whether there's a better way or not but this does work...

In addition u need to make some corrections to ur code...


Last edited by bk9iq; 01/14/11 07:35.
Re: ESCAPE KEY??? [Re: carla_mariz] #353920
01/14/11 07:34
01/14/11 07:34
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Carla listen to me, it'll be very hard for you to go on, if you not gonna learn basics from Workshops.
You'll spend a lot of time just for nothing without basic knowledge, I know that by myself.
Start learning Workshops today, they are very easy and you'll need just few days to finish them.
Your project can wait, other ways it'll stuck for a very long time.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: ESCAPE KEY??? [Re: bk9iq] #353921
01/14/11 07:35
01/14/11 07:35
Joined: Sep 2010
Posts: 97
C
carla_mariz Offline OP
Junior Member
carla_mariz  Offline OP
Junior Member
C

Joined: Sep 2010
Posts: 97
thanks @bk9iq, i'll try that laugh

Re: ESCAPE KEY??? [Re: carla_mariz] #353923
01/14/11 07:44
01/14/11 07:44
Joined: Sep 2010
Posts: 97
C
carla_mariz Offline OP
Junior Member
carla_mariz  Offline OP
Junior Member
C

Joined: Sep 2010
Posts: 97
@3run..ok ok, i'll finish the workshops, but i guess not now. grin
i barely have 2 weeks to go , and i thought asking from the forum would make it easy for me. grin grin grin tnx for reminding me , i really appreciated it laugh

Re: ESCAPE KEY??? [Re: bk9iq] #353924
01/14/11 08:57
01/14/11 08:57
Joined: Jun 2008
Posts: 428
Rasch Offline
Senior Member
Rasch  Offline
Senior Member

Joined: Jun 2008
Posts: 428
Originally Posted By: bk9iq
ok so just make a copy of the default.c file and then delete the line::
if (!on_esc) on_esc = def_exit;
so that the engine never exits upon pressing escape ....
I am not sure whether there's a better way or not but this does work...

In addition u need to make some corrections to ur code...


in your function main() just add:

on_esc = NULL;


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