So im making a platformer and I want the block to bounce up and down very quickly with the character hits it similar to how in super mario when you hit a block it reacts to mario hitting it underneath by moving upwards and the back down quickly. The code I have now works but after you collide it continues to go down. How to I make this effect happen. Any help is appreciated.
Hi - I think just just need to add âtrigger onceâ on the actions that trigger the tweens. The coin collision is effectively a trigger once as the coin is deleted but the block isnât and so itâs repeatedly triggering the tween
Space to jump wasd + arrows to walk
Wait action NEED to be longer than tween
I am checking 40% of player width from center of player left and right
That are these points check with * 0.4 for
Most likely it should be less or even better you should make custom points
@petlimpet You should check what you are suggesting to ppl if you donât understand what is going on
You are not helping them you are just bringing more confusion
Checking collision is wrong cause you can simply jump ON TOP of block to move it up
Trigger once will just make it happen once but will not prevent it
Where in some scenarios you can abuse it to use block as elevator going up
Did I not digest it fully? Then I apologise! I shall tar and feather myself and then go and try and find a pair of size twelves in TKMAX
I think public stocks and rotten fruit are preferreable these days.
Err, you too have misunderstood the problem. The issue is the block keeps dropping after itâs been in collision with the player.
The problem is with the above event. Once the âBlock-upâ tween has finished playing it stays in that finished playing state. So that condition is continually met, and the block is forever being tweened down in the action.
The simplest fix is to remove the âBlock-Upâ tween as an action in that event.
How so my solution works?
I mean i did not went after fixing issue
But after logic that works
like sometimes it is better to make something that works than fix something that does not
EDIT
Oh i think i know what you mean
You mean what i said about using it as elevator up
I said that in some scenarios you could abuse it this way
I did get the issue but checking collision is just wrong overall
And points are right way to do it
And block keeps dropping cause tween is getting spammed
That is why we should not use tween finished playing but inverted tween is playing
In that type of situations
But then how does the OP learn why the original doesnât work?
I find it cleaner to remove the tween. No chance of residual issues.
Right Iâm back! There were some stocks outside Primark and so I was able to do both at the same retail park!!! Get in!
I lost faith in learning it
I mean i wasted SO MUCH time on learning WHY
And so little on way to fix it
I am going straight for a fix
(i meant overall and not this exact issue)
But touché

