Difference between revisions of "NDGIC"
Line 6: | Line 6: | ||
{| class="wikitable" | style="width: 60%" | {| class="wikitable" | style="width: 60%" | ||
|- | |- | ||
− | |style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">CallFunctionDelayed()</p>Params | + | |style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">CallFunctionDelayed()</p>Params<br>TimeSpan - duration to wait before calling the function<br>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.. |
|} | |} | ||
</center> | </center> | ||
Line 12: | Line 12: | ||
<div style="width:60%;margin: 0 auto"> | <div style="width:60%;margin: 0 auto"> | ||
-- call the TrapTriggered function after 2 seconds has elapsed | -- call the TrapTriggered function after 2 seconds has elapsed | ||
− | CallFunctionDelayed( | + | CallFunctionDelayed(TimeSpan.FromSeconds(2),TrapTriggered()) |
-- handle the target who triggered the trap by dealing 25 points of magic damage to the target | -- handle the target who triggered the trap by dealing 25 points of magic damage to the target |
Revision as of 18:26, 13 November 2019
Global Functions & Examples
CallFunctionDelayed() ParamsTimeSpan - 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() 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