Difference between revisions of "NDGIC"

From Legends of Aria Admin and Modding Wiki
Jump to: navigation, search
Line 11: Line 11:
 
<p style="width: 60%;margin: 0 auto">Example</p>
 
<p style="width: 60%;margin: 0 auto">Example</p>
 
<div style="width:60%;margin: 0 auto">
 
<div style="width:60%;margin: 0 auto">
   CODE EXAMPLE BLOCK
+
   CallFunctionDelayed(TrapTriggered(),TimeSpan.FromSeconds(2))
 +
 
 +
  function TrapTriggered()
 +
      local target = this:GetObjVar("TrapTriggeredBy")
 +
      if(target) then
 +
          damageInfo.Victim:SendMessage("DamageInflicted",target,25,"MAGIC",false,false,false,target)       
 +
      end
 +
  end
 
</div>
 
</div>
  

Revision as of 18:09, 13 November 2019

[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
function - function to call
TimeSpan - duration to wait before calling the function
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

 CallFunctionDelayed(TrapTriggered(),TimeSpan.FromSeconds(2))
 
 function TrapTriggered()
     local target = this:GetObjVar("TrapTriggeredBy")
     if(target) then
         damageInfo.Victim:SendMessage("DamageInflicted",target,25,"MAGIC",false,false,false,target)         
     end
 end

CanPathTo()

.

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