pub struct LuaPlayerSetControllerParams {
pub character: LuaEntity,
pub chart_mode_cutoff: f64,
pub final_transition_time: u32,
pub position: MapPosition,
pub start_position: MapPosition,
pub start_zoom: f64,
pub surface: LuaAny,
pub type: String,
pub waypoints: Vec<CutsceneWaypoint>,
}Expand description
Set the controller type of the player.
Setting a player to defines.controllers.editor auto promotes the player to admin and enables cheat mode. Setting a player to defines.controllers.editor also requires the calling player be an admin.
Fields§
§character: LuaEntityEntity to control. Mandatory when type is defines.controllers.character, ignored otherwise.
chart_mode_cutoff: f64If specified and type is defines.controllers.cutscene, the game will switch to chart-mode (map zoomed out) rendering when the zoom level is less than this value.
final_transition_time: u32If specified and type is defines.controllers.cutscene, it is the time in ticks it will take for the camera to pan from the final waypoint back to the starting position. If not given the camera will not pan back to the start position/zoom.
position: MapPositionIf specified and type is defines.controllers.remote, the position the remote controller will be centered on.
start_position: MapPositionIf specified and type is defines.controllers.cutscene, the cutscene will start at this position. If not given the start position will be the player position.
start_zoom: f64If specified and type is defines.controllers.cutscene, the cutscene will start at this zoom level. If not given the start zoom will be the player’s zoom.
surface: LuaAnyIf specified and type is defines.controllers.remote, the surface the remote controller will be put on.
type: StringWhich controller to use.
waypoints: Vec<CutsceneWaypoint>List of waypoints for the cutscene controller. This parameter is mandatory when type is defines.controllers.cutscene.
Trait Implementations§
Source§impl Clone for LuaPlayerSetControllerParams
impl Clone for LuaPlayerSetControllerParams
Source§fn clone(&self) -> LuaPlayerSetControllerParams
fn clone(&self) -> LuaPlayerSetControllerParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more