PDA

View Full Version : Interrupting Matinee by User


HeadShooter
30th Mar 2004, 03:56 AM
How is it possible to make matinee interruptable? eg. UT2004 Assault intro movies can be cancelled by primary fire

Vito
30th Mar 2004, 01:41 PM
You can't by default. You'll have to check out the UT2004 matinee UnrealScript code for that. If it's not done natively, you might be able to write some UnrealScript that supports it. If it is, I can give you other suggestions.

[SAS]Solid Snake
30th Mar 2004, 04:54 PM
UT2004 Assault intro movies can be cancelled by primary fire I am not 100% sure on this, but to cancel a movie you can just use a console command to change to the map.

ttl
30th Mar 2004, 10:04 PM
If you don’t want to play the same scene again, wouldn’t you just destroy the scene manager?

HeadShooter
31st Mar 2004, 02:00 AM
Solid Snake']I am not 100% sure on this, but to cancel a movie you can just use a console command to change to the map.

But I have matinee at the same level

HeadShooter
31st Mar 2004, 02:08 AM
You can't by default. You'll have to check out the UT2004 matinee UnrealScript code for that. If it's not done natively, you might be able to write some UnrealScript that supports it. If it is, I can give you other suggestions.

Thanks!! Can you help me a little bit more?
Where can i find this? Scene manager code? Interactions code?

HeadShooter
12th Apr 2004, 05:29 AM
Still can't find this code ^(((

ttl
14th Apr 2004, 09:20 AM
Instead of finding it, why dont you look through the SceneManager code?

Anywho here is an example, put this in your playercontroller class:

exec function StartMatinee()
{
local SceneManager scene;
//if(isViewingMatinee()) return;
foreach DynamicActors(class'SceneManager',scene)
{
if(scene.bIsSceneStarted || scene.bIsRunning) continue;
scene.Trigger(self,pawn);
break;
}
}
exec function KillMatinee()
{
local SceneManager scene;
local MatAction action;
local MatSubAction subaction;
local int i,j;
foreach DynamicActors(class'SceneManager',scene)
{
if(!scene.bIsRunning || !scene.bIsSceneStarted) continue;
scene.bIsRunning=false;
scene.bIsSceneStarted=false;
for(i=0;i < scene.Actions.length;i++)
{
action = scene.Actions[i];
if(action != none)
{
for(j=0;j < action.SubActions.length;j++)
{
subaction=action.SubActions[j];
if(subaction != none && subaction.status == SASTATUS_Running)
subaction.status=SASTATUS_Ending;
}
}
}
scene.SceneEnded();
SetViewTarget(pawn);
}
}


You could of course call it from the Fire() function. I would personally subclass the SceneManager class and place them in the level instead, and perhaps have a state in the player controller class called 'WatchingMatinee' and goto that from the scenemanager, and then when that stateends you call a function (perhaps by overwriting to the fire function) in your scenemanager that either pauses, resets or destroys your scene manager. Back in the playercontroller class I would set the correct viewtarget. And if you needed to change anything at a later date you could, because it wouldn’t be in a built-in class.