May 23, 2012, 01:36:51 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Please report any bugs or issues that you might be encountering with the Beta in the Support System so that we can better keep track of any oustanding issues that may come up.

GameCore Support System
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Running intro before physics start  (Read 603 times)
pixel_legolas
Hero Member
*****
Posts: 786


View Profile
« on: June 06, 2009, 11:26:23 AM »

I am adding a intro with this command:

Quote
LoadCinematicScript( "cinematics/intro.gsl");
WaitForCinematicToEnd();

The problem is that the game is not waiting for cinematic to end. When the camera switches over to character it has already started to fall (I am trying everything on my game demo RAGMAN now).

So physics and everything is not waiting for cinematics. I am putting this in main.gsl but I guess I need to do something more.

I found scripts for pausing game when in menu that has these commands:

Quote
bool gameActive = false;

if (!gameActive)
    return false;

f (key == "KeyEsc")
{
ShowForm( "MainMenu");
SetRelativeMouseMode( false);
gameActive = false;
return true;
}
return false;
}

I don't know what to do Smiley
Logged
Squat
Hero Member
*****
Posts: 592


View Profile
« Reply #1 on: June 06, 2009, 03:36:49 PM »

Try this instead:

Quote
GetGameManager().SetPaused( true);
Logged
pixel_legolas
Hero Member
*****
Posts: 786


View Profile
« Reply #2 on: June 06, 2009, 06:49:33 PM »

well this pauses everything, and i really mean everything Smiley

i think what would be better is to have a spawner and make him spawn there after intro instead. I will try that
Logged
pixel_legolas
Hero Member
*****
Posts: 786


View Profile
« Reply #3 on: June 06, 2009, 07:14:53 PM »

I tried looking at the powerups in the breakout game to see spawners, I modified code a bit and got this:

Quote
Object@ spawnPoint = null;



void Initialize( Object@ object)

{
   @player = object.GetWorld().GetObject("Push_Ball");//the player object
   @spawnPoint = object.GetWorld().GetObject("Spawn_Point");//the spawner
   Respawn( object );
}

void Respawn( Object @object )
{
   // move to spawner   
   player.SetPosition( spawnPoint.GetPosition() );
   
   
   
   // update the object's physics collision box pose with object pose
   player.UpdateCollisionObjectPositions();
}


but could you tell how to tackle things? Should I have the player from the beginning or had him in script? Where do I spawn him from, main.gsl or what? It's so hard without any reference where to put things. I have the separate intro.gsl should I add it there?
Logged
pixel_legolas
Hero Member
*****
Posts: 786


View Profile
« Reply #4 on: June 06, 2009, 07:55:57 PM »

hm, looked at the old fps template and found player spawn that worked. Now it works for me Smiley
Logged
gekido
Guest
« Reply #5 on: June 19, 2009, 04:33:50 PM »

WaitForCinematicToEnd();

You are probably better to do something like this:

LoadCinematicScript( "cinematicscript.gsl");
      
while( IsCinematicRunning())
{
   WaitForRender();
   Delay(0.1);
}
Logged
Pages: [1]
  Print  
 
Jump to:  

 
Powered by MySQL Powered by PHP bluBlur Skin © 2006, hbSkins
Powered by SMF 1.1.14 | SMF © 2006-2011, Simple Machines LLC
Valid XHTML 1.0! Valid CSS!