Skip to content

Metatable:Monster

Stefan A. Brannfjell edited this page Dec 19, 2017 · 5 revisions

The Monster metatable is an extention of the Creature metatable, and so can handle those methods as well.

Available methods:

addFriend(creature)
addTarget(creature, pushFront = false)
isInSpawnRange([position])
getFriendCount()
getFriendList()
getSpawnPosition()
getTargetCount()
getTargetList()
getType()
isFriend(creature)
isIdle()
isMonster()
isOpponent(creature)
isTarget(creature)
removeFriend(creature)
removeTarget(creature)
searchTarget(searchType = TARGETSEARCH_DEFAULT)
selectTarget(creature)
setIdle(idle)


addFriend(creature)

Description: N/A
Parameters:

  • creature - No description
Returns: N/A
Example:
local monster = Monster(...)
monster:addFriend(some_userdata)

Added in version: 1.0


addTarget(creature[, pushFront = false])

Description: N/A
Parameters:

  • creature - No description
  • pushFront - (optional, default: false)
Returns: N/A
Example:
local monster = Monster(...)
monster:addTarget(some_userdata, false)

Added in version: 1.0


isInSpawnRange()

Description: N/A
Parameters:

  • position - (optional, default: monster position)

Returns: true if the position is in spawn range, otherwise false
Example:
local monster = Monster(...)
monster:isInSpawnRange()

Added in version: 1.1


getFriendCount()

Description: N/A
Parameters: None
Returns: N/A
Example:

local monster = Monster(...)
monster:getFriendCount()

Added in version: 1.0


getFriendList()

Description: N/A
Parameters: None
Returns: N/A
Example:

local monster = Monster(...)
monster:getFriendList()

Added in version: 1.0


getSpawnPosition()

Description: N/A
Parameters: None
Returns: N/A
Example:

local monster = Monster(...)
monster:getSpawnPosition()

Added in version: 1.0


getTargetCount()

Description: N/A
Parameters: None
Returns: N/A
Example:

local monster = Monster(...)
monster:getTargetCount()

Added in version: 1.0


getTargetList()

Description: N/A
Parameters: None
Returns: N/A
Example:

local monster = Monster(...)
monster:getTargetList()

Added in version: 1.0


getType()

Description: N/A
Parameters: None
Returns: N/A
Example:

local monster = Monster(...)
monster:getType()

Added in version: 1.0


isFriend(creature)

Description: N/A
Parameters:

  • creature - No description
Returns: N/A
Example:
local monster = Monster(...)
monster:isFriend(some_userdata)

Added in version: 1.0


isIdle()

Description: N/A
Parameters: None
Returns: N/A
Example:

local monster = Monster(...)
monster:isIdle()

Added in version: 1.0


isMonster()

Description: N/A
Parameters: None
Returns: N/A
Example:

local monster = Monster(...)
monster:isMonster()

Added in version: 1.0


isOpponent(creature)

Description: N/A
Parameters:

  • creature - No description
Returns: N/A
Example:
local monster = Monster(...)
monster:isOpponent(some_userdata)

Added in version: 1.0


isTarget(creature)

Description: N/A
Parameters:

  • creature - No description
Returns: N/A
Example:
local monster = Monster(...)
monster:isTarget(some_userdata)

Added in version: 1.0


removeFriend(creature)

Description: N/A
Parameters:

  • creature - No description
Returns: N/A
Example:
local monster = Monster(...)
monster:removeFriend(some_userdata)

Added in version: 1.0


removeTarget(creature)

Description: N/A
Parameters:

  • creature - No description
Returns: N/A
Example:
local monster = Monster(...)
monster:removeTarget(some_userdata)

Added in version: 1.0


searchTarget([searchType = TARGETSEARCH_DEFAULT])

Description: N/A
Parameters:

  • searchType - (optional, default: TARGETSEARCH_DEFAULT)
Returns: N/A
Example:
local monster = Monster(...)
monster:searchTarget(TARGETSEARCH_DEFAULT)

Added in version: 1.0


selectTarget(creature)

Description: N/A
Parameters:

  • creature - No description
Returns: N/A
Example:
local monster = Monster(...)
monster:selectTarget(some_userdata)

Added in version: 1.0


setIdle(idle)

Description: N/A
Parameters:

  • idle - No description
Returns: N/A
Example:
local monster = Monster(...)
monster:setIdle(unknown)

Added in version: 1.0

Clone this wiki locally