GameMaker: Turn Based Battles - Part 3: Battle State flow (Tutorial Series)

  Рет қаралды 15,681

Sara Spalding

Sara Spalding

Күн бұрын

Пікірлер: 47
@SaraSpalding
@SaraSpalding Жыл бұрын
Probably the single most important episode, covering all the key concepts you need to know to build a turn based system from scratch. There is also now a playlist for the series! kzbin.info/aero/PLPRT_JORnIurSiSB5r7UQAdzoEv-HF24L videos will be added to the list at public release, in case you're from patreon and wondering why an episode isn't there yet!
@averagetetoenjoyer
@averagetetoenjoyer Жыл бұрын
I really got lucky that you came out with this series when you did. I am working on a turn based rpg for a state contest, and am struggling with certain aspects of the battle system. Thanks for making this great content, it helps a lot!
@davidarnold25
@davidarnold25 3 ай бұрын
Honestly, having no formal programming education and just learning as I go. Not just this series, but everything you have put out has been immensely helpful for me. Most of the time I use your tutorials as leaping points, because if I just copy whatever you are doing I don't understand anything. Whether it works or not. But it is so helpful for when I get stuck and am struggling on my next step. Thank you for all your efforts in this and I sincerely hope that continue to make guides for noobs like me lol
@jamesfly1000
@jamesfly1000 Жыл бұрын
Thanks!
@drakesayshi3321
@drakesayshi3321 Жыл бұрын
thanks
@sslunguss
@sslunguss Жыл бұрын
loving this series, always wanted to make a battle system but never been able to. these tutorials are helping a lot!
@Ratewstinky
@Ratewstinky 10 ай бұрын
Im having an issue with the script I got over the whole video 5 times but cant figure it out The hp isnt going down, the animations are playing and everything seems alright, but the hp numbers always stay the same
@Travis.Pirozzini
@Travis.Pirozzini Жыл бұрын
That was a lot... and a bit over my head! 😅 Shaun always bringing quality content - Thank you!
@Pablo_Martin_aa
@Pablo_Martin_aa Жыл бұрын
i have a problem where during combat after the questy dies comabt just stops compleatly, i tried increasing his hp but now after while it just stops despite not everyone hp reaching zero
@andrewd9028
@andrewd9028 Жыл бұрын
I have the whole cycle working, with the one issue that no damage is being dealt! Everything seems to be moving as expected, sprites are animating, attackers are rotating, but I can't seem to get the HP to be impacted. Anyone have any suggetions or thoughts?
@mayeradford3388
@mayeradford3388 8 ай бұрын
did you ever figure this out?
@nipo3534
@nipo3534 10 ай бұрын
Amazing video as always, you got a new subscriber
@DtChita
@DtChita 11 ай бұрын
hey uhm im making a project for school and its really important i just followed this step by step but when i run and go into the slime it says that the variable battlestate is uknown ?
@walkerfive6471
@walkerfive6471 Жыл бұрын
good video, but i have a problem, everything work but the sprites are not moving
@SaddestDev
@SaddestDev Ай бұрын
was having an issue where the turns wouldn't work after 1 turn, i've been trying to tackle this for a couple hours, after the video i decided to take time off to debug as to why this isn't working properly turns out, i put the else block where it progresses into victory check onto the image index is greater equals than image number check instead of the acting boolean this is why you double/triple check where the code is placed x_x
@wfkmm
@wfkmm 8 ай бұрын
For anyone getting the "unknown variable" issue, check and make sure your battleState varible in BeginAction is AFTER the with _user block, easy mistake.
@Mackievellian
@Mackievellian 11 ай бұрын
So battleState is storing a reference to the functions in the create event, then by calling battleState(); like this in the step event, we are converting these functions into methods every step? Should I worry about performance in future? Thanks for the video.
@Pablo_Martin_aa
@Pablo_Martin_aa Жыл бұрын
combat stops entirely after a unit dies, how do i solve it pls
@gnysek
@gnysek Жыл бұрын
If state functions would return their identifiers, then they could be used with () brackets too (as for state machine they usually doesn't need to return anything important, but rather changing values/calling things from their logic).
@jakksonkobalt
@jakksonkobalt Жыл бұрын
For some reason, idk why, I had to change the effect sprites depth to be the target's depth -33 as the minimum value before it displays ontop of the target.
@8thHaven
@8thHaven Жыл бұрын
Great series so far! Also do you know how many episodes there will be?
@SaraSpalding
@SaraSpalding Жыл бұрын
Wish I did, hopefully not too many!
@8thHaven
@8thHaven Жыл бұрын
⁠hey, @@SaraSpalding I’m working on this tutorial and I’m having a problem in the code, when I run the game there is an error that says “variablebattleState not set before reading it At gml_obj_battle_Step_0(Line 1)” Could you help me figure out what is causing this
@Mystic_Satyas
@Mystic_Satyas 4 ай бұрын
Hey, I've got a little problem... Everything works perfectly fine, but when the attack animation appears, the idle sprite still draws behind. What can I do?
@Alderberanirgal
@Alderberanirgal Жыл бұрын
7:03 speaking of pokemon games. What sort of changes would in your tutorial code to use the same pool of characters for players and monsters?
@jakksonkobalt
@jakksonkobalt Жыл бұрын
You would need 2 different lists of data. First is the list of characters that exist and can be called. second is the list the player currently has in their party. Then it should be rather similar. Instead of calling from the list of enemies, call the list of all possible characters. You will need to work out an AI system though.
@mswloading3194
@mswloading3194 Жыл бұрын
@@jakksonkobalt yea essentially this is what you'd do. However, I would strongly suggest that you toy with what you've learned here yourself instead of looking for an answer. I only say this because I had the same question and found it more rewarding to just go through trial and error. In the event that you're not interested in that, you could always look into pokemon essentials if you have not already. You just wouldn't be able to monetize your game....but you can create any pokemon game pretty much out the box with little effort
@Linguini_Guy
@Linguini_Guy Жыл бұрын
I entered in all of the code in the GameData script for the action library, and it's not reading anything as a variable, and says "unexpected syntax error" on things that are completely fine. I've been sitting here for almost an hour and it refuses to acknowledge any of the enumerators, any of the variables, and of the local variables, nothin'. I literally cannot open the game until this loads, and it just refuses to. Amazing.
@jacobthemoose9342
@jacobthemoose9342 8 ай бұрын
It's working for me but when I attack the slime does not attack back
@meatbleed
@meatbleed Жыл бұрын
just checked up on this yesterday lmao. wild timing. love the way this is done.
@8ightiscool340
@8ightiscool340 Жыл бұрын
How do I change the position of the bonk effect? It plays below the characters
@Corilo91
@Corilo91 Жыл бұрын
Thank you! This is very interesting!
@einz6239
@einz6239 Жыл бұрын
I copied the code as you showed, I've double checked that I've typed everything correctly around 4 or 5 times, idk if it is that I'm blindly missing something but the hit/attack animation is not playing, I have added debug messages to the code to make sure each stage of the logic is being run, and they are. The perform action stage is called several times before the Victory Check, I'm assuming that is just it running through the battleWaitTimeFrames value, but then it loops correctly. I'm not quite sure what is preventing the hit animation from appearing, if you have any clue what I may have done wrong, any pointers would be greatly appreciated.
@SaraSpalding
@SaraSpalding Жыл бұрын
Unsure, use debug mode to confirm the sprite is being set and then see if it is somehow being unset too early, you can use the "step into function" button in debug mode after a breakpoint to step through line by line and see exactly where it's going wrong. Can take a while though
@PedroOliveira-vt7wv
@PedroOliveira-vt7wv Жыл бұрын
have you found the solution?
@vVyohasakuraVv
@vVyohasakuraVv 8 ай бұрын
hi did u ever figure the animations out ? got the exact same problem
@vVyohasakuraVv
@vVyohasakuraVv 8 ай бұрын
dunno if this is the right way to do it but i added this to obj_enemy_battle_unit event_inherited(); if (acting) { sprite_index = sprites.attack; } and now the attack animations play
@GamingArc44
@GamingArc44 2 ай бұрын
7:47
@kellanarick728
@kellanarick728 3 ай бұрын
Might not be seen, but hopefully it is. I am trying to follow along and i am very sure my code is correct, but I am getting an error that the following error Original post has been fixed, but I am not calling the strength value from my characters or enemies into my damage equation. Keeps saying its not set before reading. I have the code set up the same as the video. Just wondering if anyone has any idea whats going on.
@betia4915
@betia4915 Жыл бұрын
i copied everything and checked like 10 time , but every time i enter in the slime battle i have an error. basically say that in step event0 ,variable.userAnimation(100014, -2147483648) not set before reading, after that there are a lots of # and at the end say: gml_script_BeginAction_gml_Object_oBattle_Create_0(line -1) gml_script_BattleStateSelectAction_Object_oBattle_Create_0 gml__Object_oBattle_Step_0 if somebody can help me i would be grateful. also if somebody could say me how to turn off the localhost mode it would be great. you serie have been pretty helpful man.
@Pablo_Martin_aa
@Pablo_Martin_aa Жыл бұрын
i had the same problem, you probably misspell minor things while you copy through the whole video, i recomend rewatching it and making sure everything is as its suppost to
@thalos3269
@thalos3269 Жыл бұрын
I have the same problem as yours, have you found a solution to it yet?
@betia4915
@betia4915 Жыл бұрын
@@thalos3269 i been busy with college so i haven't touch this since i left it
@SDDDP
@SDDDP Жыл бұрын
same problem, did you get it right yet? i've tried Everything
@sillypng.
@sillypng. 5 ай бұрын
hey so i dont have a user sprite for my game while in battle, how do i stop the hit animation from playing when my character gets hit?
@BurningSands321
@BurningSands321 4 ай бұрын
you can use a timeline or alarm
GameMaker Studio 2 Outline Shader
14:59
GameMaker Casts
Рет қаралды 4,7 М.
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
Путин поздравил с Новым годом | 2025
8:52
AKIpress news
Рет қаралды 313 М.
GameMaker Tutorial: Turn Based Battles - Part 1: Starting a battle
10:43
Why Isometric? | Art, Code and Matrix Maths | A Devlog
13:33
Wintermute Digital
Рет қаралды 219 М.
A new way to generate worlds (stitched WFC)
10:51
Watt
Рет қаралды 550 М.
How to Add Interaction in Godot 4
16:48
Nagi
Рет қаралды 27 М.
How Do You Improve Turn Based Combat?
17:43
Design Doc
Рет қаралды 809 М.
Can You Beat Minecraft From One Grass Block?
35:27
Beppo
Рет қаралды 4,3 МЛН
What does a Game Engine actually do?
16:45
Ellie Rasmussen
Рет қаралды 174 М.
Optimizing my Game so it Runs on a Potato
19:02
Blargis
Рет қаралды 699 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,3 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН