Update WorldObjectMethods.h

This commit is contained in:
Rochet2
2017-04-26 15:51:56 +03:00
committed by GitHub
parent 39afb1d3b7
commit ef0b1387dd

View File

@@ -778,6 +778,11 @@ namespace LuaWorldObject
* Note that for [Creature] and [GameObject] the timed event timer ticks only if the creature is in sight of someone * Note that for [Creature] and [GameObject] the timed event timer ticks only if the creature is in sight of someone
* For all [WorldObject]s the timed events are removed when the object is destoryed. This means that for example a [Player]'s events are removed on logout. * For all [WorldObject]s the timed events are removed when the object is destoryed. This means that for example a [Player]'s events are removed on logout.
* *
* local function Timed(eventid, delay, repeats, worldobject)
* print(worldobject:GetName())
* end
* worldobject:RegisterEvent(Timed, 1000, 1) -- do it after 1 second once
*
* @param function function : function to trigger when the time has passed * @param function function : function to trigger when the time has passed
* @param uint32 delay : set time in milliseconds for the event to trigger * @param uint32 delay : set time in milliseconds for the event to trigger
* @param uint32 repeats : how many times for the event to repeat, 0 is infinite * @param uint32 repeats : how many times for the event to repeat, 0 is infinite