Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] Is there a way to access the world object from within a WorldObject:RegisterEvent() event? Like a "s

[DiscordArchive] Is there a way to access the world object from within a WorldObject:RegisterEvent() event? Like a "s

[DiscordArchive] Is there a way to access the world object from within a WorldObject:RegisterEvent() event? Like a "s

rektbyfaith
Administrator
0
06-21-2023, 02:47 AM
#1
Archived author: ritzmenardi • Posted: 2023-06-21T02:47:43.869000+00:00
Original source

Is there a way to access the world object from within a WorldObject:RegisterEvent() event? Like a "self" variable or something?
rektbyfaith
06-21-2023, 02:47 AM #1

Archived author: ritzmenardi • Posted: 2023-06-21T02:47:43.869000+00:00
Original source

Is there a way to access the world object from within a WorldObject:RegisterEvent() event? Like a "self" variable or something?

rektbyfaith
Administrator
0
06-21-2023, 03:57 AM
#2
Archived author: 0xCiBeR • Posted: 2023-06-21T03:57:15.423000+00:00
Original source

The last argument passed to the function is the worldobject
rektbyfaith
06-21-2023, 03:57 AM #2

Archived author: 0xCiBeR • Posted: 2023-06-21T03:57:15.423000+00:00
Original source

The last argument passed to the function is the worldobject

rektbyfaith
Administrator
0
06-21-2023, 03:58 AM
#3
Archived author: 0xCiBeR • Posted: 2023-06-21T03:58:35.444000+00:00
Original source

(eventid, delay, repeats, worldobject)
rektbyfaith
06-21-2023, 03:58 AM #3

Archived author: 0xCiBeR • Posted: 2023-06-21T03:58:35.444000+00:00
Original source

(eventid, delay, repeats, worldobject)

rektbyfaith
Administrator
0
06-21-2023, 03:58 AM
#4
Archived author: 0xCiBeR • Posted: 2023-06-21T03:58:47.250000+00:00
Original source

The example script here showcases it https://www.azerothcore.org/pages/eluna/...Event.html
[Embed: WorldObject:RegisterEvent - Eluna]
API documentation for the WorldObject:RegisterEvent method in the Eluna engine.
https://www.azerothcore.org/pages/eluna/...Event.html
rektbyfaith
06-21-2023, 03:58 AM #4

Archived author: 0xCiBeR • Posted: 2023-06-21T03:58:47.250000+00:00
Original source

The example script here showcases it https://www.azerothcore.org/pages/eluna/...Event.html
[Embed: WorldObject:RegisterEvent - Eluna]
API documentation for the WorldObject:RegisterEvent method in the Eluna engine.
https://www.azerothcore.org/pages/eluna/...Event.html

rektbyfaith
Administrator
0
06-21-2023, 03:58 AM
#5
Archived author: ritzmenardi • Posted: 2023-06-21T03:58:51.648000+00:00
Original source

Oh duh. I was looking at "synopsis" here:
https://www.azerothcore.org/pages/eluna/...Event.html
I should have looked at the example:
```lua
local function Timed(eventid, delay, repeats, worldobject)
print(worldobject:GetName())
end
worldobject:RegisterEvent(Timed, 1000, 5) -- do it after 1 second 5 times
worldobject:RegisterEvent(Timed, {1000, 10000}, 0) -- do it after 1 to 10 seconds forever
```
rektbyfaith
06-21-2023, 03:58 AM #5

Archived author: ritzmenardi • Posted: 2023-06-21T03:58:51.648000+00:00
Original source

Oh duh. I was looking at "synopsis" here:
https://www.azerothcore.org/pages/eluna/...Event.html
I should have looked at the example:
```lua
local function Timed(eventid, delay, repeats, worldobject)
print(worldobject:GetName())
end
worldobject:RegisterEvent(Timed, 1000, 5) -- do it after 1 second 5 times
worldobject:RegisterEvent(Timed, {1000, 10000}, 0) -- do it after 1 to 10 seconds forever
```

rektbyfaith
Administrator
0
06-21-2023, 03:59 AM
#6
Archived author: ritzmenardi • Posted: 2023-06-21T03:59:07.547000+00:00
Original source

Thank you ❤️
rektbyfaith
06-21-2023, 03:59 AM #6

Archived author: ritzmenardi • Posted: 2023-06-21T03:59:07.547000+00:00
Original source

Thank you ❤️

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)