Category:Movement Functions

From NWN Lexicon
Jump to navigationJump to search

Movement Function Category

Movement related functions.



Functions

Name Brief Description

ActionForceFollowObject

Forces an NPC to follow an object.

ActionForceMoveToLocation

Attempts to move an NPC to a location.

ActionForceMoveToObject

Attempts to move an NPC to a certain distance of a target object even if a clear path doesn't exist.

ActionJumpToLocation

Instantly sends the calling object to the position of locTarget.

ActionJumpToObject

Teleports the calling object to the nearest valid location by the target.

ActionMoveAwayFromLocation

Causes the caller to try to move away from a location.

ActionMoveAwayFromObject

Cause the action subject to move to a certain distance away from a target.

ActionMoveToLocation

Moves an NPC to a location before executing further actions in the action queue.

ActionMoveToObject

Cause action subject to move to a certain distance of a target object.

ActionPickUpItem

Causes subject to run to an item and place it in inventory.

ActionRandomWalk

Causes the subject to walk to a random location close to itself.

ActivateFleeToExit

Causes a creature to run to its exit waypoint and disappear.

ActivatePortal

Send a player's client to a new server, where the player's character will log in.

CheckWayPoints

Checks to see if an NPC has a valid waypoint to walk to.

EffectMovementSpeedDecrease

Create a Movement Speed Decrease effect to slow target.

EffectMovementSpeedIncrease

Create a Movement Speed Increase effect to speed target movement rate.

EscapeArea

Makes a creature escape to a waypoint.

GetAheadLocation

This function returns a location directly in front of the target.

GetAngleBetweenLocations

Returns a float representing the angle between Location One and Location Two.

GetBehindLocation

Returns location directly behind the target and facing same direction as the target.

GetBlockingDoor

Determines the door that is blocking a creature.

GetChangedPosition

Convenience function that returns a vector that is fDistance away in fAngle direction.

GetChangeInX

Convenience function to calculate the change in the X axis.

GetChangeInY

Convenience function that calculates the change in the Y axis to the target.

GetCustomLeftDirection

This function returns a normalized number that is the sum of the current facing and the angle to target.

GetCustomRightDirection

This returns a float that is a normalized remainder of fDirection - fAngle.

GetCutsceneCameraMoveRate

Returns the current movement rate factor of the cutscene 'camera man'.

GetDistanceBetweenLocations

The distance in meters between two locations in the game.

GetDistanceToObject

The distance from the caller of the script to the object in meters.

GetFacing

Used to determine which direction something is facing.

GetFacingFromLocation

Get the facing value from a location variable.

GetFarLeftDirection

This function returns a normalized number that is +135 from the current facing.

GetFarRightDirection

Returns a normalized number that is -135 from the current facing.

GetFlankingLeftLocation

Returns a location on the left flank of the target.

GetFlankingRightLocation

Returns a location that is the right flank (to the right and slightly behind) the Target.

GetForwardFlankingLeftLocation

Returns location to the forward left flank of the target.

GetForwardFlankingRightLocation

Returns location to the forward right flank of the target.

GetHalfLeftDirection

This function returns a number that is +45 degrees from the current facing.

GetHalfRightDirection

Returns a normalized value that is -45 from fDirection.

GetLeftDirection

This function returns a float representing a direction +90 degrees.

GetNormalizedDirection

This function returns a float that is constrained from 0 - 360.

GetOppositeDirection

Returns a normalized direction that is -180 from fDirection.

GetOppositeLocation

Returns a location that is directly behind the target.

GetRightDirection

Returns a normalized float that is -90 from the facing passed in.

GetTransitionTarget

Gets the associated transitional target.

JumpToLocation

This is a command to move instantly to the location referenced by lLocation.

JumpToObject

Teleports the calling object to the nearest valid location by the target.

MoveTo2Q4PlotPoint

Makes the caller walk to a waypoint.

MoveToNewLocation

Tells the object to move to a new location.

RunNextCircuit

Makes an NPC move to their initial waypoint.

SetCutsceneCameraMoveRate

Sets the current movement rate factor for the cutscene cameraman.

SetFacing

Sets the object to face a certain direction.

SetFacingPoint

Sets the object to face the direction of a vector.

TriggerExplodeObject

Blow up the nearest object with a matching tag with the specified spell.

TriggerRaiseCorpse

Raise the nearest corpse from the dead.

TurnToFaceObject

Turns the target object to face another object.

Vector

Creates a vector (position) from three points.

VectorMagnitude

Determines the magnitude of a vector.

VectorNormalize

Normalize a vector.

WalkWayPoints

Make an NPC creature walk a series of preset waypoints.