Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Tiberian Technologies Forum » Scripts 4.2 source code is now available
Scripts 4.2 source code is now available [message #490580] Mon, 30 March 2015 03:28 Go to previous message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma:
General (3 Stars)

The public source code for 4.2 is now available at http://www.tiberiantechnologies.org/files/source-4.2rc1-test.zip

This source code is only for use with the build of 4.2 I posted earlier, those using other builds of scripts (4.3, 5.0 etc) have their own source access where necessary (or if they dont and think they should then they can contact me)

Here are some of the relavent changes people might care about:
New On_Revived call in BuildingGameObj (and derived classes) that brings buildings back to life
New Cur_Chunk_Length call in ChunkSaveClass
Remove the useless ChunkLoadClass2 and ChunkSaveClass2 classes
Fix a major bug in ChunkLoadClass::Close_Micro_Chunk (if you are using ChunkLoadClass in your own code, make sure you grab the new version of the class to pick up this fix)
Corrections to the definition of cGameData/cGameDataSinglePlayer/cGameDataSkirmish/cGameDataCnc. If you are using those classes, read GameData.h to see the details of the changes.
New Ignore_For_Tracking call in PhysicalGameObjDef. This setting (set in LE) lets you flag an object specifically as ignored by the tracking weapon logic if you want to.
New Can_Refill call in SoldierGameObjDef. This setting (set in LE) lets you flag that a soldier is not allowed to refill at the PTs.
Hew Set_Transform, Get_Transform, Get_Position, Set_Position and Get_Facing calls on PhysicalGameObj (well they aren't really new, they are just made available to scripts for the first time)
New Find_Observer call on ScriptableGameObj that lets you find the first instance of a given observer on a given object (in case you need to examine that particular observer for some reason)
New Check_If_On_Surface call on VehicleGameObj that lets you identify if a vehicle is on a particular surface type. Surface type values can be found in W3D_SURFACE_TYPES in w3d.h.
New Can_Repair call on VehicleGameObjDef. This setting (set in LE) lets you flag that a vehicle cant be repaired (by the Repair Bay building controllers or by various other repair scripts)
New Get_Engine_Sound call on VehicleGameObjDef that lets you get the engine sound preset names for a vehicle if you need to for some reason.
New Get_Targeting_Range call on WeaponClass that returns the targeting range for the weapon.
New engine call Update_Network_Object_Player which updates a network object only for a specific player
New engine calls Get_Clouds, Get_Lightning Get_Wind, Get_Rain Get_Snow and Get_Ash that get the background/weather settings from the engine (as set in LE or as last set by the various background/weather set calls)
New engine call Update_Game_Options which lets you force an update to the game options (either for an individual player or for all players by passing -1 for the ID)
New engine calls GetTTVersion and GetTTRevision that will return the values used to build the version of bandtest.dll being used.
New engine calls Set_HUD_Help_Text_Player and Set_HUD_Help_Text_Player_Text which display HUD help text (the green text in the middle of the screen in single player) for a given player
New engine call Change_String_Player which lets you change a value in strings.tdb for a specific player over the network (the value you set with this is reset on map load since strings.tdb gets reloaded)
New engine call Force_Position_Update which lets you force the position of an object to update over the network (if you dont know you need this, you probably dont. It was added because Jerad wanted it)
New engine call Get_Random_Pathfind_Spot which lets you get a random spot from the pathfinding code (not sure exactly what "random spot" means in this context though)
Mew engine call Seconds_To_Hms that lets you convert a seconds value into hours:minutes:seconds
New engine call Get_Occupant_Seat that lets you find which seat in a vehicle a given soldier is occupying. Returns -1 if they aren't in the vehicle.
New script JFW_EMP_Mine_Manager_2 is useful to read to see how to implement something where a script spawns a projectile object and that object gets "thrown" like a C4 would be.
New script JFW_Ion_Storm_Weather_2 which is useful to see how to use the Get_Clouds and Get_Lightning engine calls
Clones of the stock scripts RMV_Test_Big_Gun_Turning, M08_Nod_Turret and M10_Turret. The code in the Created event on those 3 scripts that calls Set_Targeting is worth studying if you want to see how to make a fixed base defense point the same direction it does in LE instead of starting out pointing at 0,0,0
New special custom CUSTOM_EVENT_BUILDING_REVIVED that gets sent when a building is brought back to life (so custom scripts on that building can do whatever they might need to do)


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

[Updated on: Tue, 12 May 2015 04:26]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: WWConfig Resolution Order oddity
Next Topic: BRenBot 1.54.4
Goto Forum:
  


Current Time: Mon Nov 25 11:34:35 MST 2024

Total time taken to generate the page: 0.00736 seconds