No categories assigned

LUA:Attack

Revision as of 20:59, 15 October 2012 by Jabantiz (talk | contribs) (Created page with "= LUA Functions: Attack() = Forces a NPC to attack a player. ==== Syntax ==== Attack(param1, param2) ==== Parameters ==== ; Required - ''param1'' (Spawn), ''param2'' (Spawn) ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

LUA Functions: Attack()

Forces a NPC to attack a player.


Syntax

Attack(param1, param2)


Parameters

Required - param1 (Spawn), param2 (Spawn)
param1 is the spawn that will attack the target, must be an NPC
param2 is the target, must be a player


Usage

function hailed(NPC, Spawn)
    Attack(NPC, Spawn)
end

The NPC will attack the player that hails it.