GameMaker How To Key Combo Special Moves
Вставка
- Опубліковано 8 вер 2024
- GameMaker tutorial / lesson with completed project files at www.gameprogram... in the RESOURCES section.
How to code key combos and combinations so that the player can do special moves when a series of keys are pressed in the correct order.
Check out hundreds of other GameMaker tutorials and lessons at GameProgrammingCourse.com
All these gamemaker tutorials will work with Gamemaker Studio GMS or Gamemaker Studio 2 GMS.
Go to the Resource Page of www.gameprogram... to download the Project Files for these tutorials!
I know this was a year ago from my perspective, but I'd like to thank you for this tutorial. Every other tut I found on this subject, didn't explain anything. So thank you.
No comments so far? Man...
I found this video to be amazing, really. First of all, you're teaching something really useful, which lots of games use, so we can implement it too in to ours. Second thing, you are explaining it in detail and so well, every little bit so we can understand everything in the code. And it comes within a very nice short code, which is always better. These videos are really good, keep at it, I can't believe you don't have more subscribers.
Yes Sir Thank you! You are the only channel I've found that talks about anything fighting game worthy.
Fantastic man very comprehensible.
The like to dislike ratio kinda explains how good this video is...
Made a slight adjustment to the script that I think helps make it a tad more responsive. I changed this conditional:
// increase time if keys in log
if (length>0) {
time_total += time_step;
}
to this:
// increase time if keys in log
if (length>0) {
time_total += time_step;
} else {
time_total = 0;
}
I was having a problem where the time_total would end up being something between 0 and my time_remove, which meant that it would sometimes remove the first character in the string too soon. Works a lot better now.
great addition/correction to the code. thanks for your debugging.
I hope you keep doing these! Very good and no nonsense tutorials!
Its so much better with actual titles
Tnx dude! this tutorial saved me alot of time! Well explained.. Great tutorial! Love it!
So easy and nice combo system. Great explanation and teaching skill. ^^
Keep up the good work.
Fantastic vid! I have two questions - how would you make this read inputs with an xaxis/yaxis on a gamepad, for instance? And secondly, is there a way to modify the combo system to act more as an 'input buffer' for commands?
Thanks!
The joystick axis is another layer on top of this code. With keys it is easy since a keypress is a distinct event that takes place. You would have to write code that detects where the joystick is (access its x and y axis values). If you decide that the joystick was in the appropriate range to be considered 'left', then you could send it to do the code as if the left key, or "A" key was pressed. Then you would probably want to make sure they return the joystick close to the center position before accepting another direction/key. A good practice of this would just be trying to code reading the joystick directions between joystick centering. Once you get that, you can tag it with this code.
How would this work with gamepad or other keys like enter or space?
how do you integrate iif a key connected (hit the enemy) for example?
You said you wouldn't normally code this in the player, where would you do it?
probably working with state machines...
Mortal kombat 101