aboutsummaryrefslogtreecommitdiff
path: root/docs/modding/squirrel/respawns-functions.md
diff options
context:
space:
mode:
authorJMM889901 <41163714+JMM889901@users.noreply.github.com>2022-01-27 13:21:56 +0000
committerGitHub <noreply@github.com>2022-01-27 14:21:56 +0100
commit8ebc0a67c03886fe09c771af432683500ecabf83 (patch)
tree985b2cd15796b6a4d5142dc7653b4206fe907cb1 /docs/modding/squirrel/respawns-functions.md
parent7f08b061845ca4f926b939acad6bd2dea8a7dce3 (diff)
downloadNorthstarWiki-8ebc0a67c03886fe09c771af432683500ecabf83.tar.gz
NorthstarWiki-8ebc0a67c03886fe09c771af432683500ecabf83.zip
Began adding entries for squirrel GNUT scripting (#27)
* bruh * Update what-is-squirrel.md * Create Handling-threads-and-waits.md * Update Handling-threads-and-waits.md * Update What-are-callbacks.md * i got locked out while making this * Update what-is-squirrel.md * confusion is bad * funne colors * bruh * Language moment * Update the-mod-file.md * Json moment * Update The-JSON.md * Update The-JSON.md * Update The-JSON.md * Update The-language-file.md * Update The-language-file.md * Update the-mod-file.md * Update The-language-file.md * Create The-mod-init.md * got distracted, will finish later * pain * Update The-mod-init.md * fixed typo * Rename What-are-callbacks.md to what-are-callbacks.md * Rename Loops-Functions-and-if.md to loops-functions-and-if.md * Rename docs/modding/squirrel/Setting mods/the-mod-file.md to docs/modding/squirrel/setting-mods/the-mod-file.md * Rename docs/modding/squirrel/Setting mods/The-language-file.md to docs/modding/squirrel/setting mods/the-language-file.md * Rename docs/modding/squirrel/Gamemode mods/The-mod-init.md to docs/modding/squirrel/gamemode mods/the-mod-init.md * Rename Handling-threads-and-waits.md to handling-threads-and-waits.md * Rename docs/modding/squirrel/Setting mods/The-JSON.md to docs/modding/squirrel/setting mods/the-json.md * Rename Respawns-Functions.md to respawns-functions.md * Rename docs/modding/squirrel/gamemode mods/the-mod-init.md to docs/modding/squirrel/gamemode-mods/the-mod-init.md * Rename docs/modding/squirrel/setting mods/the-json.md to docs/modding/squirrel/setting-mods/the-json.md * Rename docs/modding/squirrel/setting mods/the-language-file.md to docs/modding/squirrel/setting-mods/the-language-file.md * tables do kinda be cool tho * var is better now * bruh
Diffstat (limited to 'docs/modding/squirrel/respawns-functions.md')
-rw-r--r--docs/modding/squirrel/respawns-functions.md41
1 files changed, 41 insertions, 0 deletions
diff --git a/docs/modding/squirrel/respawns-functions.md b/docs/modding/squirrel/respawns-functions.md
new file mode 100644
index 0000000..0a40a25
--- /dev/null
+++ b/docs/modding/squirrel/respawns-functions.md
@@ -0,0 +1,41 @@
+Useful functions and variables from respawn
+=========================
+Throughout this guide many functions and values made by respawn will be referenced in examples, in the interest of not confusing people those functions, and other frequently used ones, will be listed and explained here
+for a full list (although without explaination) go here https://github.com/ScureX/Titanfall2-ModdingDocumentation/blob/main/AllMethodsClean.md
+
+GetplayerArray()
+----------------
+Returns and array of entities representing each player, not that it does not just return return the playername but the actual entities, as such all values associated with players can be called like his
+
+*array*.len()
+-----------------
+Returns the number of objects in an array, thats about it.
+
+GameTime_TimeLeftSeconds()
+-----------------
+returns the remaining game time
+
+weapon.GetWeaponClassName
+------------
+returns the name of a weapon entity
+
+player.functions
+============
+This section contains many functiosn that can be applied to the player entity
+
+player.GetMainWeapons()
+----------------
+returns a list of all weapons equipped by that player. this is a list of entities
+
+player.GetOffHandWeapons()
+------------
+Returns a list of all offhand weapons (grenades, boosts, abilities). this is a list of entities
+
+player.TakeWeaponNow( weaponname )
+--------------
+removes weapon of that name, best used with a foreach using the previous functions
+
+player.GiveWeapon( Weaponname, mods)
+-----------------
+gives the player a weapon, the mods field must be empty or a list of strings ["mod","mod2"]
+