Thank you so much for doing DnD/Visual. I know people say GML is better or easier but I never felt like I understood anything, just copied someone elses work. Visual makes me feel like im actually learning how it works. Speaking of that, Ive got most of this working but I have question about how it works. If you are setting xp from x and then you go on to subtract x - xp why isnt it always 0? If xp was set to x then it would be x - x. I know thats not how it functions but how is the code running so xp isnt set to the current x? Thanks again
Hey Slyddar thanks for all the help. Your name will be in my credits and I'll probably send you a copy if all goes well. Continue to make great content!
Question...I have seen others place all of the code you put in the player script straight into their player step event, would placing it in the script be "better"(subjective of course) or is it just personal preference? Everyone does code a little bit differently. Also, I love all your content!
Hello, first of all I think its very nice of you to answer comments on your old videos. I have this weird issue with the enemy sprites ; they randomly turn invisible when moving in a diagonal. I have spent a little more than an hour on this issue, and can't seem to know why this happens even after rewatching your videos, perhaps I am blind to an easy issue, but I just cannot grasp it. Thank you for your time.
Hey! It does take time, but I try to help where I can, and people appreciating my time makes it all worth while, so thank you. Turning invisible means the facing value is being set to 0. SHIFT-CTRL-F and search for 'facing'. Ensure each time you are setting it, you check first it is not equal to 0.
hey! this has been amazing, id love more tutorials, if you're able to make them! maybe on how to make randomized rooms, and to transition between rooms?
I need some help. So i'm following the platformer DND guide, and I did everything that I was supposed to do for part 1. But I cannot move my sprite to the right. it gives me an error code. Anyone know a fix to it?
Thought I was doing good on this tutorial until this video.. but im getting a bug where when I run my game my sprites go haywire and flashy but when I record a clip of it, it doesn't show it going crazy.
i love the way you explain things but i'm running into an issue. For some reason my enemy sprites are inverted and when i leave their attack range they just go a random direction for 2 seconds before disappearing. It's really confusing me as nothing in the code should be causing it to do that. Any tips?
Sounds like multiple things are wrong. Maybe you're setting the vertical scale / image_yscale instead of horizontal / image_xscale. Probably run through the tutorial again and ensure you have the same values that I have, cause you definitely do not at the moment.
I think i may have missed something here, i have been going through the videos one at a time with a few mistakes on my end. I just started this video and it mentions a player_processes script but ive not heard of this before, which video was it in?
Tysm for these tutorials, they are really helpful. I'm trying to make the player warp inbetween rooms but it always crashes when I try because it says it cant find the instance for calc movement and aim direction. Do you know how to fix this?
Hey Slyddar! Been struggling with a current roadblock with my game. I was wondering if there was anyway to change the camera's focus to be on two objects at once,
You need to create a camera rather than using the built in one. There are tutorials around for this. I also show how to do it in my course too if you have that. You then make the camera focus on the average of the x and y of the points you want to focus on.
Can you make another tutorial and show how to make an arrow rain level (spell) and damage to enemies? something like you have made in your game "Keepers of Pyrite". Please?
Teacher, after you made changes to this video, both my player and the enemies, they only keep walking to one side, that is, they don't turn to the opposite side, what do I do?
Ok so this tutorial is my first ever attempt at using GML so I figured maybe someone else might have run into this problem I made for myself. So i never deleted the draw function (like i was told to) under the enemy parent object that allows you to see the enemy paths with a white line. I did this because I like being able to see those paths. Just helps me visualize things better while they're working. Anyway after I moved the "draw_sprite_ext" we used for the player object into the o_entity_par I realized all my enemies turned invisible and i couldn't see them, but I could still see the paths. If anyone else did what I did just type in "event_inherited()" to the top line in the draw event for the o_enemy_par. This only happened to me because I didn't follow the tutorial exactly so it's my fault this happened, but for curios folk like me if you also ran into this issue, its an easy fix. Or better yet just do as the tutorial says and just delete the draw function that draws the enemy paths all together. If you don't it might mess something up further down the line.
What also could work is type in: draw_self(); Every object does this automatically when you don't have a draw event, but when you create a draw event, you have to also type in draw_self(); for the sprite to draw itself.
Just adding to this for anyone following the tutorial and not knowing where this problem originates: check your 'check_facing' script: the If variable should be _facing NOT equal to 0 (I had facing instead of _facing).
I ran into this same problem and couldn't understand how to fix it, thank you so so SO much! You really saved me a lot of time and a massive headache! I appreciate it a lot! :D
GM is free, Udemy even offers 30 day money back if you take my course, so all you are giving up is time. I suggest you give both a try for a month of so each, and see which you like after that time.
Mine didn't flip either at first, but it matters which order you call the functions in your enemies case. "enemy_anim" should be called last in each case.
hey slyddar after setting up the state machine my enemeys do not change directions but it seems to have severaly impacted the pathfinding abilititys of them to a point where it makes my "AI" seem really dumb lol taking awful paths and they seem to pause every so often. at first thought i messed with some values in the enemey parents create event like calc_path_timer/delay but cant seem to figure it out. i know this is super vague but i have no clue how to go about de bugging this, i will be slowly reworking through the video as i wait for a reply but i figured it wouldnt hurt to reach out and see if u have encountered the problem and may be able to pin point down what i may have messed up on. solid tutorial, sad to see im on 6/7 released :(
i know this comment is three months old, but i had similar issues, my enemies would only mkae one path and then stop moving and not change the direction they were facing. I had accidently put the code for the MOVE state in the ATTACK case in the switch statement in obj_enemy, maybe you have done something similar?
I have this weird bug where the enemy will stop very close to me, but not yet at the defined distance, and then continue to inch forward a few pixels between each animation cycle before coming to a complete stop. I have absolutely no clue what's going on lol Edit: it never happens when they come from the top of my position. Only from directions between 90 and 270...
hah, found the problem. I didn't set the collision mask to be always s_enemy_idle, so it bugged out between the collision masks of the two sprites, idle and walk
When copying the check for player, needs to be more obvious that you are copying all of the script as i just copied that line and deleted it.... Still love the videos just frustrated :D
I got to the last part where you add state and switch.(22:54) But while before that everything works after I add the grey block and try to run i get this: ___________________________________________ ############################################################################################ ERROR in action number 1 of Step Event0 for object o_player: Variable o_player.state(100016, -2147483648) not set before reading it. at gml_Object_o_player_Step_0 (line 5) - var l44CF8326_0 = state; ############################################################################################ gml_Object_o_player_Step_0 (line 5) Am i missing something? Thank you
Hey, I had the same error. It turned out I put the `if x == xp and y == yp var _type = 0 else var _type = 1;` code on a line AFTER my `var _found_player = mp_grid_path(global.mp_grid, path, x, y, o_player.x, o_player.y, _type);` line. As a result, the game was looking for the _type variable before I assigned that the variable is = 0 or = 1, causing the bug. Double check that you don't have the order wrong in your enemy_processes script.
Hello, thanks for the tutorial, though im getting this error ERROR in action number 1 of Draw Event for object o_entity_par: draw_sprite_ext argument 1 invalid reference to (sprite) - requested -1 max is 13 at gml_Object_o_entity_par_Draw_0 (line 3) - draw_sprite_ext(sprite_index, image_index, x, y, facing, 1, 0, c_white, 1); ############################################################################################ gml_Object_o_entity_par_Draw_0 (line 3) I can bypass it using an IF, only the first sprite call seems to have the -1 request, idk why this is happening :(
It's super cool that you're doing 2 different versions of the tutorials at the same time. Thank you for all of your hard work!
It would be wonderful to see another tutorial soon so that we can finish off the enemies! Love the content a ton man
Thank you for making these videos. They are very informative, I am learning a lot.
The best content there is. I really hope you wont stop spoiling us :) Thank you for your amazing work!
looking forward for the next episode! Great videos as always
thank you for your tutorials, they are very useful, been waiting for this one
yes been waiting for part 5. Learning gml right now and this tutorial is very helpful my goal is to create a basic game after the end of the year.
did ya do it?
Im completely amazed by how good these tutorials are! I hope you will keep doing these :]
Super cool that you do this. My dude randomly teleports because I did something wrong but I'ma say its a feature!
Thank you so much for doing DnD/Visual. I know people say GML is better or easier but I never felt like I understood anything, just copied someone elses work. Visual makes me feel like im actually learning how it works. Speaking of that, Ive got most of this working but I have question about how it works.
If you are setting xp from x and then you go on to subtract x - xp why isnt it always 0? If xp was set to x then it would be x - x. I know thats not how it functions but how is the code running so xp isnt set to the current x?
Thanks again
your tutorials are helping me out a lot! Im always waiting for a new video beeing released. thx
Hey Slyddar thanks for all the help. Your name will be in my credits and I'll probably send you a copy if all goes well. Continue to make great content!
Question...I have seen others place all of the code you put in the player script straight into their player step event, would placing it in the script be "better"(subjective of course) or is it just personal preference? Everyone does code a little bit differently. Also, I love all your content!
Scripts/functions are needed when doing state machines as we will eventually be running the same code in multiple states within the step event.
Hello, first of all I think its very nice of you to answer comments on your old videos.
I have this weird issue with the enemy sprites ; they randomly turn invisible when moving in a diagonal. I have spent a little more than an hour on this issue, and can't seem to know why this happens even after rewatching your videos, perhaps I am blind to an easy issue, but I just cannot grasp it. Thank you for your time.
Hey! It does take time, but I try to help where I can, and people appreciating my time makes it all worth while, so thank you. Turning invisible means the facing value is being set to 0. SHIFT-CTRL-F and search for 'facing'. Ensure each time you are setting it, you check first it is not equal to 0.
Will you be doing character selection soon? I've been trying to figure it out but I'm really struggling with it
i am waiting for the full tutorial continue :)
thx for your tutorials!!!so great~
hey! this has been amazing, id love more tutorials, if you're able to make them!
maybe on how to make randomized rooms, and to transition between rooms?
I have a tutorial on room transitions here - ua-cam.com/video/YwwTC9w5nY4/v-deo.html, it's for a platformer and in DnD, but the concept is the same.
I need some help. So i'm following the platformer DND guide, and I did everything that I was supposed to do for part 1. But I cannot move my sprite to the right. it gives me an error code. Anyone know a fix to it?
Thought I was doing good on this tutorial until this video.. but im getting a bug where when I run my game my sprites go haywire and flashy but when I record a clip of it, it doesn't show it going crazy.
i love the way you explain things but i'm running into an issue. For some reason my enemy sprites are inverted and when i leave their attack range they just go a random direction for 2 seconds before disappearing. It's really confusing me as nothing in the code should be causing it to do that. Any tips?
Sounds like multiple things are wrong. Maybe you're setting the vertical scale / image_yscale instead of horizontal / image_xscale. Probably run through the tutorial again and ensure you have the same values that I have, cause you definitely do not at the moment.
I think i may have missed something here, i have been going through the videos one at a time with a few mistakes on my end.
I just started this video and it mentions a player_processes script but ive not heard of this before, which video was it in?
figured it out, missed the pop up on screen saying GML only😅
hey can anyone help me fix this error on my game - "gml_Object_o_entity_par_Draw_0 (line 1)"
Tysm for these tutorials, they are really helpful. I'm trying to make the player warp inbetween rooms but it always crashes when I try because it says it cant find the instance for calc movement and aim direction. Do you know how to fix this?
Hey Slyddar! Been struggling with a current roadblock with my game. I was wondering if there was anyway to change the camera's focus to be on two objects at once,
You need to create a camera rather than using the built in one. There are tutorials around for this. I also show how to do it in my course too if you have that. You then make the camera focus on the average of the x and y of the points you want to focus on.
It would be very helpful if you please organized this playlist. #2 is 1, #1 is 2 "Can we make Gauntlet?" is 3, #4 is 4, #3 is 5, and so on.
Thanks for noticing. I've corrected it now.
Can you make another tutorial and show how to make an arrow rain level (spell) and damage to enemies? something like you have made in your game "Keepers of Pyrite". Please?
Teacher, after you made changes to this video, both my player and the enemies, they only keep walking to one side, that is, they don't turn to the opposite side, what do I do?
Ok so this tutorial is my first ever attempt at using GML so I figured maybe someone else might have run into this problem I made for myself. So i never deleted the draw function (like i was told to) under the enemy parent object that allows you to see the enemy paths with a white line. I did this because I like being able to see those paths. Just helps me visualize things better while they're working. Anyway after I moved the "draw_sprite_ext" we used for the player object into the o_entity_par I realized all my enemies turned invisible and i couldn't see them, but I could still see the paths. If anyone else did what I did just type in "event_inherited()" to the top line in the draw event for the o_enemy_par. This only happened to me because I didn't follow the tutorial exactly so it's my fault this happened, but for curios folk like me if you also ran into this issue, its an easy fix. Or better yet just do as the tutorial says and just delete the draw function that draws the enemy paths all together. If you don't it might mess something up further down the line.
What also could work is type in: draw_self();
Every object does this automatically when you don't have a draw event, but when you create a draw event, you have to also type in draw_self(); for the sprite to draw itself.
Just adding to this for anyone following the tutorial and not knowing where this problem originates: check your 'check_facing' script: the If variable should be _facing NOT equal to 0 (I had facing instead of _facing).
I ran into this same problem and couldn't understand how to fix it, thank you so so SO much! You really saved me a lot of time and a massive headache! I appreciate it a lot! :D
@@kaori5962 lulz you are so so so welcome. Never thought I'd actually help someone out. Let alone 2 years later.
Nice!
i'm thinking which game engine to pick, really tempted to use godot, but this series is tempting me with GM
GM is free, Udemy even offers 30 day money back if you take my course, so all you are giving up is time. I suggest you give both a try for a month of so each, and see which you like after that time.
will you do a vid about save files n load cuz it hard todins them on dnd
My enemies dont do the right animation or dont flip so what am I doing wrong. I followed the tutorial word for word on drag and drop
Mine didn't flip either at first, but it matters which order you call the functions in your enemies case. "enemy_anim" should be called last in each case.
hey slyddar after setting up the state machine my enemeys do not change directions but it seems to have severaly impacted the pathfinding abilititys of them to a point where it makes my "AI" seem really dumb lol taking awful paths and they seem to pause every so often. at first thought i messed with some values in the enemey parents create event like calc_path_timer/delay but cant seem to figure it out.
i know this is super vague but i have no clue how to go about de bugging this, i will be slowly reworking through the video as i wait for a reply but i figured it wouldnt hurt to reach out and see if u have encountered the problem and may be able to pin point down what i may have messed up on.
solid tutorial, sad to see im on 6/7 released :(
i know this comment is three months old, but i had similar issues, my enemies would only mkae one path and then stop moving and not change the direction they were facing. I had accidently put the code for the MOVE state in the ATTACK case in the switch statement in obj_enemy, maybe you have done something similar?
I have this weird bug where the enemy will stop very close to me, but not yet at the defined distance, and then continue to inch forward a few pixels between each animation cycle before coming to a complete stop. I have absolutely no clue what's going on lol
Edit: it never happens when they come from the top of my position. Only from directions between 90 and 270...
hah, found the problem. I didn't set the collision mask to be always s_enemy_idle, so it bugged out between the collision masks of the two sprites, idle and walk
Sir Slyddar can you give us a hint when is #6 ?
It's out now, available as early access to Patreons at the moment. It will be released to all in 3 days.
@@Slyddar Thank ya ! :3
idk what i've done wrong but it keeps coming up with an error
Please read the pinned comments, or the description, regarding GMS2.3 changes.
@@Slyddar ty, i eventually fixed it, just went through the video again and realised i missed a few things. Excited for the next video!
When next tutorial?
It's out and available as early access to Patreons at the moment. It will be released to all in 3 days.
❤
can you release next one
I have, it's available as early access to Patreon members at the moment. It will be released to all in 3 days.
Oh ok sort of new to coding btw these tutorials help a heap
When copying the check for player, needs to be more obvious that you are copying all of the script as i just copied that line and deleted it.... Still love the videos just frustrated :D
Ok, I'll try and mention specifically what I'm doing in future videos. Thanks for the positive feedback.
трейлер игралэнд!!! ua-cam.com/video/Jd8yBucK2aQ/v-deo.html
English please.
I got to the last part where you add state and switch.(22:54)
But while before that everything works after I add the grey block and try to run i get this:
___________________________________________
############################################################################################
ERROR in
action number 1
of Step Event0
for object o_player:
Variable o_player.state(100016, -2147483648) not set before reading it.
at gml_Object_o_player_Step_0 (line 5) - var l44CF8326_0 = state;
############################################################################################
gml_Object_o_player_Step_0 (line 5)
Am i missing something? Thank you
Hey, I had the same error. It turned out I put the `if x == xp and y == yp var _type = 0 else var _type = 1;` code on a line AFTER my `var _found_player = mp_grid_path(global.mp_grid, path, x, y, o_player.x, o_player.y, _type);` line. As a result, the game was looking for the _type variable before I assigned that the variable is = 0 or = 1, causing the bug.
Double check that you don't have the order wrong in your enemy_processes script.
@@timtimethymetie thank for the input but i use DND for the course not GML. So I dont have a enemy_processes script.
Hello, thanks for the tutorial, though im getting this error
ERROR in action number 1
of Draw Event for object o_entity_par:
draw_sprite_ext argument 1 invalid reference to (sprite) - requested -1 max is 13
at gml_Object_o_entity_par_Draw_0 (line 3) - draw_sprite_ext(sprite_index, image_index, x, y, facing, 1, 0, c_white, 1);
############################################################################################
gml_Object_o_entity_par_Draw_0 (line 3)
I can bypass it using an IF, only the first sprite call seems to have the -1 request, idk why this is happening :(
I had this, and for me I was a dumbass and didn't realise I'd put the o_entity_par in the room, instead of the o_enemy