Cutscene example

Forum Archive - from http://theuniversal.net
Locked
User avatar
Mit
Staff
Staff
Posts: 3551
Joined: Sun Sep 21, 2003 10:14 pm
Location: Unknown

Cutscene example

Post by Mit »

Here's a basic cutscene (from the standard crow tournament script) that might be useful for those getting into that kinda thing :)

Code: Select all

section(1)	
{ 
	campos = Vector( 52.71815, 40.55291, 1.82569 );
	camTarget = Vector( 51.71815, 39.55291, 1.82569 );

	camposEnd = Vector( 52.71815, 40.55291, 4.32569 );
	camTargetEnd = camTarget;

	cam = Camera( campos, camTarget ); 
	cam.BlendTo( 18.0, camposEnd, camTargetEnd); 

	caption = Caption( 0.5, 0.65, "Shamanic Crow Tourney - match starts in 30 seconds.", 1 );    
    caption.FadeIn( 1, 2 ); 
    caption.FadeOut( 6, 7 ); 

	caption = Caption( 0.5, 0.65, "Winner is player with most kills after 2 minutes", 1 );    
    caption.FadeIn( 10, 11 ); 
    caption.FadeOut( 15, 16 ); 
}

section(2)	
{ 
	CustomEvent( 5.0,"StartCrowTournament","0" );
	campos = Vector( 52.71815, 40.55291, 4.32569 );
	camTarget = Vector( 51.71815, 39.55291, 1.82569 );

	camposEnd = Vector( 52.71815, 40.55291, 12.32569 );
	camTargetEnd = Vector( 51.71815, 39.55291, 1.82569 );
	cam = Camera( campos, camTarget ); 
	cam.BlendTo( 12.0, camposEnd, camTargetEnd); 

	caption = Caption( 0.5, 0.65, "Ready up...!", 1 );    
    caption.FadeIn( 8, 9 ); 
    caption.FadeOut( 11, 12 ); 

}
User avatar
morbydvisns
Posts: 1889
Joined: Sun Jan 30, 2005 12:51 am

Post by morbydvisns »

Do AnimPlay work on Player() class?

I can't seem to get this worked out.

Code: Select all

section(1)
{
    camPos = Vector( 384.3, 1159.026, 11.186 );
	camTarget = Vector( 388,1150,10);
	localPlayer = Player()
	cam = Camera( camPos, camTarget);
	StartPos = Vector()
        StartPos.SetToLocalPlayerPosition(); 
	
   
   EndPos = Vector();
   EndPos = StartPos;
   EndPos.Add(-1,.5,0)
	
	cam.BlendTo( 8.0, camPos, camTarget);
	localplayer.AnimPlay(0,Walk,0);
	localplayer.BlendTo( 6, EndPos, 0, 0 );
}
User avatar
Mit
Staff
Staff
Posts: 3551
Joined: Sun Sep 21, 2003 10:14 pm
Location: Unknown

Post by Mit »

Here's the C code for the player cutscene class related to AnimPlay..

Code: Select all

		if ( tinstricmp( pcFunction, "AnimPlay" ) == 0 )
		{
			// TODO..
		}
So um.. no not yet...
User avatar
morbydvisns
Posts: 1889
Joined: Sun Jan 30, 2005 12:51 am

Post by morbydvisns »

ok then i can stop bashing my head on my keys then. =)

I thought I remembered doing it, but I'm also now 100% sure that was in the PUB project dilly I played with a bit a few years back.

In the mean time, the monkeys can just do a buttslide in and out of the cavern.
Locked