Tutorial 35: Chaining Scenes

Some scripts can get pretty long, and drawing all those lines can sometime slow down the CPU. The Sunder Escape scene was a massively chained cine. 5 scenes in all. There were many problems with the way I chained them so let me impart that knowledge onto you. But before that, lets do a simple chained scene, so you can understand what the hell Iím yabberin about.

Make a script called chain_scene1
On cubic 1
Put boots, walking on spline
Put your camera on cubic track 10
Your focus on 11
Put an ob_automap on track 3
Put an ob_dockshiplite on track 5

Now make a script called chain_scene2
Delete ALL newent NODES
Put your camera on track 10 and camera focus on track 11
But change the position of the camera.
Delete all nodes for the dockshiplite
Move the automap node for away from itís original position
Change boots path so that he walks in a circle.
Save this.

We need to tell anox to link/chain those cines together. So bring down the console.
Ui_chainscripts chain_scene1 chain_scene2
Anox will tell you if it has found both scenes and chained them
Now type
Ui_playscene chain_scene1

You will notice the automap moved, the dockship did NOT,
And boots snapped to his new location and walked in a circle.

If you make a change and wish to view the changes you will have to reload the map (cuz the script were chained and put into memory). Map changes is the best way to flush memory.

To get rid of the glitch between chains, have scene1 fade to black before it ends, and have scene 2 fade up at 0.1 secs. That should remove the Ďseemí between scenes.

Lets say you have models on cubic 1,3,5 & 7 on scene1. when you chain to scene2, tracks 1,3,5 & 7 will automatically have those models (you donít need to use the newent CMD). Yet how do you script scene2 without newent. You canít, you will have to temporarily put one in.

If you have an entity on track 9 in scene 1, and donít have a path on track 9 for scene 2, that entity WILL stay where it was left off (The Dockshiplite). I had phantom people pop up over the sunder escape scene.

When you use hidden=1 on an entity in scene1, if you want to see it in scene 2 you MUST hidden=0. (I forgot this abunch of time, and would pull my hair out trying to figure out what was going wrong)

To view the sunder escape scene
Map cine1
Ui_chainscripts cine1_scene1 cine1_scene2 cine1_scene3 cine1_scene4 cine1_scene5
Ui_playscene cine1_scene1

The only time I ever use the swapmdl cmd was for chained cines.
Generally I like to load all models for a scene at the beginning, that way there is only one pause at the beginning, never in the middle. But for scene like the sunder escape, multiple models were being swapped. I would do this at the beginning of each scene, where the screen was blacked out, that way you wouldnít notice the pause as much.

Lets load up chain_scene2
On cubic 1 put at cmd node at 0.0 (this is boots path)

Now rechain the scenes (Did you change maps to flush the chain in memory???). and watch it again. Now Stiletto should walk in a circle instead of boots.

There is an UNLINK cmd. But Iím not sure what it does.

To chainscenes in APE, just remove the ui. Ex. Chainscripts chain_scene1 chain_scene2
Playscene chain_scene1