So as you can see, my player amber has a death animation similar to Mario. And incase you’re wondering how I made that, I used pixel studio app on my tablet. I want to know how to make the animation of amber’s death sprite appear like that. Make it go up and down just like Mario does. And don’t worry about the death blocks. I’m just showing you all that so amber can die faster like that. Please, let me know, how to make that work.
Hi, you could achieve this by making it all one animation (as you already did in your app) that plays when you collide with the block.
Another idea, quickly put together, is this (I assume you are using the platform-behavior):
When the player is in collision with the block, an animation plays and pressing the jump-key is simulated. After a short wait-time the platform-behavior of the ground is deactivated and your character is falling through.
I added the ‘move player away from block’-action to make sure that the player does not collide again with the block and triggers the jump-action all the time. I am not a big fan of the wait-action but in this case it makes sense: if the platform-behavior is removed immediately, the player won’t jump and just falls through the platform.
This is just a rough idea to get you started, there is probably a lot that can be optimized and it also depends on how you set up your game.
You could let easing do all the work for you:
The numbers would have to be adjusted to match your game, this is with 800x600 resolution:
Add trigger once to condition which check if your object is in collision with death block
Can you show me a little video of how you made that code please?
Not necessary, the separate ensures there isn’t a collision in the next game frame.
@SuperMrWilliams3, the issue will be the second event, where the condition is “Amber is jumping
”. Because the death sequence simulates jump, Amber will be considered as jumping.
Your solution is to add an event before the second one, with a condition checking that the animation of Amber is not “Death”, and make all the movement related events as subevents off that.
Actually i would argue here
If i picture it in my mind correctly
Then what he had just made trampoline like effect
Since each collision wold kick in action
BUT i need to agree my solution would not solve it just let it not kick in for every frame when in collision
It would require checking also if player is not in death animation
Oh well i just reed rest of your message and you suggested exactly that
Sometimes I wish we could respond with an emoticon instead of just a heart.
Okay. This is what I’ve done so far. I’m not making the change scene thing cause it’s a demo. The player won’t need any lives. But I do need to ask, what am I doing wrong with the part about tween the Y position of amber isn’t working. Could you please explain to me why. What I did wrong, and, maybe try to show a little video on how you did it? For me, please? It’s my birthday today after all.
Have you added the tween behaviour to the Amber object in the object editor?
And I’m providing a potential solution to the issue based on your screen shot.
Is my screen shot not good enough? Cause I don’t know how to screen show on my computer.
It’s fine. If you want something that’s clearer, you can use the windows Snipping Tool or Snip It, depending on what version of windows you have.
But my comment is based on the red squiggles under the word “Amber”. It suggests that the object Amber doesn’t have tweening as a behaviour.
Listen, the game I’m developing will have not just one but two gameplay mechanics. It’s so interesting. But I cant tell you cause it’s a secret. If you want to find out. Please help me. Poster the coding images. I can release the free demo early if you can help me with that. I promise.
just simulate jump press key and while she’s in midair disable the platform behavior of the floor
(i use unconventional game development techniques)
can’t wait!