I'm certain there's smarter ways to do this, but here's an approach I'd try:
- When jump button is pressed, start a counter from 0 to max height. With each increase, increase height of the character.
- Once max height is reached, turn the whole thing around with variable toggle so the number is decreased with each step. - When the counter is back at zero, the jump is over.
- You can also use the current value of the height counter to make sure characters only can hit each other when they're of similar jumping height.
Would you make this in a project, upload it and send me the link please?