I would like to make keys combination in order to launch skills in a fighting game.
for example :
down -> right -> B = fire ball
any tips ?
Yeah its super easy.
Create an event, and then right click it and use "add condition" then add your second condition.
keyboard button "Down" is pressed
keyboard button "right" is pressed
repeat to add a third condition
keyboard button "b" is pressed ->do fireball
now the fireball will only occur if all keys are currently pressed.
Develop games in your browser. Powerful, performant & highly capable.
I'll give you a nice tip !
Go check the beginners tutorial before starting your game :3 !
The thing is, i don't want these keys to be hold at the same time to launch the skill, i want to press one by one the keys.
press "DOWN", THEN press "RIGHT", THEN press "A" and THEN the fireball is launched.
And when you make an event "Keyboard - On key pressed" the only new condition available is "key down", it doesn't help very much.
Your going to need to store your input into a array or some list that you can look back on. Create an array that can store about 1/2 seconds of input.
Every input should be stored into the array.
When a movement key input(like punch) is pressed. Then track the the movement backwards to make sure only wanted input is used.
OK. so I gave this one some more thought. rather than store every tick of directional input. Store each change of input with a timestamp. That way you have to store less and can check to see if the time stamp is within the range of the move.
I'll try something in this direction, thanks !
There's actually a plugin for this very thing that rexrainbow made. You can check it out here:
Well this is exactly what i need, thank you very much !