Difference between revisions of "LUA:BreatheUnderwater"

(Created page with "= LUA Functions: IsEpic() = Checks to see if the given spawn is epic ==== Syntax ==== IsEpic(param1) ==== Parameters ==== ; Required - ''param1'' (Spawn) : ''param1'' is the s...")
 
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
= LUA Functions: IsEpic() =
+
{{LUAFunction
Checks to see if the given spawn is epic
+
|Name = BreatheUnderwater
 
+
|Description = Lets the given spawn breathe underwater
==== Syntax ====
+
|Param1 = Spawn
IsEpic(param1)
+
|Param1Desc = is the spawn to breathe underwater
 
+
|Param2 = bool
 
+
|Param2Desc = is true to allow the spawn to breathe underwater
==== Parameters ====
+
|Example =
; Required - ''param1'' (Spawn)
 
: ''param1'' is the spawn to check
 
 
 
 
 
==== Usage ====
 
 
<pre>
 
<pre>
 
function hailed(NPC, Spawn)
 
function hailed(NPC, Spawn)
     if IsEpic(NPC) then
+
     BreatheUnderwater(Spawn, true)
        Say(NPC, "I am epic!")
 
    end
 
 
end
 
end
 
</pre>
 
</pre>
 
+
|ExampleDesc = When the NPC is hailed the Player will be able to breathe underwater
When the NPC is hailed it will respond if it is epic
+
|Notes = To disable pass false
 +
}}

Latest revision as of 12:20, 30 January 2021


LUA:AllFunctions - BreatheUnderwater

Return to: LUA:AllFunctions | Tutorials | Portal | Forum | Project Manager | Bug Tracker


Lets the given spawn breathe underwater

Syntax

BreatheUnderwater(param1, param2)

Parameters

Required - param1 (Spawn), param2 (bool)
param1 is the spawn to breathe underwater
param2 is true to allow the spawn to breathe underwater


Example

function hailed(NPC, Spawn)
    BreatheUnderwater(Spawn, true)
end

When the NPC is hailed the Player will be able to breathe underwater

Notes

To disable pass false