Background for Skyrim SE
Member of the Actor script
voidfunctionSetVehicle(ObjectReferenceakVehicle)Native

Description

Wiki Description

Attaches the actor to a horse, cart, or other vehicle -- or detaches it from its current vehicle.

Documentation Comment

Attach the actor to (or detach it from) a horse, cart, or other vehicle.
akVehicle is the vehicle ref. To detach the actor from its current vehicle, set akVehicle to None (or to the Actor itself).


Caveats

CK Wiki - Notes

Being "attached" in this sense simply means that the actor will move along with the motion of the vehicle it's attached to. This is meant to be used in conjunction with Actor.PlayIdle(...) and idle animations that are specially built to animate the actor into or out of a seated pose on a particular kind of vehicle.


Parameters

  1. ObjectReferenceakVehicle

    CK Wiki Description

    The vehicle ref to which this actor should attach. If you want to detach the actor from its current vehicle, set akVehicle to None, or to the Actor itself.


Examples

; Set Prisoner to be attached to the cart
Prisoner.SetVehicle(Cart)

Auto-Generated Example

ObjectReference myObjectReference__akVehicle

myActor__toCallFunctionOn.SetVehicle(myObjectReference__akVehicle)

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.