What I was trying to do is decrement a monster's health counter every tick, check if it's reached 0, then delete the current instance and spawn a couple of new one somewhere else later.
Here's the implementation that works:
(Alive and TimeLeft are instance variables that are initialized to True and 5 respectively. RespawnCount is a global var)
That Foreach loop looks redundant so I tried this approach instead:
The monsters still die after 5 seconds, but even if there were 10 on screen only a single new one will spawn. Why ?
Just for completeness sake- if I were to add a "System- Every tick" condition in front of #10 or as a parent-event of #10 would that have any impact at all ?
(By the way I have a few decades of C++/Java experience- feel free to get as technical as you like- I really want to learn how C2's event loop works)
Some random questions:
The manual mentions local variables, but I don't see an option to insert them. Is that a restriction of the free version ?
There's an "Add Include" command, but how do I create a new Event Sheet for it ?
Exporting to HTML5 (with/without Minify) just shows me a black page when I try to run the index.html in Chrome. Preview from C2 works fine, uploading to Chrome Webstore and running the game from there works as well. However, I would like for this to be an offline-only game; what's a simple,reliable way to achieve that ?