Skip to content

types.player_simulation ​

A player simulation utility

Properties ​

NameDescription
entitytype: userdata The simulated entity

Functions ​

new(): types.player_simulation ​

Creates a new player simulation instance

simulate_multiple(opt_player : userdata, ticks : number): table<number, types.tick_record> ​

Simulates multiple ticks

  • opt_player (userdata) (optional) The player to clone
  • ticks (number) The number of ticks to simulate
  • returns (table<number,) types.tick_record> An array of tick records

simulate_once(): types.tick_record ​

Simulates a single tick

create_or_destroy(): boolean ​

Creates or destroys the simulation entity, must be called every tick

  • returns (boolean) Whether the entity is valid