Difference between revisions of "LUA:IsEpic"

(Created page with "= LUA Functions: Knockback() = Plays the knockback animation and can push a player back ==== Syntax ==== Knockback(param1, param2, param3, [param4], [param5], [param6]) ==== P...")
 
 
Line 1: Line 1:
= LUA Functions: Knockback() =
+
= LUA Functions: IsEpic() =
Plays the knockback animation and can push a player back
+
Checks to see if the given spawn is epic
  
 
==== Syntax ====
 
==== Syntax ====
Knockback(param1, param2, param3, [param4], [param5], [param6])
+
IsEpic(param1)
  
  
 
==== Parameters ====
 
==== Parameters ====
; Required - ''param1'' (Spawn), ''param2'' (Spawn), ''param3'' (int32)
+
; Required - ''param1'' (Spawn)
: ''param1'' is the spawn performing the knockback
+
: ''param1'' is the spawn to check
: ''param2'' is the spawn being knocked back
+
 
: ''param3'' is the animation duration in milliseconds
 
; Optional - ''param4'' (float), ''param5'' (float), ''param6'' (int8)
 
: '' param4'' is the vertical movement
 
: ''param4'' is the horizontal movement
 
: ''param5'' is use player heading
 
  
 
==== Usage ====
 
==== Usage ====
 
<pre>
 
<pre>
 
function hailed(NPC, Spawn)
 
function hailed(NPC, Spawn)
     Knockback(NPC, Spawn, 4000)
+
     if IsEpic(NPC) then
 +
        Say(NPC, "I am epic!")
 +
    end
 
end
 
end
 
</pre>
 
</pre>
  
When the NPC is hailed it will knockback the spawn that hailed it
+
When the NPC is hailed it will respond if it is epic
 
 
== Notes ==
 
To get the knocked on back set ''param3'' to at least 4000 (4 seconds), any thing lower will play the knocked to knees animation
 

Latest revision as of 16:38, 6 December 2013

LUA Functions: IsEpic()

Checks to see if the given spawn is epic

Syntax

IsEpic(param1)


Parameters

Required - param1 (Spawn)
param1 is the spawn to check


Usage

function hailed(NPC, Spawn)
    if IsEpic(NPC) then
        Say(NPC, "I am epic!")
    end
end

When the NPC is hailed it will respond if it is epic