Difference between revisions of "KeepOffsetFromActor - Actor"
Moved example from bethsoft forum as they are closing down soon
imported>Terra Nova2 m (→Notes) |
imported>Haravikk (Moved example from bethsoft forum as they are closing down soon) |
||
(One intermediate revision by one other user not shown) | |||
Line 22: | Line 22: | ||
*afOffsetAngleZ: the offset angle from the target actor, Z (degrees - most commonly used) | *afOffsetAngleZ: the offset angle from the target actor, Z (degrees - most commonly used) | ||
**'''Default:''' 0.0 | **'''Default:''' 0.0 | ||
*afCatchUpRadius: the radius at which the actor would run to catch up (anyone | *afCatchUpRadius: the radius at which the actor would run to catch up (anyone outside a radius of 20 will run to catchup) | ||
**'''Default:''' 20.0 | **'''Default:''' 20.0 | ||
*afFollowRadius: the radius at which the actor won't move (anyone | *afFollowRadius: the radius at which the actor won't move (anyone within a radius of 5 will not move) | ||
**'''Default:''' 5.0 | **'''Default:''' 5.0 | ||
Line 39: | Line 39: | ||
; Have the stalker keep close to the player with a larger follow radius | ; Have the stalker keep close to the player with a larger follow radius | ||
Stalker.KeepOffsetFromActor(Game.GetPlayer(), 0.0, 0.0, 20.0, afFollowRadius = 10.0) | Stalker.KeepOffsetFromActor(Game.GetPlayer(), 0.0, 0.0, 20.0, afFollowRadius = 10.0) | ||
</source> | |||
<br> | |||
<source lang="papyrus"> | |||
; Cause Runner to run forwards (lower offset magnitude will reduce speed) | |||
Runner.KeepOffsetFromActor(Runner, 0.0, 0.0, -100.0, afFollowRadius = 0.0) | |||
</source> | </source> | ||
Line 44: | Line 49: | ||
*The default values will cause the follower to continually run into the target, use larger values instead. | *The default values will cause the follower to continually run into the target, use larger values instead. | ||
*This is nifty if you want an NPC to walk next to another. | *This is nifty if you want an NPC to walk next to another. | ||
*This function can be used as a way to force actors to walk in a direction, similar to Obscript's PlayGroup function. See [http://forums.bethsoft.com/topic/1585680-tutorial-make-an-npc-walk-forward-without-heavy-math/ Here.] | |||
== See Also == | == See Also == | ||
*[[Actor Script]] | *[[Actor Script]] | ||
*[[ClearKeepOffsetFromActor - Actor]] | *[[ClearKeepOffsetFromActor - Actor]] |