NDGIC

From Legends of Aria Admin and Modding Wiki
Revision as of 18:57, 13 November 2019 by Gizmo (talk | contribs)
Jump to: navigation, search

[Main] [Lua Examples]

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Global Functions & Examples

CallFunctionDelayed()

Params
TimeSpan - duration to wait before calling the function
function - function to call
Calls a function after the specified amount of time has elapsed Note: This function will not be called if server shuts down or restarts before the delay expires..

Example

-- call the TrapTriggered function after 2 seconds has elapsed
CallFunctionDelayed(TimeSpan.FromSeconds(2),TrapTriggered())
 
-- handle the target who triggered the trap by dealing 25 points of magic damage to the target
function TrapTriggered()
    -- get the target trigger object stored by the trap
    local target = this:GetObjVar("TrapTriggeredBy")
    -- if the target is valid apply the damage
    if(target) then
        damageInfo.Victim:SendMessage("DamageInflicted",target,25,"MAGIC",false,false,false,target)         
    end
end

CanPathTo()

Params
origin - the start location to path from
destination - the end location to path to
Checks for a valid path from the origin to the destination using A* algorithm.

Example

 CODE EXAMPLE BLOCK

ChangeWorld()

.

Example

 CODE EXAMPLE BLOCK

ClearBans()

.

Example

 CODE EXAMPLE BLOCK

CopyObjectToPos()

.

Example

 CODE EXAMPLE BLOCK

CreateCustomObj()

.

Example

 CODE EXAMPLE BLOCK

CreateCustomObjInContainer()

.

Example

 CODE EXAMPLE BLOCK

CreateCustomTempObj()

.

Example

 CODE EXAMPLE BLOCK

CreateEquippedObj()

.

Example

 CODE EXAMPLE BLOCK

CreateObjExtended()

.

Example

 CODE EXAMPLE BLOCK

CreateObjInContainer()

.

Example

 CODE EXAMPLE BLOCK

CreatePrefab()

.

Example

 CODE EXAMPLE BLOCK

CreateTempObj()

.

Example

 CODE EXAMPLE BLOCK