Difference between revisions of "LUA:IsEntity"
(Created page with "{{PageHeaderChild|LUA|IsEntity}} = LUA Functions: IsEntity() = Checks to see if the given spawn is an entity ==== Syntax ==== IsEntity(param1) ==== Parameters ==== ; Req...") |
(No difference)
|
Latest revision as of 17:32, 30 August 2019
LUA - IsEntity
Return to: LUA | Tutorials | Portal | Forum | Project Manager | Bug Tracker
LUA Functions: IsEntity()
Checks to see if the given spawn is an entity
Syntax
IsEntity(param1)
Parameters
- Required - param1 (Spawn)
- param1 is the spawn we want to check
Usage
function AttackTarget(NPC, Target)
if IsEntity(Target) then
Attack(NPC, Target)
end
end
When this function is called it will verify the target is an entity then attack it if it is
Notes
Only Entities can engage in combat
NPC, Player, Pet, Bot, Merc are all entities