How can i make it when i get all the enemies i can open the switch and go to the next level

i hope this work cuz i understand more in a vid instead of a text

i dont understand anything u said

like bro tommorow i need to publish a game for my coding class in school and im not finsihed with it.
i still need to make a way to save the coins and health in each level.
make a boss battle and the mechanic for the switch door enemys

i dont kno what you mean BY POINT 2. OR ANYTHING ABOVE JUST SHOW ME A VID I DONT EVEN KNOW WHAT YOUR SAYING LIKE WHAT DO YOU MEAN BY (I HAVE A OBJECT NEXT TO A PLAYER AT THE START TURN THIS ON, WHY IS THAT THERE.)

There is a switch next to the player at the start. When the player touches it, the door unlocks. Why is that there.

1 Like

There are examples here for coin saving and health

1 Like

you mean i remove the switch

If you want the enemies being dead to unlock the door, why would you have a switch that opens it? So yes, it should be removed.

1 Like

ok then i remove the code in the door and replace it with what code to the door

1 Like

what code should i use for the door

1 Like

have patience,responses arent going to come instantly :slight_smile:

1 Like

Code in the Door.

MAKE SURE THE FILTER IS SET TO THE NUMBER OF ENEMIES IN THAT LEVEL (6 in this case)


Code in the Enemy.


MAKE SURE THE MESSAGE SENDS TO THE DOOR


If you want an explanation of how this works here you go.

  1. Every time an enemy dies it send a message to the door
  2. The door gets this message. It uses the output to increase a Number count by 1. That value is put into a Filter. The Filter is set to ‘Equal To [# of Enemies]’. In this case it is 6 total enemies. When the Filter outputs “Pass” all enemies have died.
  3. The Filter now turns the Switch in the door on.
2 Likes

thank you for helping me

2 Likes