Difference between revisions of "LUA:SetVision"

(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...")
 
 
Line 1: Line 1:
= LUA Functions: IsEpic() =
+
= LUA Functions: SetVision() =
Checks to see if the given spawn is epic
+
Sets the vision for the given spawn
  
 
==== Syntax ====
 
==== Syntax ====
IsEpic(param1)
+
SetVision(param1, param2)
  
  
 
==== Parameters ====
 
==== Parameters ====
; Required - ''param1'' (Spawn)
+
; Required - ''param1'' (Spawn), ''param2'' (int8)
: ''param1'' is the spawn to check
+
: ''param1'' is the spawn whos vision we are setting
 +
: ''param2'' is the vision we are setting it to
  
  
Line 14: Line 15:
 
<pre>
 
<pre>
 
function hailed(NPC, Spawn)
 
function hailed(NPC, Spawn)
     if IsEpic(NPC) then
+
     SetVision(Spawn, 1)
        Say(NPC, "I am epic!")
 
    end
 
 
end
 
end
 
</pre>
 
</pre>
  
When the NPC is hailed it will respond if it is epic
+
When the NPC is hailed the players vision will be set to 1
 +
 
 +
== Notes ==
 +
To reset vision to normal set it to 0

Latest revision as of 17:58, 12 December 2013

LUA Functions: SetVision()

Sets the vision for the given spawn

Syntax

SetVision(param1, param2)


Parameters

Required - param1 (Spawn), param2 (int8)
param1 is the spawn whos vision we are setting
param2 is the vision we are setting it to


Usage

function hailed(NPC, Spawn)
    SetVision(Spawn, 1)
end

When the NPC is hailed the players vision will be set to 1

Notes

To reset vision to normal set it to 0