SetVehicle - Actor

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: Actor Script

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

Syntax[edit | edit source]

Function SetVehicle(Actor akVehicle) native

Parameters[edit | edit source]

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

Return Value[edit | edit source]

None.

Examples[edit | edit source]

; Set Bob to ride his horse
Bob.SetVehicle(Horse)

Notes[edit | edit source]

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 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.

See Also[edit | edit source]