SModularVehicle
Dans cette classeForceSetOwner
| Fonction | ForceSetOwner | Force player of the id owned this vehicle, but only between this spawned vehicle. |
| Fonction | ForceActivate | Force player drive on this vehicle |
| Fonction | ForceDeactivate | Force player out of the vehicle. |
| Fonction | SuppressTimeout | Disable the vehicle automatic respawn |
| Fonction | OverrideOnClick | Add onClick method to this vehicle,onClick have to be a closure. |
| Propriété | VerticalInput | Force vertical offset value, it would be added to vertical control and never set to zero. |
| Propriété | HorizontalInput | Force horizontal offset value, it would be added to horizontal control and never set to zero. |
| Propriété | StrafeInput | Force strafe offset value,it would be added to strafe control and never set to zero. |
| Propriété | DepthInput | Force depth offset value, it would be added to depth control and never set to zero. |
| Propriété | IgnoreUserInput | If this option is enabled, user input would be ignored until disable this. |
| Propriété | Driver | Get the player avatar component. |
| Propriété | GameObject | Returns the GameObject of this Vehicle component. |
Fonctions
ForceSetOwner
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.
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| newOwner | int | – |
| vehicleId | int | – |
Valeurs de retour
void
Exemple
Space.Host.ExecutingObject.Vehicle.ForceSetOwner(AvatarID)
ForceActivate
Force player drive on this vehicle
Valeurs de retour
void
Exemple
Space.Host.ExecutingObject.Vehicle.ForceActivate()
ForceDeactivate
Force player out of the vehicle.
Valeurs de retour
void
Exemple
Space.Host.ExecutingObject.Vehicle.ForceDeactivate()
SuppressTimeout
Disable the vehicle automatic respawn
Valeurs de retour
void
Exemple
Space.Host.ExecutingObject.Vehicle.SuppressTimeout()
OverrideOnClick
Add onClick method to this vehicle,onClick have to be a closure.
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| onClick | Closure | – |
Valeurs de retour
void
Exemple
Space.Host.ExecutingObject.Vehicle.OverrideOnClick(NewOnClickFunction)
Propriétés
VerticalInput
Force vertical offset value, it would be added to vertical control and never set to zero.
Exemple
Space.Host.ExecutingObject.Vehicle.VerticalInput = 0.5
HorizontalInput
Force horizontal offset value, it would be added to horizontal control and never set to zero.
Exemple
Space.Host.ExecutingObject.Vehicle.HorizontalInput = 0.5
StrafeInput
Force strafe offset value,it would be added to strafe control and never set to zero.
Exemple
Space.Host.ExecutingObject.Vehicle.StrafeInput = 0.5
DepthInput
Force depth offset value, it would be added to depth control and never set to zero.
Exemple
Space.Host.ExecutingObject.Vehicle.DepthInput = 0.5
IgnoreUserInput
If this option is enabled, user input would be ignored until disable this.
Exemple
Space.Host.ExecutingObject.Vehicle.IgnoreUserInput = true
DriverLecture seule
Get the player avatar component.
Exemple
DriverAvatar = Space.Host.ExecutingObject.Vehicle.Driver
GameObjectLecture seule
Returns the GameObject of this Vehicle component.
Exemple
VehicleGameObject = Space.Host.ExecutingObject.Vehicle.GameObject



