Off Screen Object Mailbox (point) - number (1) - filter = (whatever the number of enemies there are in that level) - next level
Enemies Message (point) to Off Screen Object
If there are multiple levels like this, you have to keep making separate Off Screen Objects, and keep doing this chain of code. Hope this helps! - @ShadowAxeKid
Another Easy example is that you should add a health system of some sort using numbers and filters, then when the health reaches zero it will send a mailbox to you, add a filter saying the number of enemies there are so when all of the enemies are defeated you can progress to the next level. I don't know if it can help or if I explained it correctly, but this has helped me on some of my games.
Another way to do this that is slightly more complicated but much more versatile is to have all the enemies on screen send a message to the player or an off screen object telling it to NOT go to the next level. You can pretty simply do this with a couple gates and filters. This way you can use the same code for each level no matter how many enemies there are. Also if you want to exponentially spawn more enemies this lets you. Idk just an idea.
@my_name (<_>) Click the thing on the bottom left corner of the screen. (Idk what computer you have, so I can't be specific.) Search the "snipping tool"
It still won't work, I imported the code. I am really lost at this point. Here's all my code if it helps. And, sorry if I don't get back for a while, I'm going to be away for the weekend.
Have an enemy's death add to a number, for example every death adds 1 to a total put that in a filter anything equal to 10 plugs that into next level, kill all 10 enemies per se and done.
@oliver.stanton, do you mind sending the game link? With this much help, I thinking it could be a personal error or possibly a bug. I can test a few things out myself with the link.
...Also in the screenshot, most of your NextLevel behaviors doesn't have a level selected for it to go to another level.
I tried all that and it STILL won't work. I did exactly what you showed. I think I have another problem somewhere else in the game that's effecting it. I can't believe that this is working so poorly. I think I need to do a deep dive into the code to search for the problem, and please if someone has an example or finds a way for it to work, send me the link to the game so that I can see it. But, thank you all for trying so hard and helping me.
Comments
Make a separate object off-screen
Off Screen Object
Mailbox (point) - number (1) - filter = (whatever the number of enemies there are in that level) - next level
Enemies
Message (point) to Off Screen Object
If there are multiple levels like this, you have to keep making separate Off Screen Objects, and keep doing this chain of code.
Hope this helps!
- @ShadowAxeKid
Here's a screenshot, I'm still not getting it, but i'm closer.
first, attach the mailbox to in, not set.
Next, get another number block, and put it at 0
Hook the 1 number to the 0 number through add. Think that should do it.
Mailbox>in-number--1>+-number-(however many enemies you want)>in-filter-0>next level
But, I think I'm closer. You guys have been a great help.
Also how do you make it so it doesn't show the whole thing?
{"data":{"behavior":{"v":"2","nodes":[{"inputCount":0,"outputCount":1,"name":"Mailbox","behaviorType":"logic.components.Mailbox","x":270,"y":192,"group":"","id":"276b05651e305d4b","msg":"death"},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":450,"y":192,"group":"","id":"276b4e3d1a027648","startVal":-1,"tag":""},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":630,"y":192,"group":"","id":"277042a3c2208146","startVal":5,"tag":""},{"gateVal":0,"mode":"equal to","inputCount":2,"outputCount":2,"name":"Filter","behaviorType":"logic.logic.Filter","x":810,"y":192,"group":"","id":"2773f34cfd7bad4f"},{"inputCount":1,"outputCount":1,"name":"NextLevel","behaviorType":"logic.gameflow.NextLevel","x":990,"y":192,"group":"","id":"27744dce8b45e940","levelName":null}],"links":[{"input_id":"276b4e3d1a027648i1","output_id":"276b05651e305d4bo0"},{"input_id":"277042a3c2208146i2","output_id":"276b4e3d1a027648o0"},{"input_id":"277042a3c2208146i2","output_id":"276b4e3d1a027648o0"},{"input_id":"2773f34cfd7bad4fi0","output_id":"277042a3c2208146o0"},{"input_id":"2773f34cfd7bad4fi0","output_id":"277042a3c2208146o0"},{"input_id":"27744dce8b45e940i0","output_id":"2773f34cfd7bad4fo0"},{"input_id":"27744dce8b45e940i0","output_id":"2773f34cfd7bad4fo0"}]}}}
With this much help, I thinking it could be a personal error or possibly a bug.
I can test a few things out myself with the link.
...Also in the screenshot, most of your NextLevel behaviors doesn't have a level selected for it to go to another level.
Here's the link to the game @JR 01 I must be really bad at this or something, I've gotten so much help and haven't gotten it. Hopefully I get it soon.
Here's what you need in the "Big Bun" or "enemy" object:
And in the "Next Level Mechanic" or the "other thing",
you just need to select a level in the behavior (if not "Level 2").
Message says "point"
Mailbox has"Point"
point ≠ Point
Point = Point
Just capitalize the P in the message and it will work