Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, The_Judge, Grant), 898 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 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: 897
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 897
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 | 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