Page 1 of 1

Is it possible to make an exit appear after collecting all coins or kill all enemies?

Posted: Sat Feb 24, 2024 4:53 am
by Timo3681
If i collect collect example all 100 coins or kill all enemies, exit to level complete is appeared. How can i make this? Like in another games example Boulder Dash.

Re: Is it possible to make an exit appear after collecting all coins or kill all enemies?

Posted: Sun Feb 25, 2024 3:34 am
by Just_Thomas
I can only offer you a half-baked solution (maybe better this than nothing):
Create an event
select the NPCs which are supposed to be relevant for the event, right click

Layer: [Default] -> Add to new layer ...
(enter a new fitting layer name)

while still having selected all the NPCs also, right click

Properties
and "Layer is empty": select the event you have created at the beginning (unter "Current Layer" you should see the layer you just assigned)

This is not an ideal solution, as you have to kill every npc or select every (npc) coin to trigger the event and this in one attempt, no checkpoint support or anything. If this is not enough for your project, you might get replies on Discord or so.
But I can't guarantee you anything there either, as they can usually only help someone with such things if you already have a certain amount of know-how yourself (or in the case of Luna Lua).

BTW: In case it is not obvious, you have to work with layers. You need one for the npcs, which are supposed to get killed or collected and one for the exit in this case which is supposed to appear.

Re: Is it possible to make an exit appear after collecting all coins or kill all enemies?

Posted: Wed Mar 06, 2024 6:09 am
by Alucard648
Same thing, but lack of checkpoint support is too restrictive.

Re: Is it possible to make an exit appear after collecting all coins or kill all enemies?

Posted: Wed Mar 06, 2024 8:41 am
by Ibaka
YUP. Put the exit warp or npc on a curtain layer of your choosing. Then make that layer invisible at the start of the level. After that, put all the coins or all the enemies on a curtain layer. Make an event called “exit”. In the event settings, make the layer that you put your warp or exit on show/appear. Then, go to each npc and go to properties. Now, you need to make sure every npc has the property of “When layer is cleared, activate event “exit” “. And that is all.

Note: you need to make all the npc’s that you want dead to have the properties so that no matter what order you kill them in or collect the coins in. I learnt that the hard way.