[DiscordArchive] How to display player's location in a broadcasted message? For example if I want to display the play
[DiscordArchive] How to display player's location in a broadcasted message? For example if I want to display the play
Archived author: adm • Posted: 2023-01-01T13:55:02.194000+00:00
Original source
How to display player's location in a broadcasted message? For example if I want to display the player's level it is:
``"..player:GetLevel().."``
How about the map name? The website gives me this command:
``mapName = Map:GetName()`` - Returns the name of the Map e.g. Azeroth, Eastern Kingdoms, the Molten Core, etc.
but how to implement it? Is it simply ``"..player:Map:GetName().."`` ?
Archived author: Honey • Posted: 2023-01-01T15:27:48.467000+00:00
Original source
Player:GetMap():GetName()
Archived author: adm • Posted: 2023-01-01T15:43:27.848000+00:00
Original source
Just had to write the 'player' with a lower case, and it worked. Thanks!
Archived author: Honey • Posted: 2023-01-01T15:44:04.086000+00:00
Original source
well, ofc you gotta match the variable name exactly
Archived author: Honey • Posted: 2023-01-01T15:44:10.532000+00:00
Original source
Glad you solved it.
Archived author: adm • Posted: 2023-01-01T15:44:27.825000+00:00
Original source
yeah, thanks to you, cheers!
Archived author: adm • Posted: 2023-01-01T17:42:42.953000+00:00
Original source
Can I do the same thing with AreaName?
Like:
`"..player:GetAreaId():GetAreaName().."` (doesn't seems to work)
I'm also curious if there is a way to print the Zone. I found only `WorldObject:GetZoneId` but doesn't seems to have ZoneName
Archived author: Foe • Posted: 2023-01-01T17:47:51.787000+00:00
Original source
http://elunaluaengine.github.io/Global/GetAreaName.html
[Embed: Global:GetAreaName - Eluna]
API documentation for the Global:GetAreaName method in the Eluna engine.
http://elunaluaengine.github.io/Global/GetAreaName.html
Archived author: adm • Posted: 2023-01-01T17:50:16.283000+00:00
Original source
I've seen it already, but it's difficult to comprehend, since I've no experience with coding
Archived author: Foe • Posted: 2023-01-01T17:52:23.175000+00:00
Original source
The synopsis tells you how to use it, you use GetAreaName() as a global (not called on an object like player) and supply it either a zone or area ID to get the name. So you could do something like GetAreaName(player:GetAreaId())