Blade of Darkness holds true to the greatest of hack and slash legends, combining sorcery, knights, and swords with god forsaken enemies that deserve to have their arms slashed off with a broadsward. Blade of Darkness looked excellent in 2001, and still delivers its gore well today. Holding True to it's genre it offers modders both custom maps and scripts. Relevent Links Fansite Mod List Modding Community

Post tutorial RSS Level Editing Scripting by Prospero. Part. 20

In most of the cutscenes in the main game the camera moves are handled by hard-coded *.cam files which are created in 3dsmax. However, it is easy to create them with Python.

Posted by on - Basic Client Side Coding

Cutscenes and camera stuff.

In most of the cutscenes in the main game the camera moves are handled by hard-coded *.cam files which are created in 3dsmax.
However, it is easy to create them with Python.

What you need are sets of coords. The "Camera" is an entity the same as all other objects in the game. The two properties you need are:

Position (the position of the camera)
TPos (target postion - the point at which it is 'looking')

You need the De-bug mode enabled in order to get accurate coords. Start the map and press 'P' to enable the free camera. You now need to set some key points in the camera travel path. Move the cam to the point where you want to start your cutscene. Press 'T' until you get a readout with the camera position and camera target position. (This screen has lots of other stuff on it: Player Pos/Angle and current animation,etc.) Write down the cam pos and tpos. Move cam to the next stage in its path, note coords again and repeat until you reach the point where you want the cutscene to end.

There is a file Lib/ that handles camera moves nicely. To use, make a function:

python code:
import AbreCam

def Cut1():
   AbreCam.AddNode((10000, -6000, 80000),(12000,-10000, 67000),0)
   AbreCam.AddNode((20000, -8000, 70000),(12000,-10000, 67000),7)
   AbreCam.AddNode((30000, -7000, 86000),(9000,-4000, 56000),8)
   AbreCam.AddNode((50000, -6000, 98000),(8000,-5000, 40000),4)

Add as many 'Nodes' as you wish. Each one contains the camera Position followed by the camera TPos. Put in the coords you wrote down earlier. The last arg is the time it takes to complete the move.
In this case it is set to 0 in the first line. When func is called (usually from a trigger sector) the camera moves instantly to the first position. If you set the first time to greater than 0 the camera moves from the current Player veiw to first pos in this time. But, because you cannot be sure just where the Player may be looking at this point, it is better to leave the time at 0 to avoid weird things happening. The camera next moves to the second position, in this case in 7 secs. Then it does all the other moves in order. If the LastTime is set to 0, the cam returns to the Player instantly after the last position is reached. If you set this to greater than 0 it will travel back to the Player in that amount of time. Again, this is best set to 0 in most cases. During the cut, the keyboard input is disabled and the scorer is hidden.

Sometimes this code is a bit restricting and cam moves can be done in other ways, but this is the best method in the majority of situations.

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Profile
Severance: Blade of Darkness
Rebel Act Studios
Send Message
Release date
Game watch
Related Games
Related Groups
Rebel Act Studios
Rebel Act Studios Developer & Publisher