Question about :destroyed

Started by BilboGCL, November 27, 2017, 08:14:39 PM

Previous topic - Next topic

BilboGCL

Hi,
I'm playing a lit with the :destroyed function. I want a script run when a core is destroyed, but I've got the problem, that the script doesn't finish - is there a tweak around that?
As I don't want to spoiler the map idea I have, I don't want to write much more - but I think the script has to run half a minute or so...
Right now it starts, but it doesn't finish it's task - If I run the script w/o being triggered by  :destroyed it works fine.

Greetings from The Shire!
Hey, come to the dark side Discord, we have cookies!

GoodMorning

:destroyed is "instant" - it can't run over multiple frames, because the Core is gone.

Instead, you can set the Core not to be destroyed on damage, and run the code there...
...or create a watcher Core to run the code when necessary.

We have [ spoiler ] tags for a reason, and it's worth a spoiler if the map wouldn't otherwise be made at all. (I.e. "I'm good with a spoiler, if you need the help")
A narrative is a lightly-marked path to another reality.

BilboGCL

Ah - I see.
A watcher core probably won't work for my setting but as I now know the reason for my mess, I'm hopefully that creating a new core with a script bound to it will work.

Greetings from The Shire!
Hey, come to the dark side Discord, we have cookies!