Home » Renegade Discussions » Mod Forum » scripts.dll 1.6 is almost ready
scripts.dll 1.6 is almost ready [message #80186] |
Thu, 15 April 2004 03:09 |
|
Just getting the LFDS version compiled.
changes since 1.5:
Script Name: "RA_Helipad_Zone"
Description:
This script is designed to reload the ammunition of specified vehicles.
Script Parameters:
-TeamSelection: Determines which team this zone works for. 0 = Soviet, 1 = Allied
-Reload_Interval: Interval between individual reloads. Time is in seconds, default is 2.00. This allows for slowly reloading a vehicle, like a repair script slowly repairs a vehicle.
-Apache_Preset_ID: This is the preset ID of a vehicle that will be reloaded by the powerup specified by Apache_Reload_Powerup. Default is 0
-Apache_Reload_Powerup: This is the preset name of a powerup that will be granted to a vehicle matching the Apache_Preset_ID parameter. Default is 'Blank'
-Hind_Preset_ID: This is the preset ID of a vehicle that will be reloaded by the powerup specified by Hind_Reload_Powerup. Default is 0
-Hind_Reload_Powerup: This is the preset name of a powerup that will be granted to a vehicle matching the Hind_Preset_ID parameter. Default is 'Blank'
Notes: Script is attached to a script zone. It's setup for the option to allow slow reloads, but can be used for instant refills by specifying a powerup that refills all the ammunition instead of a limited amount.
**********************************************************************************************
Script Name: "RA_Mine_Layer"
Description:
This script is designed to be attached to a mine laying vehicle.
Script Parameters:
-Mine_Manager_ID: This is the instance ID of the object with the script RA_Mine_Manager
Notes: This script detects when the driver does 0.0 damage to the vehicle. The weapon on the vehicle needs to be setup properly to allow for this.
**********************************************************************************************
Script Name: "RA_Mine"
Description:
This script determines if a mine is anti-personnel and/or anti-tank. If the appropriate enemy target comes in to range, the mine self destructs. When destroyed it sends a custom to the Mine Manager.
Script Parameters:
-Mine_Manager_ID: This is the instance ID of the object with the script RA_Mine_Manager. Default is 0.
-Is_Anti-Personnel: Determines if this will blow up on soldiers. 0 = no, 1 = yes
-Is_Anti-Tank: Determines if this will blow up on vehicles. 0 = no, 1 = yes
-Trigger_Damage: Amount of damage to destroy the mine with. Default is 1.0
-Trigger_Warhead: Name of warhead type used when destroying the mine. Default is "Death"
Notes: This script should be attached to a vehicle. It uses the SightRange of the vehicle as the proximity range for triggering the mine.
**********************************************************************************************
Script Name: "RA_Mine_Manager"
Description:
This script approves all mine placements, keeps track of the amount of mines in use, and ensures that Soviets can only place soviet mines and Allies can only place allied mines even if a player steals the other team's mine layer.
Script Parameters:
-Allied_Mine: Preset name for the Allied team's land mine.
-Soviet_Mine: Preset name for the Soviet team's land mine.
-Mine_Reload: Preset name for the powerup used to refund one 'shot' in the Mine Layer if a mine laying request is denied.
-BoneName: This is the name of the bone on the Mine Layer to create a mine at. Defalut is "mine"
-Mine_Limit: This is the team mine limit. It applies seperately to each team. Default is 30
Notes: This script should be attached to an invisible object, such as a Daves Arrow. When placed on a map, its ID must match (or be changed to match) the Mine_Manager_ID param on the RA_Mine_Layer and RA_Mine scripts.
**********************************************************************************************
Script Name: "RA_ObjectDeath_OnCreate"
Description:
This script is designed to create a new object at the location of another object's creation, then kill the script generated object to make use of its KilledExplosion setting to place a sound on the map.
Script Parameters:
-Object: The preset name of the object to be created and destroyed. Default is "null"
Notes: The script should be attached to an object, such as a soldier, so that when it is created the object in the script parameter is created and destroyed. If used for its intended purpose (creating sounds) the script created object should be have no model, and the explosion used for its KilledExplosion setting should have no model and be damageless.
**********************************************************************************************
****************************************************
Scripts done by: Francois-G. Auclair aka TheKGBspy
e-mail: Boris_the_invincible@hotmail.com
e-mail2: TheKGBspy@timeofwar.com
****************************************************
****************************************************
Script Name: Ra2Ven_MirageTank
Description: Script that allow to turn the tank invisible,
and showing a model instead while keeping original
tank worldbox. It turn the tank visible while
moving and destroy the attached object.
Attributes: Tree1_Preset:String; The tree object #1
Tree2_Preset:String; The tree object #2
Tree3_Preset:String; The tree object #3
Tree4_Preset:String; The tree object #4
Explosion_Preset:String; Explosion used to destroy the object when moving.
Time:float; The "Cloak" transition delay.
TimerNumber:int; Set an unique # if the object as more than one script using a timer.
Additional notes: If you set up all the 4 tree preset value to "none" there will be a problem
so you must at least set up one object to the tank to hide into.
****************************************************
****************************************************
Script Name: Ra2Ven_VehicleFalling
Description: Domage givien to falling vehicles.
Attributes: Warhead:string; Warhead used to dommage vehicles.
DommageMultiplier=10:int; Used as a Dommage multiplier
Time=1:float; How accurate is the scripts(x<1 mean more accurate)
TimerNumber:int; Set an unique # if the object as more than one script using a timer.
Additional notes: The equation used on falling dommage is: Value = (fabs(position.Z-zpos)/2.5)*DommageMultiplier)
The script will look if the vehicle is falling on th Z axis from a big distance.
Once the vehicle start in "falling mode" it keep the Z coord. it will apply dommage until the Z movement is
suddently stopped. Then it will apply dommage.
****************************************************
****************************************************
Script Name: Ra2Ven_DemoTruck
Description: Script that will make a functional demo truck.. even if FF is off.
Attributes: FFFDommage:float; Dommage given to destroy the vehicle
FFFWh:string; Wh used to destroy the vehicle
Demo_Explosion:string: Explosion to do when the vehicle is being killed by anoyone else than the driver.
Additional notes: First to make the vehicle work, dont put an Explosion_Preset to the vehicle.
That mean the option, in the setting Tab of lvledit, should be blank. The Destroy/explosion animation
on the vehicle death should be set in the script. The primary weapon should be the demo charge... this
work same way as SSM does work, but the script look when the vehicle is beign damaged,
if its the driver, the vehicle grant the Dommage set in the script using the WH set in the script and
dont do the Demo_explosion. The Demo_explosion is used when the vehicle is killed by someone who is
not the driver.
****************************************************
****************************************************
Script Name: Ra2Ven_Deployable_Vehicle
Description: Script used to allow deploy abbility to a vehicle.
Attributes: Animation_Preset:string; Preset name of the Animation (like a standard vehicle.. but
with anim.. and having the script Ra2Ven_Deploy_Animation attached to that anim object)
oldTnk_Wh:string; Warhead used to destroy the deployable vehicle.
oldTnk_Dommage:float; Dommage to do to destroy the vehicle.
Explosion_preset:string: This is used as destroy animation.
Additional notes: The Explosion_preset is used as destruction animation. its set in the script instead
of the lvledit because when being destroyed for deploy animation, the tank may have an explosion
animation.. wich may look odd beause you are deploying and not destroying the tank. Setting the explosion_preset
allow you to use the Destruction_anim only when the tank is destroyed... not while beign deployed.
The Deploy logic, using self attack work as same way as the reborn one.
For best result, your deploy/deploy animation/deployed/undeploy animation should have all the origin setted at the same position in the model,
and make sure that every woldbox of each models has same size.
If you deploy any ground unit to another ground units, make sure the deployable object origin is at Z value from the ground
and all model will have the same origin height from the ground. or else it might cause some bug.
And what new to this script from reborn one? you dont really need to create new WH or new armor in the armor ini to deploy a tank.
That version also fix an issue on uneven terrain, where vehicle could be stuck on the terrain when deploying.
It also fix a minor issue, when transfering the Heatlh and the Sheild value. Now it send the Ratio, That mean
The Normal vehicle has a max of 300 of sheild and he currently has 150 of sheild. The deployed Vehicle have
a max of 500. the sheild value will be 250. ((150/300)*500 = 250).
****************************************************
****************************************************
Script Name: Ra2Ven_Deploy_Animation
Description: Attach to that script to an object that will be a Deploy animation.
Attributes: Deployed_Tank_Preset:string; Preset name of the deployed tank.
oldTnk_Wh:string; Warhead used to destroy the animation.
oldTnk_Dommage:float; Dommage to do to destroy the animation.
Animation_Time:float; Time before destroying the animation to spawn the deployed tank.
TimerNumber:int; Set an unique # if the object as more than one script using a timer.
Additional notes:
****************************************************
JFW_Object_Draw_In_Order_2 (draws a series of models in order)
Location (where to draw the model)
Custom (what custom will cause the next model to be shown)
BaseName (the base name of the models, numbers from Start_Number on up will be appended to this to generate the actual name)
Count (how many models to show)
Start_Number (what model number to start at)
JFW_Custom_Multiple_Send_Custom (when this recieves a particular custom a certain number of times it sends a custom)
RecieveMessage (message to recieve)
RecieveCount (how many times to recieve, when it has recieved it exactly this many times, it sends the other custom)
SendMessage (message to send)
SendParam (parameter to send)
SendID (ID of object to send it to)
JFW_Create_Destroy_Object_On_Custom (creates an object on a custom then destroys it on another custom)
Location (where to create the object)
Facing (what direction it should face)
Preset (what preset to use)
CreateMessage (message for creation)
DestroyMessage (message for destruction)
JFW_Create_Destroy_Object_On_Custom_Animate (creates an object on a custom plus sets an animation on it then destroys it on another custom)
Location (where to create the object)
Facing (what direction it should face)
Preset (what preset to use)
CreateMessage (message for creation)
DestroyMessage (message for destruction)
Animation (animation to play on creation)
Loop (whether to loop or not, 0 = not loop, 1 = loop)
Subobject (the subobject to use for the creation animation, a value of 0 will mean "no subobject")
Unknown1 (unknown value for creation animation, 0 works)
Frame (something to do with frame for creation animation, -1 works)
Unknown2 (unknown value for creation animation, 0 = disabled, 1 = enabled, 0 is what works for me)
JFW_Create_Destroy_Object_On_Custom_Animate_2 (creates an object and sets an animation on it on a custom then plays another animation on a second custom and destroys the object when the second animation is finished)
Location (where to create the object)
Facing (what direction it should face)
Preset (what preset to use)
CreateMessage (message for creation)
DestroyMessage (message for destruction)
CreateAnimation (animation to play on creation)
CreateLoop (whether to loop or not, 0 = not loop, 1 = loop)
CreateSubobject (the subobject to use for the creation animation, a value of 0 will mean "no subobject")
CreateUnknown1 (unknown value for creation animation, 0 works)
CreateFrame (something to do with frame for creation animation, -1 works)
CreateUnknown2 (unknown value for creation animation, 0 = disabled, 1 = enabled, 0 is what works for me)
DestroyAnimation (animation to play on destroy)
DestroySubobject (the subobject to use for the destroy animation, a value of 0 will mean "no subobject")
DestroyUnknown1 (unknown value for destroy animation, 0 works)
DestroyFrame (something to do with frame for destroy animation, -1 works)
DestroyUnknown2 (unknown value for destroy animation, 0 = disabled, 1 = enabled, 0 is what works for me)
Time (how long to wait after starting the DestroyAnimation before destroying the object)
TimerNum (number to use for the timer)
JFW_Damaged_Send_Custom_Amount (sends a custom when the object is damaged based on how much damage was done)
ID (object to send the message to)
Message1 (message to send when the damage amount is less than the specified amount)
Message2 (message to send when the damage amount is greater than or equal to the amount)
Damage (amount of damage to test for, negative amounts mean repair, positive mean damage)
JFW_Invulnerable_On_Custom (makes an object invulnerable or turns it off when sent a custom)
Message (message to wait for, send 1 for parameter to turn on, 0 for parameter to turn off)
The object made invulnerable will still die if its hit by a weapon big enough to kill it in one hit.
But unfortunatly, there is nothing I can do about that
JFW_Invulnerable_On_Custom_2 (makes an object invulnerable or turns it off when sent a custom)
Message (message to wait for, send 1 for parameter to turn on, 0 for parameter to turn off)
InvulnerableArmour (armour type to use when its invulnerable)
NormalArmour (armour type to restore it to when it stops being invulnerable)
This is a better version of JFW_Invulnerable_On_Custom that overcomes the limitation mentioned above.
Use Blamo for the invulnerable armour, this should protect against everything.
The bad news is that it appears as though buildings ignore the Shield settings altogether.
I set the shield type to Blamo and the shield strength and max shield strength to 1000 on a
refinery controler and I was still able to shoot at it with an orca. So, this script doesnt work on buildings
JFW_Per_Preset_Visible_Person_In_Vechicle (makes a person model show up in a vechicle when someone is inside it)
BoneName (bone to attatch the person object to)
Message (message to send)
JFW_Per_Preset_Visible_People_In_Vechicle (makes a person model show up in a vechicle when someone is inside it, this one does it twice for 2 people in the vechicle)
BoneName1 (bone name to attatch the person object to for the first model)
BoneName2 (bone name to attatch the person object to for the second model)
Message1 (message to send for the first model)
Message2 (message to send for the second model)
JFW_Visible_Person_Settings (script for doing the per-infantry-preset part of the visible people logic)
Message (message to listen for)
ModelName (the name of the w3d file to use for the person model, without the .w3d on the end)
Animation (the name of the animation to play on the person model, it will loop indefinatly as long as the person model is visible)
Subobject (the subobject to use for this animation, a value of 0 will mean "no subobject")
Unknown1 (an unknown value, 0 works)
Frame (something to do with frame, -1 works)
Unknown2 (unknown value, 0 = disabled, 1 = enabled, 0 is what works for me)
Basicly, you stick JFW_Visible_Person_Settings on an infantry preset and JFW_Per_Preset_Visible_Person_In_Vechicle or JFW_Per_Preset_Visible_People_In_Vechicle on the vechicle preset.
If you dont put JFW_Visible_Person_Settings on an infantry unit, you will get an invisible model.
Dont forget to do it for both teams (even if you only have vechicles with visible drivers for one team, remember that the other team may steal one)
You can use different messages (and different settings for JFW_Visible_Person_Settings) for each vechicle if you want.
The model you use must have no worldbox/boundingbox/etc and should have all collision flags set to off.
NHP_Sensor_Array_Zone:
This is a zone designed to turn a 3D sound on and off (it automaticlly creates the sound). It takes 4 parameters. Make sure you also use the script NHP_Sensorable_Object
Sensor_List_File, this is the text file that contains all the preset names to look for. It will NOT work with presets that have spaces in their names. The first word/number should be the number of presets in the list minus one, and the rest should be the preset names. Example, you want the sensor to sound an alarm when an Orca, Medium Tank, or Stealth Tank enter the zone, the file with the list would look like
2 CnC_GDI_Orca CnC_GDI_Medium_Tank CnC_Nod_Stealth_Tank
The presets do not have to be in any particular order.
Sound_Preset: This is just the preset name of a 3D sound to play when somethings inside the zone.
Sound_Position: Where to place the 3D sound.
Check_Team: The team to ignore, ie, if you have a sensor on the GDI team, you probally want to set this to 1 so it ignores GDI units. 1 = GDI, 2 should = Nod, etc...
Notice: This script will not stop triggering the alarm on it's own when a sensor is blown up. You must use a script to send the custom/message 901192102 in order to turn the alarm off. There should already be some JFW scripts for this.
NHP_Senserable_object: No parameters, just attach this to objects that the sensors are to detect. This is used because the sensors do not pick up dead objects in the leave event, so if you don't use this script, sensors may leave the alarm on if something they're supposed to detect blows up inside the zone. Notice: DO NOT OVERLAP SENSOR ZONES! This script WILL NOT work properly if it is inside 2 or more script zones with the sensor script at the same time! Some alarms will be left on!
Some scripts written by Vloktboky and documented by Jonathan Wilson:
KAK_Give_Powerup_On_Pickup (when the collectable item this is attatched to is collected, it gives you a powerup)
Powerup_Preset (powerup to give)
KAK_Select_Weapon_Zone (when this zone is entered or exited, it selects a weapon on the char the entered/exited the zone)
Weapon_Preset (wespon to select)
OnEnter (0 = dont select, 1 = select)
OnExit (0 = dont select, 1 = select)
KAK_Select_Weapon_On_Pickup (when the collectable item this is attatched to is picked up, it selects a weapon on the char that picked it up)
Weapon_Preset (weapon to select)
KAK_Harvester_Logic (script for AI harvester controler)
Harvester_Preset (harvester preset)
Explosion_Preset (preset to use for explosion to clear area before spawning harvester)
KAK_Harvester_Attached (script to attatch to harvester)
LogicID (ID of the object with KAK_Harvester_Logic attatched)
Number_Of_Paths (how many waypaths)
Waypath1_Dock2Field (waypath 1 from dock to field)
Waypath1_Field2Dock (waypath 1 from field to dock)
Waypath1_Tib_Zone (centerpoint for the first tiberium zone)
Waypath2_Dock2Field (waypath 2 from dock to field)
Waypath2_Field2Dock (waypath 2 from field to dock)
Waypath2_Tib_Zone (centerpoint for the second tiberium zone)
Waypath3_Dock2Field (waypath 3 from dock to field)
Waypath3_Field2Dock (waypath 3 from field to dock)
Waypath3_Tib_Zone (centerpoint for the third tiberium zone)
Harvest_Animation (animation for when its harvesting, repeats for the whole harvesting time. Set to the string 0 if you dont want the effect)
Dock_Animation (animation for when it docks, plays once. Set to the string 0 if you dont want the effect)
Tiberium_Idle_Time (how long to harvest for)
Dock_Location (location to dock at)
Dock_Idle_Time (how long to dock for)
Dock_Credits (how much credits to give when docked)
Harvester_Create_Idle_Time (how long to wait when a harvester is blown up before re-creating it. Doesnt affect the harvester created at startup)
Crystal_Preset (preset for the tiberium crystal effect. Set to the string 0 if you dont want the effect)
KAK_Harvester_Kill (script attatched to refinery to make the harvesting stop when the refinery is killed. Can also stick on power plant or anything else that should stop the harvesting when it dies)
LogicID (ID of the object with KAK_Harvester_Logic attatched)
KAK_Harvester_Spawn_Kill (stick this on anything. When whatever its on is killed, no more harvesters will be respawned. But harvesting will continue)
LogicID (ID of the object with KAK_Harvester_Logic attatched)
These scripts are intended for an AI controlled harvester that has some advantages to the built in logic.
The only difference is that the harvester spawns from the refinery dock instead of being created at the weapons factory (but to do the latter would require a bunch of difficult to code logic)
Another thing to note is that the Crystals appear on the field the harvester is heading to only and they are only visible from the time the harvester starts going to the field.
How to set up:
1.create a clone of the daves arrow
2.change the model from o_davesarrow.w3d to your harvester model. Leave all other settings unchanged (it will still remain invisible in game)
3.attatch KAK_Harvester_Logic to the script, using the correct harvester preset and explosion. Make sure the explosion does enough damage to kill anything in the harvester spawn area.
4.place this object in the dock bay of the refinery. Make sure its facing the way the harvester has to face when it unloads.
5.attatch KAK_Harvester_Kill to whatever objects are appropriate to attatch it to, setting the parameter appropriatly.
6.create the tiberium field(s) in the usual way (with the texture and the material settings, this will make it deadly to infantry).
7.create both waypoints for each field (or just have one)
8.set up the harvester (with the animations if you want them)
9.set up the tiberium crystal preset if you want it
10.put KAK_Harvester_Attached on the harvester preset, with all parameters set as appropriate
Note that these scripts dont have the regular "credit trickle" effect of the refinery. If you want that, there are ways to get it (for example using GTH_Credit_Trickle)
Also:
Some fixes to reborn_deployable_vechcile
A bunch of fixes to some scripts that use Action_Goto (for example, JFW_Guard_Duty and others) that should stop some of the reported problems with said scripts.
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
|
|
|
Goto Forum:
Current Time: Sun Dec 29 12:32:59 MST 2024
Total time taken to generate the page: 0.01309 seconds
|