Desblat Posted May 8, 2014 Share Posted May 8, 2014 My mod creates hallucinations of mobs, what dissappear in 10 secs. But if you save-load the hallucinations turn in to normal mobs. How to delete mobs on load/save in a right way? I treid this but for some reason it doesn't work local function onsave(inst, data)if inst.removeOnLoad thendata.removeOnLoad = trueendendlocal function onload(inst, data)if data and data.removeOnLoad theninst:Remove()endendlocal function reoveonload(inst) inst.OnSave = onsaveinst.On ......................................MakeHallunfn(count,day,self)....................... data.removeOnLoad == true reoveonload(inst) .................................end Link to comment https://forums.kleientertainment.com/forums/topic/36162-deleting-specific-mob-on-loadsave/ Share on other sites More sharing options...
DeathDisciple Posted May 8, 2014 Share Posted May 8, 2014 try inst.persists=false Link to comment https://forums.kleientertainment.com/forums/topic/36162-deleting-specific-mob-on-loadsave/#findComment-474957 Share on other sites More sharing options...
Desblat Posted May 8, 2014 Author Share Posted May 8, 2014 try inst.persists=falseThe solution turned out to be so short! )Thank you! Link to comment https://forums.kleientertainment.com/forums/topic/36162-deleting-specific-mob-on-loadsave/#findComment-475021 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now