Can someone help me out? [SOLVED]


It’s 2 days before I’m releasing a demo of my platformer and I’ve broke something and have no idea how to fix it… I’d be forever grateful if someone would help me or look through my events and say what’s wrong (I’m even willing to pay as a token of gratitude)

Ok, so basically: there’s a mechanic that allows the player to use vampirism to heal from defeated enemies. With this, you get power, and with power you move onto next phase (so just leveling the player).

The problem is: The player is supposed to level onto the next phase AFTER pressing E while near defeated enemy. Instead, the phase changes after the enemy is killed.

1: leveling up (phases)

2: some fighting mechanics

3: knockback mechanics

4: some random stuff that might be causing something

I haven’t shown all the script, only the stuff that should interfere with things.
Thank you all in advance!

EDIT: Solved thanks to hoar!

I think it can help you better if you upload your project and so we get the whole context of the situation.:wink:
I did not see anywhere the action changing the scene in the images. I must be blind. :thinking::sweat_smile:
damn google translator.:blush:
I already understood your point
NO LO SE = I do not know :rofl: sorry

Sorry, I’d rather not upload my entire project with all the sprites…
Maybe I should make a gif?

And I think you’ve misunderstood my question - there’s no need for changing scenes.
Only phases of the player (as in leveling up, purely visual), not the levels of the game

I guess you are killing your enemy before changing the phase.
put the action “delete object enemies” in last actions line.

I’m taking this as “No else”
I’ve tried removing this, it only made things worse :confused:

Nope, it wasn’t that

Have you tried to move “delete object enemiiee”
in 3rd block from top of screenshot number 2 to the last line? “delete obeject enemiie” has to be the last action. Sorry if I’m wrong.

It didn’t work, still the same issue

if the enemy’s energy arrives it is equal to “0” and having no conditions will automatically change the value of the variable (without taking into account the enemy’s animation 2)

1 Like

I see…

So… what should I do?

I don’t know very well for sure without having the project to experiment.
but maybe if you condition with a timer or maybe combining the conditions:
-variable "else"
-animation 2
-key "E"
-variable enemy energy.

1 Like

Finally it works like a charm!! Thank you for your help! Would you like anything in return? Best I can do is a bunch of Steam items since my PayPal got temporarily blocked

1 Like

Do not worry. I’m glad you solved your problem. I also gain experience with these puzzles.:+1:

1 Like