Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hello! It appears you may just need to remove the saved event data when unspawning a saved event.

let eventId = this._eventId;
let removeSave = true;
Ritter.unspawnEvent(eventId, removeSave);

typically you would remove the saved event data unless there is a specific need for retaining the data and the event it was tied to, it's left available as an option but typically you'd be removing the saved event data when unspawning.

If you remove the save data when you unspawn a saved event the unspawned event should be returned to the pool and continue to be recycled as normal.

For all intents and purposes a saved event is a "real" event, it will always exist and it will be treated differently until the saved event data is removed.

as a side note your fears are not unfounded, if you aren't removing saved event data then you will end up with thousands of events on the map which will cause performance issues. As long as we're managing our saved events properly and keeping the number of events active at once in check (ie not having 5000 events active on the map at once) then you should be able to spawn millions of events and never have those performance drops which are caused by too many events on the map.

Thank you and I hope this solves your issue! Good luck with your project!

I am removing the save when I unspawn it. Reading your reply that it should be removing it from the maps event list caused me to do more digging and it turns out its a conflict with another plugin causing  it to keep the event data after being removed.