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 next message
jonwil is currently offline  jonwil
Messages: 3555
Registered: February 2003
Karma: 0
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
Re: Almost complete guide to cinematic text scripts [message #218973 is a reply to message #218965] Tue, 12 September 2006 10:27 Go to previous messageGo to next message
CodedRiceCracker is currently offline  CodedRiceCracker
Messages: 27
Registered: July 2006
Karma: 0
Recruit
wow, pre digested information. im sure some people will find this usefull. good work.
Re: Almost complete guide to cinematic text scripts [message #219059 is a reply to message #218965] Tue, 12 September 2006 15:35 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
General (3 Stars)
i may of missed somthing here but how do you get an object to move? and what is a slot?
Re: Almost complete guide to cinematic text scripts [message #219060 is a reply to message #218965] Tue, 12 September 2006 15:38 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Can this be used to animate building aggregates upon, say, vehicle purchase?

http://steamsignature.com/card/1/76561197975867233.png
Re: Almost complete guide to cinematic text scripts [message #219065 is a reply to message #218965] Tue, 12 September 2006 15:51 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
i cant find the scripts only

JFW_Create_Object_Custom


http://s18.postimage.org/jc6qbn4k9/bricks3.png
Re: Almost complete guide to cinematic text scripts [message #219070 is a reply to message #218965] Tue, 12 September 2006 16:15 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
nm i was think of somthing else

http://s18.postimage.org/jc6qbn4k9/bricks3.png
Re: Almost complete guide to cinematic text scripts [message #219453 is a reply to message #218965] Thu, 14 September 2006 11:58 Go to previous messageGo to next message
YSLMuffins is currently offline  YSLMuffins
Messages: 1144
Registered: February 2003
Location: Moved a long time ago (it...
Karma: 0
General (1 Star)
Moderator - Mod Forum
Think this is FAQ material Jonwil?

-YSLMuffins
The goddess of all (bread products)
See me online as yslcheeze
Re: Almost complete guide to cinematic text scripts [message #219485 is a reply to message #218965] Thu, 14 September 2006 13:39 Go to previous messageGo to next message
Halo38 is currently offline  Halo38
Messages: 955
Registered: February 2003
Location: UK
Karma: 0
Colonel

Never tried this before but it seems like a great guide

I have always wanted to see a renegade version of the TD airstrike anyone working on this?


Online Portfolio - www.chettle1.com

Renegade projects - Halo38's Den hosted by www.laeubi.de

Creator of : C&C_Arid, C&C_Ancients, C&C_Bio, C&C_Duel Arena

Mod Wars Veteran
Re: Almost complete guide to cinematic text scripts [message #219612 is a reply to message #219485] Fri, 15 September 2006 07:55 Go to previous messageGo to next message
LR01 is currently offline  LR01
Messages: 842
Registered: April 2006
Location: The Netherlands
Karma: 0
Colonel
what is a TD airstrike?

Moding can be real Fun...
Re: Almost complete guide to cinematic text scripts [message #219654 is a reply to message #218965] Fri, 15 September 2006 10:04 Go to previous messageGo to next message
Zion is currently offline  Zion
Messages: 2722
Registered: April 2006
Karma: 1
General (2 Stars)
Tiberium Dawn (C&C 95), from the intro movie that made C&C what it is now Smile
Re: Almost complete guide to cinematic text scripts [message #219655 is a reply to message #219654] Fri, 15 September 2006 10:07 Go to previous message
LR01 is currently offline  LR01
Messages: 842
Registered: April 2006
Location: The Netherlands
Karma: 0
Colonel
How do you make a airstrike anyway?
the "create animation" part is what I like to know


Moding can be real Fun...
Previous Topic: dumb question ya i know
Next Topic: An Idea
Goto Forum:
  


Current Time: Tue May 14 07:11:26 MST 2024

Total time taken to generate the page: 0.00811 seconds