Sinespace Client 2025.3.19431
Client-side scripting for Sinespace
SineSpace.Scripting.Components.SModularVehicle Class Reference
Inheritance diagram for SineSpace.Scripting.Components.SModularVehicle:
ScriptClassComponent< T > ScriptClass< T > ScriptClassWrapper< T > ScriptClass

Public Member Functions

void ForceSetOwner (int newOwner, int vehicleId)
 Force player of the id owned this vehicle, but only between this spawned vehicle. But it seems the new owner can’t drive on this vehicle.
 
void ForceActivate ()
 Force player drive on this vehicle.
 
void ForceDeactivate ()
 Force player out of the vehicle,.
 
void SuppressTimeout ()
 Disable the vehicle automatic respawn.
 
void OverrideOnClick (Closure onClick)
 Add onClick method to this vehicle,onClick have to be a closure.
 
- Public Member Functions inherited from ScriptClassWrapper< T >
override void Initialise (SScript runtime, object wrapper)
 
- Public Member Functions inherited from ScriptClass
void ReportError (string error, bool fatal, UnityEngine.Object target=null)
 
void Initialise (SScript runtime, object wrapper)
 

Properties

float VerticalInput [get, set]
 Force vertical offset value, it would be added to vertical control and never set to zero.
 
float HorizontalInput [get, set]
 Force horizontal offset value, it would be added to horizontal control and never set to zero.
 
float StrafeInput [get, set]
 Force strafe offset value,it would be added to strafe control and never set to zero.
 
float DepthInput [get, set]
 Force depth offset value, it would be added to depth control and never set to zero.
 
bool IgnoreUserInput [get, set]
 If this option is enabled, user input would be ignored until disable this.
 
SAvatar Driver [get]
 Get the player avatar component.
 
- Properties inherited from ScriptClassComponent< T >
SGameObject GameObject [get]
 Return the GameObject which component added.
 
- Properties inherited from ScriptClass< T >
override bool Alive [get]
 Return if the component is alive.
 
- Properties inherited from ScriptClassWrapper< T >
_wrap [get]
 
- Properties inherited from ScriptClass
virtual bool Alive [get]
 
DynValue CachedData [get, set]
 

Additional Inherited Members

- Protected Member Functions inherited from ScriptClass
void Initialise (SScript runtime)
 

Member Function Documentation

◆ ForceActivate()

void SineSpace.Scripting.Components.SModularVehicle.ForceActivate ( )

Force player drive on this vehicle.

&ndash;get modular vehicle component.
vehicle = Space.Scene.Find("Vehicle name").Vehicle
&ndash;force player drive this vehicle
vehicle.ForceActivate()

◆ ForceDeactivate()

void SineSpace.Scripting.Components.SModularVehicle.ForceDeactivate ( )

Force player out of the vehicle,.

&ndash;get modular vehicle component.
vehicle = Space.Scene.Find("Vehicle name").Vehicle
&ndash;force player out of this vehicle
vehicle.ForceDeactivate()

◆ ForceSetOwner()

void SineSpace.Scripting.Components.SModularVehicle.ForceSetOwner ( int newOwner,
int vehicleId )

Force player of the id owned this vehicle, but only between this spawned vehicle. But it seems the new owner can’t drive on this vehicle.

&ndash;get modular vehicle component.
vehicle = Space.Scene.Find("Vehicle name").Vehicle
&ndash;set ignore user input to true
vehicle.ForceSetOwner(Space.Scene.GetAvatar("Username").ID)

◆ OverrideOnClick()

void SineSpace.Scripting.Components.SModularVehicle.OverrideOnClick ( Closure onClick)

Add onClick method to this vehicle,onClick have to be a closure.

&ndash;get modular vehicle component.
vehicle = Space.Scene.Find("Vehicle name").Vehicle
&ndash;get closure you want to define, the closure here to switch horizontal offset.
function GetOnClickClosure()
local horizontal = 1
return function ()
vehicle.Horizontal = horizontal
horizontal = horizontal * -1
end
end
&ndash;register closure to onclick
vehicle.OverrideOnClick(GetOnClickClosure())
void OverrideOnClick(Closure onClick)
Add onClick method to this vehicle,onClick have to be a closure.
Definition SModularVehicle.cs:213

◆ SuppressTimeout()

void SineSpace.Scripting.Components.SModularVehicle.SuppressTimeout ( )

Disable the vehicle automatic respawn.

&ndash;get modular vehicle component.
vehicle = Space.Scene.Find("Vehicle name").Vehicle
&ndash;disable the vehicle automatic respawn, you should delete this vehicle manually,
vehicle.SuppressTimeout()

Property Documentation

◆ DepthInput

float SineSpace.Scripting.Components.SModularVehicle.DepthInput
getset

Force depth offset value, it would be added to depth control and never set to zero.

&ndash;get modular vehicle component.
vehicle = Space.Scene.Find("Vehicle name").Vehicle
&ndash;set depth input to 0.5
vehicle.DepthInput = 0.5

◆ Driver

SAvatar SineSpace.Scripting.Components.SModularVehicle.Driver
get

Get the player avatar component.

&ndash;get modular vehicle component.
vehicle = Space.Scene.Find("Vehicle name").Vehicle
&ndash;disable the vehicle automatic respawn, you should delete this vehicle manually,
Space.Log(vehicle.Driver.Name)

◆ HorizontalInput

float SineSpace.Scripting.Components.SModularVehicle.HorizontalInput
getset

Force horizontal offset value, it would be added to horizontal control and never set to zero.

&ndash;get modular vehicle component.
vehicle = Space.Scene.Find("Vehicle name").Vehicle
&ndash;set horizontal input to 0.5
vehicle.HorizontalInput = 0.5

◆ IgnoreUserInput

bool SineSpace.Scripting.Components.SModularVehicle.IgnoreUserInput
getset

If this option is enabled, user input would be ignored until disable this.

&ndash;get modular vehicle component.
vehicle = Space.Scene.Find("Vehicle name").Vehicle
&ndash;set ignore user input to true
vehicle.IgnoreUserInput = true

◆ StrafeInput

float SineSpace.Scripting.Components.SModularVehicle.StrafeInput
getset

Force strafe offset value,it would be added to strafe control and never set to zero.

&ndash;get modular vehicle component.
vehicle = Space.Scene.Find("Vehicle name").Vehicle
&ndash;set strafe input to 0.5
vehicle.StrafeInput = 0.5

◆ VerticalInput

float SineSpace.Scripting.Components.SModularVehicle.VerticalInput
getset

Force vertical offset value, it would be added to vertical control and never set to zero.

&ndash;get modular vehicle component.
vehicle = Space.Scene.Find("Vehicle name").Vehicle
&ndash;set vertical input to 0.5
vehicle.VertivalInput = 0.5