PushObject

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Similar to PushActorAway, but intended for non-actor, movable objects. "Pushes" the calling reference in a vector-like force and direction specified by the passed arguments.

  • By default, the origin of the vector is the calling reference's world position. The 1st through 3rd arguments allow to adjust the origin relative to that position.
  • The 4th argument specifies the Havok force applied on the object. A positive value pushes the object away from the origin, whereas a negative value pulls the object towards the origin.
  • The 5th argument is optional. If not omitted, the specified reference will be used as the vector origin, instead of the calling reference.

Syntax

[help]
reference.PushObject posXmod:float posYmod:float posZmod:float force:float originRef:ref

Example

objectRef.PushObject 100 -50 -200 800

To push the object away from the player by a force of 100, do this:

objectRef.PushObject 0 0 0 100 player 

See Also