Skip to content

engine:entity_list

bones

Type

function

Description

This will set which bones you want Constellation4 to scan in the worker. If you do not provide an argument, this function will return the bones in a table. If you do provide an argument, then you must provide a table of bones. See example.

Parameters

  • table bones

Returns

  • table bones

Example

Lua
-- get entity list module
local entity_list = fantasy.engine.entity_list()

-- list all bones Constellation4 scans
for _, bone in pairs( entity_list:bones() ) do 
    print( bone )
end

-- set our bones 
entity_list:bones( { 3, 4, 7, 10 } )

fov

Type

function

Description

This will set the FOV of Constellation4 when scanning for entities. If you do not provide an argument, this function will return the FOV. If you do provide an argument, then you must provide a number. See example.

Parameters

  • number fov

Returns

  • number fov

Example

Lua
1
2
3
4
5
6
7
8
-- get entity list module
local entity_list = fantasy.engine.entity_list()

-- print our fov
print( entity_list:fov( ) )

-- set our fov
entity_list:fov( 8.2 )

friendly_fire

Type

function

Description

This will determine the entity list worker in Constellation4 to consider friendly fire. If you do not provide an argument, this function will return the status of friendly fire. If you do provide an argument, then you must provide a boolean.

Parameters

  • boolean status

Returns

  • boolean status

get_localplayer

Type

function

Returns

  • entity

get_players

Type

function

Returns

  • table

get_teammates

Type

function

Returns

  • table

get_enemies

Type

function

Returns

  • table

get_in_fov

Type

function

Description

This function not only returns a nested table of entity, but a few more values for each entity:

  • number boneid
  • number direction
  • vector bone
  • vector angle
  • number distance
  • number true_fov
  • number static_fov

Returns

  • table

get_closest

Type

function

Description

This function not only returns a entity, but a few more values for the entity:

  • number boneid
  • number direction
  • vector bone
  • vector angle
  • number distance
  • number true_fov
  • number static_fov

Returns

  • table

get_entity

Type

function

Parameters

  • userdata/number entity handle or entity index

Returns

  • entity

get_viewangles

Type

function

Returns

  • vector

get_highest_entity_index

Type

function

Returns

  • number

get_max_entities

Type

function

Returns

  • number

get_all_entities

Type

function

Returns

  • table

get_entities_by_class

Type

function

Parameters

  • number

Returns

  • table

get_entity_by_class

Type

function

Parameters

  • number

Returns

  • entity

from_handle

Type

function

Parameters

  • number/address handle

Returns

  • entity

get_player_resources

Type

function

Returns

  • address

get_localteam

Type

function

Returns

  • number

get

Type

function

Description

Only works for games that aren't fully-fledged in the FC2 entity_list sub-module. This will get the pointer memory address of the entity list.

Returns

  • address