• All, I am currently in the process of migrating domain registrations. During this time there may be some intermittent outages or slowdowns. Please contact staff if you have any questions.

Solved Can I bypass the rule of advancing to the next stage unless all enemies are defeated?

Question that is answered or resolved.

PS_VITA

Active member
Hi,

I'm trying to create a stage that the player can reach the end of the stage and as long as he reaches a certain point in the stage he gets to advance to the next screen regardless if certain enemies were not eliminated.

If that's not an option,
is there a script some of you guys are using to eliminate all enemies on the screen regardless if the enemy picked up a weapon and whatnot.

Thanks in advanced.
 
Solution
This is an example of the endlevel item
Code:
name        Flag
type        endlevel
shadow        0

anim idle
    loop    0
    delay    8
    offset    42 73
    bbox     38 26 8 48
    frame    data/chars/itens/flag/idle00.gif

1676314210842.gif

About the hidden enemy, it's a common entity in general aspects but have no bboxes and need some properties, something like this
Code:
name                Hidden_Enemy
type                enemy
subtype                notgrab
nomove                1 1
health                1
shadow                0
offscreenkill        9999

anim idle
    loop    0
    delay    4
    offset    50 72
    frame    data/chars/random/empty.png
CONCEPT 1: You can use a hidden enemy (use "nomove" to force him to not move) to maintain the current level active and constantly detect the player's position. As soon as a certain position of the player is confirmed, the entity will suicide using killentity(self).

CONCEPT 2: You can use an "endlevel entity" that jumps to a defined branch as soon as the player touches it no matter if there's more enemies to be spawned.

CONCEPT 3: You can use the hidden enemy but without detecting the player's position, and then adding the endlevel item at the end of the level.

1676312667228.png
 
CONCEPT 1: You can use a hidden enemy (use "nomove" to force him to not move) to maintain the current level active and constantly detect the player's position. As soon as a certain position of the player is confirmed, the entity will suicide using killentity(self).

CONCEPT 2: You can use an "endlevel entity" that jumps to a defined branch as soon as the player touches it no matter if there's more enemies to be spawned.

CONCEPT 3: You can use the hidden enemy but without detecting the player's position, and then adding the endlevel item at the end of the level.

View attachment 3144
Thank you @Kratus

I like to learn more about concept 3:
How is that setup?

I imagine the bbox is going to determine the collision when the player touches it?

I tried searching for this on the forum but I haven't come across an example of how it's setup with all of its properties?

Also I'm wondering if this is also like "both" in the manual?
 
This is an example of the endlevel item
Code:
name        Flag
type        endlevel
shadow        0

anim idle
    loop    0
    delay    8
    offset    42 73
    bbox     38 26 8 48
    frame    data/chars/itens/flag/idle00.gif

1676314210842.gif

About the hidden enemy, it's a common entity in general aspects but have no bboxes and need some properties, something like this
Code:
name                Hidden_Enemy
type                enemy
subtype                notgrab
nomove                1 1
health                1
shadow                0
offscreenkill        9999

anim idle
    loop    0
    delay    4
    offset    50 72
    frame    data/chars/random/empty.png
 
Solution
I'm trying to create a stage that the player can reach the end of the stage and as long as he reaches a certain point in the stage he gets to advance to the next screen regardless if certain enemies were not eliminated.

That's the base of any metroidvania I've made and The House template I've shared before. Each level or room is an endless level. Check them yourself and see how they work.
 
Back
Top Bottom