Category:Miscellaneous Functions

From NWN Lexicon
Jump to navigationJump to search

Miscellaneous Function Category

Functions that don't fit into any other category.



Functions

Name Brief Description

ActionExamine

Examine an object

ActionWait

Adds a wait action to an objects queue.

BootPC

Abruptly kicks a player off a multi-player server.

CopyObject

Duplicates the object specified.

d2

Rolls a 2-sided die (or flips a coin).

d3

Rolls a 3-sided die.

d4

Rolls a 4-sided die.

d6

Rolls a 6-sided die.

d8

Rolls an 8-sided die.

d10

Rolls a 10-sided die.

d12

Rolls a 12-sided die.

d20

Rolls a 20-sided die.

d100

Rolls a 100-sided die.

DrinkIt

Makes a creature speak a string that signifies they drank alcohol.

ExecuteScript

Cause a script to execute.

ExportSingleCharacter

Force the character of the player specified to be exported to its respective directory, i.e. LocalVault/ServerVault/ etc.

GetActionMode

Check if a creature is using a given action mode

GetAngleBetweenLocations

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

GetAssassinHead

Gets the tag of the Assassins head object used in a plot in the official release game.

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

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

GetFirstInPersistentObject

Determines the first object of a specific type that is inside a persistent object.

GetFirstObjectInShape

Determines the first object of a specific type (creature, door etc.) in shape.

GetGameDifficulty

Determines the game difficulty setting.

GetHalfLeftDirection

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

GetHalfRightDirection

Returns a normalized value that is -45 from fDirection

GetIsDead

Determines if a creature is dead or dying.

GetIsEnemy

Determines whether a creature considers another creature an enemy.

GetIsImmune

Determines whether a creature has a specific immunity.

GetIsNeutral

Check whether a creature considers another creature to be neutral to them.

GetItemCursedFlag

Checks if an item is cursed

GetLastPCRested

Returns the last PC that rested.

GetLastRespawnButtonPresser

Gets the last PC that clicked the Respawn button.

GetLeftDirection

This function returns a float representing a direction +90 degrees

GetMyMaster

Gets the nearest Player Character to the calling object.

GetNextInPersistentObject

Determines the nextobject of a specific type that is inside a persistent object.

GetNextObjectInShape

Determines the next object of a specific type (creature, door etc) in shape.

GetNormalizedDirection

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

GetOppositeDirection

Returns a normalized direction that is -180 from fDirection

GetPositionFromLocation

Returns the vector part of a location.

GetRightDirection

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

GetUserDefinedEventNumber

Determines the specific user-defined number that has been sent to it.

GiveRingToPlayer

Creates a plot ring and places it in a player's inventory.

PopUpGUIPanel

Displays a GUI panel to a player.

PrintString

Records a message to the log file.

RandomName

Generates a random name.

RestoreCameraFacing

Restores the camera mode and facing.

SetActionMode

Sets the status of an action mode on a creature

SetAreaTransitionBMP

Sets the graphic shown when a PC moves between two different areas in a module.

SetCameraFacing

Changes the direction the player's camera is facing.

SetCameraHeight

Sets the camera to a certain height

SetCameraMode

Changes the perspective view of the player on the screen.

SetCommandable

Makes NPC available for new instructions.

SetCustomToken

Sets the value for a custom token.

SetDeity

Set the deity of a creature or PC

SetDroppableFlag

Marks an item as droppable or undroppable.

SetImmortal

Sets a creature as immortal.

SetItemCursedFlag

Sets whether an item is cursed or not

SetMapPinEnabled

Enable a map pin.

SetPhenoType

Sets the creature's PhenoType (body type) to the type specified.

SetPlotFlag

Sets an object's plot status.

SetSubRace

Sets or changes a creature's or PC's subrace

SignalEvent

Causes an object to fire a specified event.

StoreCameraFacing

Stores the camera facing and position so it can be restored later.

TakeArtifactItem

Removes the item returned by GetArtifactItem from the player's inventory.

TakeFetchItem

Removes the plot related item from a player's inventory.