Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
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
1 registered members (TipmyPip), 18,631 guests, and 7 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
problem with freeze mode! #384475
10/03/11 16:32
10/03/11 16:32
Joined: Mar 2011
Posts: 38
P
parsgame Offline OP
Newbie
parsgame  Offline OP
Newbie
P

Joined: Mar 2011
Posts: 38
Hi,I have little problem with freeze_mode.
When i play a media with media_play I use freeze_mode before it and wait(media lenght) and then freeze_mode=0 after media_play.
but after the media stoping game is frozen yet.
you can see my code:
Code:
freeze_mode=1;
media_play("movie\\gharopen.avi",NULL,100);
wait(-8);
freeze_mode=0;



Last edited by parsgame; 10/03/11 16:33.
Re: problem with freeze mode! [Re: parsgame] #384606
10/05/11 11:19
10/05/11 11:19
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
Generally it happens, when you use freeze_mode = 2;
Try to use proc_mode = PROC_NOFREEZE; in your function that uses freeze_mode, like code below:

[P] - Pause a running game on/off

Code:
#include <default.c>

#define PRAGMA_PATH "%EXE_DIR%\samples"

ENTITY* spot_point;

function on_p_event () // Pause a running game on & off
{
	proc_mode = PROC_NOFREEZE;
	
	while (key_p) {wait (1);}
	
	if(freeze_mode == 2) // all frozen??
	{
		freeze_mode = 0; // go on
	}
	else
	{
		freeze_mode = 2; // pause everything
	}
}

function spot()
{
	spot_point = me;
	my.flags |= CAST|LIGHT;
	my.lightrange = 500;
	vec_set(my.blue,vector(255,100,100));
	set(me, SPOTLIGHT);
	while(1) {
		my.pan += 3*time_step;
		my.tilt = -60;
		wait(1);
	}
}

function main()
{
	shadow_stencil = 1;
	level_load("small.hmp");
	vec_set(sky_color,vector(20,10,10));
	vec_set(ambient_color,vector(40,40,40));
	sun_light = 0;
	spot_point = ent_create(CUBE_MDL,vector(0,0,200),spot);
	vec_set(camera.x,vector(-400,0,50));
	ent_create(NULL,0,0);
	def_move();
}




Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: problem with freeze mode! [Re: rojart] #384807
10/08/11 18:38
10/08/11 18:38
Joined: Mar 2011
Posts: 38
P
parsgame Offline OP
Newbie
parsgame  Offline OP
Newbie
P

Joined: Mar 2011
Posts: 38
Thank you.but I use c-script and proc_late won't work

Last edited by parsgame; 10/08/11 18:45.

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