Locked for another import
UserFunctionReference
From Hw2wiki
Category:HW2/Category:Karos Graveyard/Category:Function/Category:User
Original article [1]
Read Only archive (including history and comments) [2]
Extracted Content
User-Created Functions
If you've created any functions that you feel are useful, and would like to share them, please list them here.
//
If you've created any functions that you feel are useful, and would like to share them, please list them here.
AI Functions
- None.
Autoexec Functions These functions go into " Homeworld2\Bin\Autoexec.lua".
- updateTimer by Eiden & Mecha. Displays an in-game timer.
Gametype (Singleplayer & Multiplayer) Functions
- PickRandomMusicTrackRule by EvilleJedi. Starting point for music player with playlist.
- SobGroup_SplitGroup by Apollyon470. Splits sobgroups.
- SobGroup_SplitGroupReference by Apollyon470.
- SobGroup_ModifiySelected by EvilleJedi.
- Player_Team by Mikail. Returns the team number that a player belongs to.
- Player_NumberOfShips by Mikail. Counts the number of ships, regardless of type, in a player's fleet.
- Player_RestrictAllResearch by Mikail. Restricts all research for a given player.
- Player_BequeathResearch by Mikail. Grants all of Player 1's completed research to Player 2.
- Player_BequeathRUs by Mikail. Transfers all of Player 1's RUs to Player 2.
- Universe_SortTeams by Mikail. Sorts players based on their alliances, and stores the results in a table.
- addObjective Adds the named objective from the "objectives" table. [Modified version of the function found in the tutorial missions.]
- completeObjective Sets the named objective in the "objectives" table to "complete". [Modified version of the function found in the tutorial missions.]
- SobGroup_GetDistanceToSobGroup by SunTzu.
- Player_IsLocal by Mikail. Returns true if the player is the local player.
- Universe_RandomPlayerList by Mikail. Returns a randomized list of player indices as the contents of a table.
- Player_LaunchAllFromSelectedby evillejedi. Launch all ships docked with the selected ships by pressing a key.
- Player_ActivateGravwellOnSelectedby evillejedi. Activate/deactivate gravwell on all selected ships with the ability by pressing a key.
- Library of Miscellaneous Sobgroup Functionsby inquisitiveidiot.
- SobGroup_ExitHyperSpaceDirection by Mostly_harmless. Allows you to cause a sobgroup to exit hyperspace facing a particular direction.
Level Functions
- asteroidAdd by Mikail. Uses the HW1 method of populating volumes with resources, instead of placing each asteroid individually.
- Map Functionsby Mikail. A collection of custom map functions. Includes a library of vector functions.
- addSOBGroup by Mikail. A shortcut for creating a new sobgroup. Works like the addPath function.
Madstate Functions
- None.
UI Functions
- None.
Mathematical Functions
- round rounds a number to the nearest integer.
- Random Number Functionsby Mikail.
- Trigonometric Functionsby Mikail. Some extra trig functions not found by default in Lua.
- Vector Functionsby Mikail. Some vector manipulation functions.
- Shape Functionsby Mikail. Some 2D and 3D curve and surface functions.
String Manipulation
- None.
Table Manipulation
- Table Manipulation Functionsby Mikail.
System Facilities
