Enderal SE
https://mod.pub/enderal-se/38-enderal-se
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
629 B
22 lines
629 B
Scriptname defaulForceTowardLinkRefOnEnable extends ObjectReference
|
|
{When this reference is enabled it will apply a force toward it's linked reference.}
|
|
import debug
|
|
import game
|
|
import utility
|
|
|
|
float transX
|
|
float transY
|
|
float transZ
|
|
|
|
objectReference property myTarget auto hidden
|
|
float property physForce = 0.1 auto
|
|
{The force you want to be applied to this reference toward it's linked ref. - DEFAULT = 0.1}
|
|
|
|
Event OnLoad()
|
|
myTarget = GetLinkedRef()
|
|
ApplyForce()
|
|
EndEvent
|
|
|
|
Function ApplyForce()
|
|
applyHavokImpulse((myTarget.getPositionX()), (myTarget.getPositionX()), (myTarget.getPositionZ() + 256), physForce)
|
|
EndFunction
|
|
|