Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Almost complete guide to cinematic text scripts
Almost complete guide to cinematic text scripts [message #218965] Tue, 12 September 2006 09:52 Go to previous message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma:
General (3 Stars)

This is a guide to the inner workings of cinematic text scripts. It assumes you are familiar with the basics (i.e. how to edit them, what slots are etc).
It describes the complete format and usage of all valid commands as well as a few other notes about these scripts.
This is intended to be as accurate as possible (its more accurate than the tutorial at renhelp for sure)
Should anyone wish to use this information (e.g. to update said renhelp tutorial) feel free
Passing -1 for a slot number seems to mean "no slot".
There is a limit of 40 slots hardcoded into the script.

Create_Object (creates a "Generic_Cinematic" object and sets its model). Parameters:
Slot number for the object to go into.
Model to use for the object.

Note that despite what it says in the text scripts, the Create_Object command only makes use of the first 2 parameters (the ones labeled x,y,z,facing,animation are ignored)

Create_Real_Object (creates a real object). Parameters:
Slot number for the object to go into.
Preset to create.
(optional) Slot number for the bone object
(optional) Bone to create it at (you need to use the Attach_To_Bone command to actually attach it)

Create_Explosion (creates an explosion at a bone). Parameters:
Explosion preset to create.
Slot number for the bone object.
Bone to create it at.

Destroy_Object (destroy an object). Parameters:
Slot number of the object to destroy.

Play_Animation (Play an animation). Parameters:
Slot number of the object to play an animation on.
Animation name.
Flag to specify whether to loop the animation or not.
(optional) Subobject name.
(optional) Flag to specify whether the animation is blended. (no clue what that means, it has something to do with human animations though)
This command may only work if the players have a suitable version of bhs.dll on the client. (it depends on the object the animation is being played on, cinematic objects are probobly fine, real objects are probobly not).

Play_Audio (Play a sound). Parameters:
Preset name for the sound.
(optional) Slot number for the bone object.
(optional) Bone to create it at.
If no slot/bone is given (or it cant be found), a 2D sound is played, otherwise a 3D sound is played.
This command will probobly only work if the players have a suitable version of bhs.dll on the client.

Control_Camera (Control the camera for special circumstances). Parameters:
Slot number of the object to use as the camera host position. Pass -1 to turn the effect off.
This command also disables the HUD and the controls of the player.
This command will not work in multiplayer.

Send_Custom (Send a custom to an object in the level). Parameters:
Object to send the custom to. If you use a # as the first character, the number will be interpreted as a slot number and not an object ID.
Message to send.
Parameter to send. If you use a # as the first character, the ID of the object in that slot will be passed as the parameter.

Attach_To_Bone (Attach an object to a bone). Parameters:
Slot number of the object to attach.
Slot number of the bone object. Pass -1 to specify to detach from the bone.
Bone to attach to.

Attach_Script (Attach a script to an object). Parameters:
Slot number of the object to attach the script to.
Script to attach. Enclose this in double quotes.
Parameters for that script. Enclose this in double quotes.

Set_Primary (Set an object as the primary object for that cinematic). Parameters:
Slot number of the object to set as primary.
This will attach the script Test_Cinematic_Primary_Killed to that object. If the primary object is killed, the Test_Cinematic_Primary_Killed script will send a custom of 9023 to the cinematic object. When this happens, any cinematic lines with a frame/time value greater than 999000 will be run (normally they dont get run).
Use this feature to clean up when the main object of the script is killed. (e.g. if you have a cinematic that brings in a helicopter full of people, the helicopter would be set as the primary object and cleanups would be used to remove all objects if the helicopter is destroyed).

Move_Slot (Move an object to a new slot). Parameters:
Slot to move to.
Slot to move from.

Sniper_Control (Use sniper scope effect). Parameters:
Flag to specify whether to enable or disable it.
Zoom level to zoom to. Goes from 0 to 1.0.
This command will not work in multiplayer. May require the Control_Camera command to be used first or otherwise be related to Control_Camera.

Shake_Camera (Shake the camera). Parameters:
Slot number of object to use for camera shake. Will use position of a bone labeled "Camera" on this object as the position for the shake.
Intensity of the camera shake.
Duration of the camera shake.
This command will probobly only work if the players have a suitable version of bhs.dll on the client.

Enable_Shadow (Enable shadow on an object). Parameters:
Slot umber of object to enable shadow on.
Flag to specify whether to enable or disable it.
This command will not work in multiplayer.

Enable_Letterbox (Enable black bars at top and bottom). Parameters:
Flag to specify whether to enable or disable letterbox.
Value for letterbox. (possibly size) Use 1 for this to get the default effect.
This command will not work in multiplayer.

Set_Screen_Fade_Color (Apply a color overlay to the screen).
Parameters:
Red color. Goes from 0 to 1.0.
Green color. Goes from 0 to 1.0.
Blue color. Goes from 0 to 1.0.
Transition. (how long to take transitioning to the new screen color)
This command will probobly only work if the players have a suitable version of bhs.dll on the client.

Set_Screen_Fade_Opacity (Apply an opacity overlay to the screen).
Parameters:
Opacity. How opaque to make the screen.
Transition. (how long to take transitioning to the new screen opacity)
This command will probobly only work if the players have a suitable version of bhs.dll on the client.

Another feature of the Test_Cinematic script (one that several new scripts that I will put in 3.0 will take advantage of) is that if you send it a custom of 10000+slot number (starting from zero) and that slot is empty, whatever is passed in as the parameter of that message is loaded in as the object ID for that slot.
This feature is used by the airstrip to load the purchased vehicle into the cargo plane.

One final fact is that the airstrip specifically looks for the script Test_Cinematic by name and sends the custom for the aformentioned cargo load specifically to that script object.


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: dumb question ya i know
Next Topic: An Idea
Goto Forum:
  


Current Time: Tue Nov 12 00:38:39 MST 2024

Total time taken to generate the page: 0.00798 seconds