[DiscordArchive] The despawn too?
[DiscordArchive] The despawn too?
Archived author: metallinos • Posted: 2025-03-21T15:35:35.673000+00:00
Original source
The despawn too?
Archived author: Sanderis • Posted: 2025-03-21T15:54:40.010000+00:00
Original source
From the looks of it
Archived author: Sanderis • Posted: 2025-03-21T15:55:02.874000+00:00
Original source
It'll sit there for like 3 minutes
Archived author: metallinos • Posted: 2025-03-21T16:00:16.916000+00:00
Original source
The logout despawn, I mean
Archived author: metallinos • Posted: 2025-03-21T16:00:46.021000+00:00
Original source
You can store and it will get the GUID from the player:SetData / GetData methods but you can't print the GUID, can't contatentate it unless you convert it to a string first
espawnOrUnsummon()Archived author: metallinos • Posted: 2025-03-21T16:01:18.039000+00:00
Original source
Try
```
local function OnPlayerLogout(event, player)
local vendorGUID = player:GetData("VendorSummonedGUID")
if vendorGUID then
Debug("Player " .. player:GetName() .. " logged out, cleaning up summoned NPC")
local npc = player:GetMap():GetWorldObject(vendorGUID)
if npc then
Debug("Despawning NPC with GUID: " .. tostring(vendorGUID))
npc
espawnOrUnsummon()
end
end
end
```
instead, then it'll disappear on logout (if that's desirable)