This method functions identically to despawnActor
World:despawnCreature(objid)
Where:
And returns:
When a bee spawns, it will be despawned after 10 seconds.
local beeId = 3418 local delayseconds = 10 ScriptSupportEvent:registerEvent([=[Actor.Create]=], function(e) local eventcreature = e['eventobjid'] local eventcreatureid = e['actorid'] if eventcreatureid == beeId then threadpool:wait(delayseconds) World:despawnCreature(eventcreature) end end)