Difference between revisions of "Default Ruleset Function Documentation Template"

From Legends of Aria Admin and Modding Wiki
Jump to: navigation, search
(Created page with "{''You can use the code of this page as a template when creating a function documentation in the Category:Shards Online Lua Interface or Category:Function Reference...")
 
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
{''You can use the code of this page as a template when creating a function documentation in the [[:Category:Shards Online Lua Interface]] or [[:Category:Function Reference]] category. Everything italic in curly brackets is just a comment or explanation and not part of the template.''}
+
{''You can use the code of this page as a template when creating a function documentation in the [[:Category:Shards Online Lua Interface]] or [[:Category:Function Reference]] category. ''}
  
{REMOVEME: Template for API Functions}
+
You can copypaste the block below as a starter for your own page.
== <code>'''SetWorldPosition(...)'''</code> ===
+
<br>Below the block you can see how it will look.
 +
 
 +
<pre>
 +
== <code>'''OpenTitleWindow(user)'''</code> ==
 
{|
 
{|
 
|-
 
|-
| Function Type: || Default Ruleset|-
+
| Function Type: || Default Ruleset
| File: || base_quest_sys.lua|-
+
|-
 +
| Module: || player
 +
|-
 +
| File: || base_player_titles.lua
 
|}
 
|}
  
 
===Description ===
 
===Description ===
Sets the position of this object in the world
+
Opens the title window for the given user
  
 
=== Prototype ===
 
=== Prototype ===
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
mBool = mObj:SetWorldPosition(mLoc )
+
OpenTitleWindow(user)
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
Parameters:
 
Parameters:
(GameObj) mObj: The gameobject you want to place somewhere in the world
+
{|
(Loc)     mLoc: The location where to put the object
+
|<code>(GameObj)</code> || <code>user:</code> || user to show his title window
 +
|-
 +
|<code>(type)</code> || <code>name:</code> || Description
 +
|}
  
 
Return Values
 
Return Values
(boolean) mBool: True on success. False otherwise.
+
{|
 +
|-
 +
|<code>(type)</code> || <code>name:</code> || Description
 +
|}
 +
 
  
 
=== Notes and Caveats ===
 
=== Notes and Caveats ===
This works for both mobile and non-mobile objects. This will remove objects from containers and equipment slots
+
none
<br>Don't place GameObjects outside the map coordinates. Just don't do it. Its evil
+
=== Examples ===
 +
<syntaxhighlight lang="lua">
 +
-- opens the title window for user "this"
 +
OpenTitleWindow(this)
 +
</syntaxhighlight>
 +
 
 +
 
 +
[[Category:Default Ruleset]][[Category:Function Reference]]
 +
</pre>
 +
 
  
 +
== <code>'''OpenTitleWindow(user)'''</code> ==
 +
{|
 +
|-
 +
| Function Type: || Default Ruleset
 +
|-
 +
| Module: || player
 +
|-
 +
| File: || base_player_titles.lua
 +
|}
 +
 +
===Description ===
 +
Opens the title window for the given user
 +
 +
=== Prototype ===
 +
<syntaxhighlight lang="lua">
 +
OpenTitleWindow(user)
 +
</syntaxhighlight>
 +
 +
Parameters:
 +
{|
 +
|<code>(GameObj)</code> || <code>user:</code> || user to show his title window
 +
|-
 +
|<code>(type)</code> || <code>name:</code> || Description
 +
|}
 +
 +
Return Values
 +
{|
 +
|-
 +
|<code>(type)</code> || <code>name:</code> || Description
 +
|}
 +
 +
 +
=== Notes and Caveats ===
 +
none
 
=== Examples ===
 
=== Examples ===
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
-- puts "this" to the map origin
+
-- opens the title window for user "this"
mLoc = Loc(0,0,0)
+
OpenTitleWindow(this)
mResult = this:SetWorldPosition(mLoc)
 
print("Success: "..tostring(mResult) )
 
 
</syntaxhighlight>
 
</syntaxhighlight>
The example places the object mObj to the map origin Loc(0,0,0)
 
  
[[Category:Shards Online Lua Interface]][[Category:Function Reference]]
+
 
 +
[[Category:Default Ruleset]][[Category:Function Reference]]

Latest revision as of 19:22, 1 November 2016

{You can use the code of this page as a template when creating a function documentation in the Category:Shards Online Lua Interface or Category:Function Reference category. }

You can copypaste the block below as a starter for your own page.
Below the block you can see how it will look.

== <code>'''OpenTitleWindow(user)'''</code> ==
{|
|-
| Function Type: || Default Ruleset
|-
| Module: || player 
|-
| File: || base_player_titles.lua
|}

===Description ===
Opens the title window for the given user

=== Prototype ===
<syntaxhighlight lang="lua">
OpenTitleWindow(user)
</syntaxhighlight>

Parameters:
{|
|<code>(GameObj)</code> || <code>user:</code> || user to show his title window
|-
|<code>(type)</code> || <code>name:</code> || Description
|}

Return Values
{|
|-
|<code>(type)</code> || <code>name:</code> || Description
|}


=== Notes and Caveats ===
none
=== Examples ===
<syntaxhighlight lang="lua">
-- opens the title window for user "this"
OpenTitleWindow(this)
</syntaxhighlight>


[[Category:Default Ruleset]][[Category:Function Reference]]


OpenTitleWindow(user)

Function Type: Default Ruleset
Module: player
File: base_player_titles.lua

Description

Opens the title window for the given user

Prototype

OpenTitleWindow(user)

Parameters:

(GameObj) user: user to show his title window
(type) name: Description

Return Values

(type) name: Description


Notes and Caveats

none

Examples

-- opens the title window for user "this"
OpenTitleWindow(this)