BehemothProgrammer

Turok 2 Script API KEX4

Dec 25th, 2025
4,840
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.83 KB | None | 0 0
  1. // Game Specific only. Not going through Engine updates to existing classes.
  2.  
  3. //------------------------------------------------------------------------------------------------------------------------
  4. | Globals
  5. //------------------------------------------------------------------------------------------------------------------------
  6. const bool StartMapMP(const kStr&in mapPath); // Path to map to change to in multiplayer
  7. const int FindClosestRegion(const kVec3&in pos); // Returns -1 if couldn't find a region
  8. void SetUserData(const kStr&in data); // sets cvar "g_userdata"
  9. kStr GetUserData();
  10. void SetUserData2(const kStr&in data); // sets cvar "g_userdata2"
  11. kStr GetUserData2();
  12. void SetUserData3(const kStr&in data); // sets cvar "g_userdata3"
  13. kStr GetUserData3();
  14.  
  15. //------------------------------------------------------------------------------------------------------------------------
  16. | kAnimTrackComponent
  17. //------------------------------------------------------------------------------------------------------------------------
  18. const kStr AnimName() const; // Filename of the anim
  19.  
  20. //------------------------------------------------------------------------------------------------------------------------
  21. | kRenderMeshComponent
  22. //------------------------------------------------------------------------------------------------------------------------
  23. const kStr MeshName() const; // Filename of the mesh
  24. const uint ModelFlags() const; // Each bit set indicates that mesh is visible
  25.  
  26. //------------------------------------------------------------------------------------------------------------------------
  27. | kWorldComponent
  28. //------------------------------------------------------------------------------------------------------------------------
  29. const float GetRegionWaterHeight(const int region);
  30. void SetRegionWaterHeight(const int region, const float height);
  31. float GetFloorHeight() const;
  32. float GetCeilingHeight() const;
  33. const int GetRegionArg(const int region, const int arg);
  34. const int GetRegionFlags(const int region, const int flagsNum); // flagsNum 0..2 to return one of the three flags integers.
  35.  
  36. //------------------------------------------------------------------------------------------------------------------------
  37. | kPlayer LocalPlayer
  38. //------------------------------------------------------------------------------------------------------------------------
  39. void ChangeWeapon(const int weapon);
  40. int PlayerNumber() const; // The playerID value from 0 to 15
  41. kStr &PlayerName(); // Could return an empty string or "Unmanned Player" if unable to get the players name.
  42. kStr &PlayerSkin();
  43. int Team() const; // -1 is None, 0 = Red, 1 = Blue
  44. bool IsLocal(); // player is local (up to 8 players splitscreen can be local)
  45. bool GiveAmmo(const int weapon, const bool altAmmo, const int amount); // Use negative amount values to take ammo
  46.  
Advertisement