Gamestudio Links
Zorro Links
Newest Posts
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
Release 2.68 replacement of the .par format
by Martin_HH. 09/23/25 20:48
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (Niels, dBc, TipmyPip, Ed_Love, 3run), 17,595 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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