Gamemaster Character entity
Entity defined in plugin/entities/entities/fl_gm_character.lua
Part of Gamemastery
The entity that stands for a pool character placed in the world by a gamemaster.
Gamemastery.spawn_in_world creates it and gives it the character with set_character,
which applies the model and the skin of the character; the entity plays an idle animation
and blocks like a person. Everyone sees it, but only gamemasters see the name of the
character above it. A gamemaster who presses the use key on it possesses the character
where the entity stands, which removes the entity.
Summary
Methods
Methods
Draws the model.
ENT:DrawTargetID(_x, _y, distance)
client plugins/gamemastery/plugin/entities/entities/fl_gm_character.lua:82Draws the name of the character above the entity, with a hint about the use key, for gamemasters who look at it from up to 512 units away.
Parameters
- _x Number screen position
- _y Number screen position
- distance Number distance between the local player and the entity
Makes the entity solid like a standing person, usable and idle.
ENT:set_character(character)
server plugins/gamemastery/plugin/entities/entities/fl_gm_character.lua:40Gives the entity a pool character: its model and skin, and its ID and name for the clients.
Parameters
- character Character
Starts the idle animation of the model.
Keeps the animation running every tick.
Returns
- Boolean true, which makes the engine call it again at the next tick
ENT:Use(activator, _caller)
server plugins/gamemastery/plugin/entities/entities/fl_gm_character.lua:62Lets a gamemaster who presses the use key on the entity possess its character.
Parameters
- activator Entity the entity that pressed the use key, normally a Player
- _caller Entity