How to make my player do a specific action(like stomp or throw) when a key is pressed?

So in game dev levels, I know I can make a player cleave by pressing space or “c”, but how do I make it do other actions when other keys are pressed? (Like pressing “t” for stomp?) Also, how do I make a player have that actions? And lastly, how do I modify the actions to make it stronger (like cleave having higher damage.) Pls help (And inform me if it is impossible to do such a thing.)(btw I found that okar in game dev can do stomp by

okar = game.spawnXY("goliath",60,60)
okar.stomp()

)

for example:

player = game.spawnHeroXY(40, 36)
player.cleaveDamage = 30
1 Like

You can do a lot more than they inform you of in the game development levels. For instance, one could summon peasants and shamans, but I do not think you are able to tie actions to keys.

1 Like