Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (ozgur, degenerate_762, 7th_zorro), 1,075 guests, and 0 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
pause screen... #315548
03/16/10 15:46
03/16/10 15:46
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
ok, I am wondering if it is possible. I have a splash screen code from AUM 41. I want to change it into pause screen because it only appears when the level loads and goes down when you press a button. I want to be able to hit a button on the keyboard and pause the game and the splash screen appears and can go away when you press that button again. I want it to be used anytime you wish because it will show the objectives of that level you are on. is this possible?

code per AUM 41

Code:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////

bmap splash_pcx = <splash.pcx>; // Your Spash Pcx graphic

panel splash_pan 
{ 
   bmap = splash_pcx; 
   pos_x = 0; 
   pos_y = 0; 
   layer = 1; 
   flags = overlay, refresh; 
} 

starter show_splash()
{
   freeze_mode = 1; // stop all the entities in the level
   splash_pan.visible = on; // show the splash screen
   while (key_space == 0) {wait (1);} // wait until the "space" key is pressed
   while (key_space == 1) {wait (1);} // wait until the "space" key is released
   splash_pan.visible = off;
   freeze_mode = 0; // resume the gameplay
}




My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: pause screen... [Re: Blink] #315550
03/16/10 16:10
03/16/10 16:10
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
here i think this would work laugh


starter show_splash()
{
while(1)
{
while (key_space == 0) {wait (1);} // wait until the "space" key is pressed
while (key_space == 1) {wait (1);} // wait until the "space" key is released
freeze_mode = 1; // stop all the entities in the level
splash_pan.visible = on; // show the splash screen
while (key_space == 0) {wait (1);} // wait until the "space" key is pressed
while (key_space == 1) {wait (1);} // wait until the "space" key is released
splash_pan.visible = off;
freeze_mode = 0; // resume the gameplay
wait(1);
}
}


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: pause screen... [Re: alibaba] #315561
03/16/10 18:30
03/16/10 18:30
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline
User
JazzDude  Offline
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
If I understand what you want correctly, I'd do it this way:

Code:
function pause()
{ 
	if(freeze_mode == 2) // all frozen??
	{

		freeze_mode = 0; // go on
		splash_screen.visible = off;
                game_paused_txt.visible = off;  //if desired
	}
	else
	{
		freeze_mode = 2; // pause	
		splash_screen.visible = on;
                game_paused_txt.visible = on;  //if desired
       	}
} 

on_space = pause;  //toggles pause on and off



Re: pause screen... [Re: JazzDude] #315570
03/16/10 20:30
03/16/10 20:30
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Thanks alibaba and Rod, both methods worked perfectly. I appreciate the assist.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."

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