Difference between revisions of "KeepOffsetFromActor - Actor"
Jump to navigation
Jump to search
imported>MoopusMaximus |
imported>JustinOther m (→Examples: Floatified float params) |
||
Line 33: | Line 33: | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
; Have the stalker keep close to the player | ; Have the stalker keep close to the player | ||
Stalker.KeepOffsetFromActor(Game.GetPlayer(), 0, 0, 20) | Stalker.KeepOffsetFromActor(Game.GetPlayer(), 0.0, 0.0, 20.0) | ||
</source> | </source> | ||
<br> | <br> | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
; 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, 20, afFollowRadius = 10) | Stalker.KeepOffsetFromActor(Game.GetPlayer(), 0.0, 0.0, 20.0, afFollowRadius = 10.0) | ||
</source> | </source> | ||
Revision as of 12:42, 8 October 2012
Member of: Actor Script
Forces the specified actor into a state where it will attempt to keep a given offset from another actor
Syntax
Function KeepOffsetFromActor(Actor arTarget, float afOffsetX, float afOffsetY, float afOffsetZ, float afOffsetAngleX = 0.0, \
float afOffsetAngleY = 0.0, float afOffsetAngleZ = 0.0, float afCatchUpRadius = 20.0, float afFollowRadius = 5.0) native
Parameters
- arTarget: the target actor
- afOffsetX: the offset from the target actor, in the actor's body space (so positive X is right of the actor), X
- afOffsetY: the offset from the target actor, in the actor's body space, Y
- afOffsetZ: the offset from the target actor, in the actor's body space, Z
- afOffsetAngleX: the offset angle from the target actor, X (degrees - rarely used)
- Default: 0.0
- afOffsetAngleY: the offset angle from the target actor, Y (degrees - rarely used)
- Default: 0.0
- afOffsetAngleZ: the offset angle from the target actor, Z (degrees - most commonly used)
- Default: 0.0
- afCatchUpRadius: the radius at which the actor would run to catch up (anyone in a radius of 20 will run to catchup)
- Default: 20.0
- afFollowRadius: the radius at which the actor won't move (anyone in a radius of 5 will not move)
- Default: 5.0
Return Value
None.
Examples
; Have the stalker keep close to the player
Stalker.KeepOffsetFromActor(Game.GetPlayer(), 0.0, 0.0, 20.0)
; 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)
Notes
- The default values will cause the follower to continually run into the target, use larger values instead.