Jump to content

NPC vehicle within cutscene


Recommended Posts

I am kinda having a problem with a script that I cant seem to solve, and I kinda need some input.

 

The layout / idea:

I am wanting to make a cutscene where a stormtrooper is on a speeder, drives / flies to a certain point and gets off. So I set up part of the map with a nav_point, placed some waypoints arround, linked them up, placed a speeder, had an npc spawn on top of it, did the basic entity work and wrote a script for it.

 

The problem

Now I figured out the dismounting part will be impossible, so I have to do it with cutting camera angles, and removing Stormy the Trooper for the sake of appearance and replace a clone *wink wink* next to the speeder (something that @@eezstreet pointed out to me as well). My problem lies in the speeder. Eezstreet pointed out that vehicles have no behaviour AI, thus cannot be controlled by nav_points. (trust me I tried). Secretly I had hoped that the NPC on the speeder itself would steer the vehicle to the navpoint, but so far no luck. 

 

Eezstreet said to me that I may be able to control the npc not by navpoint but by the move option, so I set up a task (with some help) for it,No luck (i had one time my cutscene stuck, the other time my cutscene never started, but I cant seem to put a finger on the fact that the vehicle, nor the stormtrooper wont move.

//Generated by BehavEd

camera ( /*@CAMERA_COMMANDS*/ ENABLE );
camera ( /*@CAMERA_COMMANDS*/ MOVE, $tag( "cam-swoop1", ORIGIN)$, 0 );
camera ( /*@CAMERA_COMMANDS*/ PAN, $tag( "cam-swoop1", ANGLES)$, < 0.000 0.000 0.000 >, 0 );

affect ( "swoopbike1", /*@AFFECT_TYPE*/ FLUSH )
{

	task ( "moveswoop" )
	{
		move ( $tag( "swoop2", ORIGIN)$, < 0.000 0.000 0.000 >, 3000.000 );
	}

	dowait ( "moveswoop" );
}


affect ( "stormtrooper_speeder1", /*@AFFECT_TYPE*/ FLUSH )
{

	task ( "moveswoop" )
	{
		move ( $tag( "swoop2", ORIGIN)$, < 0.000 0.000 0.000 >, 3000.000 );
	}

	dowait ( "moveswoop" );
}

camera ( /*@CAMERA_COMMANDS*/ DISABLE );

This is the script (very easy so far, its just, move to point swoop2, which at this point is a ref_tag, since appearantly nav_points dont cut it, yet it doesn't seem to work. I think it has to do with the fact the NPC has no origin base, so it cant find it. BTW, no console error. (also, i removed the wait term that I had build in, for extra time in the cutscene)

 

Now before you all go, why dont you see t2_trip, please note that I do have it decompiled (with some thanks to a person who handed me all the maps, forgot your name, sorry) and checked it out, checked all the scripts from t2_trip, checked the common script folder for any behavior, checked the entities in the map, etc, and cant seem to find it. Does anybody know what I missed or can do to figure out.

 

 

 

Link to comment

I went into t2_trip, and the opening actually does mostly what I want, Jaden, jumps on a swoop and scoots off. Now i went to look for the opening.

// Generated by DEvaheb v1.0
// Decompiled from file "I:\Games\Star Wars Jedi Knight Jedi Academy\GameData\base\scripts\t2_trip\intro.ibi"


affect ( "introjaden", FLUSH )
{
	camera ( ENABLE );
	set ( "SET_ANIM_BOTH", "BOTH_CIN_5" );
	set ( "SET_ANIM_HOLDTIME_BOTH", -1.000 );
	camera ( MOVE, < -1745.430 -27025.600 551.543 >, 0.000 );
	camera ( PAN, < 52.219 147.812 0.000 >, < 0.000 0.000 0.000 >, 0.000 );
	camera ( ZOOM, 80.000, 0.000 );
	camera ( MOVE, < -1745.430 -27025.600 498.901 >, 14000.000 );
	camera ( PAN, < 44.119 147.812 0.000 >, < 0.000 0.000 0.000 >, 14000.000 );
	wait ( 12700.000 );
	camera ( FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 1.000, 1300.000 );
	wait ( 1300.000 );
	camera ( DISABLE );
	remove ( "introjaden" );
	remove ( "intromerchant" );
	remove ( "introswoop" );
	remove ( "cinematic_swoops" );
	camera ( FADE, < 0.000 0.000 0.000 >, 1.000, < 0.000 0.000 0.000 >, 0.000, 1.000 );
}


affect ( "intromerchant", FLUSH )
{
	set ( "SET_WEAPON", "WP_NONE" );
	set ( "SET_ANIM_BOTH", "BOTH_CIN_6" );
	set ( "SET_ANIM_HOLDTIME_BOTH", -1.000 );
	sound ( CHAN_AUTO, "sound/vehicles/swoop/sb_idle.mp3" );
	wait ( 4150.000 );
	sound ( CHAN_AUTO, "sound/vehicles/swoop/sb_idle.mp3" );
	wait ( 4150.000 );
	sound ( CHAN_AUTO, "sound/vehicles/swoop/sb_idle.mp3" );
}


affect ( "introswoop", FLUSH )
{
	set ( "SET_ANIM_BOTH", "BOTH_CIN_1" );
	set ( "SET_ANIM_HOLDTIME_BOTH", -1.000 );
	wait ( 11850.000 );
	sound ( CHAN_AUTO, "sound/vehicles/swoop/sb_revup.mp3" );
}

For all i know, the camera hardly moves if I look at the movie (Jaden and a merchant talking) but it misses some animations I guess.

 

Link to comment

You can use a ROF file for the speeder path. I can export a ROF file for you if you send me your map file and an origin brush where the speeder bike starts. I have to animate the origin brush in 3ds Max along the path you want and where you want it to end.

 

Also, why can't you script the trooper to do a dismount animation?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...