Top Down DnD & GML Tutorial in Gamemaker #5 State Machines

Поділитися
Вставка
  • Опубліковано 22 жов 2024

КОМЕНТАРІ • 72

  • @NeverEvi
    @NeverEvi 9 місяців тому +8

    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!

  • @imzoupy
    @imzoupy 2 роки тому +7

    It would be wonderful to see another tutorial soon so that we can finish off the enemies! Love the content a ton man

  • @fffanIX
    @fffanIX 7 місяців тому +2

    Thank you for making these videos. They are very informative, I am learning a lot.

  • @gedaskofficial531
    @gedaskofficial531 2 роки тому +5

    The best content there is. I really hope you wont stop spoiling us :) Thank you for your amazing work!

  • @ZT3X
    @ZT3X 2 роки тому +2

    looking forward for the next episode! Great videos as always

  • @arnas1604
    @arnas1604 2 роки тому +3

    thank you for your tutorials, they are very useful, been waiting for this one

  • @gutsoverfear4008
    @gutsoverfear4008 2 роки тому +2

    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.

  • @MrRipper55
    @MrRipper55 2 роки тому +1

    Im completely amazed by how good these tutorials are! I hope you will keep doing these :]

  • @ryanhinshaw6360
    @ryanhinshaw6360 2 роки тому

    Super cool that you do this. My dude randomly teleports because I did something wrong but I'ma say its a feature!

  • @treesaretough
    @treesaretough 2 години тому

    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

  • @crowlog
    @crowlog 2 роки тому

    your tutorials are helping me out a lot! Im always waiting for a new video beeing released. thx

  • @Tweymaychay
    @Tweymaychay 7 місяців тому

    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!

  • @Mattyness88
    @Mattyness88 2 місяці тому

    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!

    • @Slyddar
      @Slyddar  2 місяці тому

      Scripts/functions are needed when doing state machines as we will eventually be running the same code in multiple states within the step event.

  • @skyz_rhim
    @skyz_rhim Місяць тому

    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.

    • @Slyddar
      @Slyddar  Місяць тому

      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.

  • @liquidx1664
    @liquidx1664 2 роки тому

    Will you be doing character selection soon? I've been trying to figure it out but I'm really struggling with it

  • @yusufmuhamet973
    @yusufmuhamet973 2 роки тому

    i am waiting for the full tutorial continue :)

  • @boyuansun1631
    @boyuansun1631 2 роки тому +2

    thx for your tutorials!!!so great~

  • @plague2179
    @plague2179 2 роки тому

    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?

    • @Slyddar
      @Slyddar  2 роки тому

      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.

  • @MrPizzaSUS
    @MrPizzaSUS 2 роки тому

    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?

  • @sethjackson2010
    @sethjackson2010 10 годин тому

    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.

  • @trashy5767
    @trashy5767 8 місяців тому

    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?

    • @Slyddar
      @Slyddar  8 місяців тому

      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.

  • @jameseggleton1992
    @jameseggleton1992 10 місяців тому

    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?

    • @jameseggleton1992
      @jameseggleton1992 10 місяців тому

      figured it out, missed the pop up on screen saying GML only😅

  • @BUFFGOG
    @BUFFGOG 9 місяців тому

    hey can anyone help me fix this error on my game - "gml_Object_o_entity_par_Draw_0 (line 1)"

  • @skjoldss
    @skjoldss 2 роки тому

    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?

  • @guntober
    @guntober 2 роки тому

    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,

    • @Slyddar
      @Slyddar  2 роки тому

      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.

  • @hexxidelux6224
    @hexxidelux6224 2 роки тому

    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.

    • @Slyddar
      @Slyddar  2 роки тому

      Thanks for noticing. I've corrected it now.

  • @whatt1990
    @whatt1990 2 роки тому

    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?

  • @RPAS1
    @RPAS1 11 місяців тому

    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?

  • @gromul4976
    @gromul4976 2 роки тому +2

    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.

    • @rindallbroxmitten
      @rindallbroxmitten 2 роки тому +1

      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.

    • @DennisUlijn
      @DennisUlijn Рік тому

      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).

    • @kaori5962
      @kaori5962 7 місяців тому +1

      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

    • @gromul4976
      @gromul4976 6 місяців тому +1

      @@kaori5962 lulz you are so so so welcome. Never thought I'd actually help someone out. Let alone 2 years later.

  • @happy_run
    @happy_run 2 роки тому +1

    Nice!

  • @DevAnon
    @DevAnon 2 роки тому

    i'm thinking which game engine to pick, really tempted to use godot, but this series is tempting me with GM

    • @Slyddar
      @Slyddar  2 роки тому

      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.

  • @EerieHaze666
    @EerieHaze666 2 роки тому

    will you do a vid about save files n load cuz it hard todins them on dnd

  • @lunadog2322
    @lunadog2322 2 роки тому

    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

    • @DJWhisler
      @DJWhisler Рік тому

      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.

  • @apexaliens5180
    @apexaliens5180 2 роки тому

    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 :(

    • @gustavkaastrup8597
      @gustavkaastrup8597 2 роки тому

      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?

  • @WrenKainIV
    @WrenKainIV 2 місяці тому

    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...

    • @WrenKainIV
      @WrenKainIV 2 місяці тому

      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

  • @Connect2G
    @Connect2G 2 роки тому

    Sir Slyddar can you give us a hint when is #6 ?

    • @Slyddar
      @Slyddar  2 роки тому

      It's out now, available as early access to Patreons at the moment. It will be released to all in 3 days.

    • @Connect2G
      @Connect2G 2 роки тому

      @@Slyddar Thank ya ! :3

  • @jowsok
    @jowsok 2 роки тому

    idk what i've done wrong but it keeps coming up with an error

    • @Slyddar
      @Slyddar  2 роки тому

      Please read the pinned comments, or the description, regarding GMS2.3 changes.

    • @jowsok
      @jowsok 2 роки тому

      @@Slyddar ty, i eventually fixed it, just went through the video again and realised i missed a few things. Excited for the next video!

  • @osci5
    @osci5 2 роки тому

    When next tutorial?

    • @Slyddar
      @Slyddar  2 роки тому

      It's out and available as early access to Patreons at the moment. It will be released to all in 3 days.

  • @fierorecensione5828
    @fierorecensione5828 Рік тому

  • @CRACKEÐ
    @CRACKEР2 роки тому

    can you release next one

    • @Slyddar
      @Slyddar  2 роки тому

      I have, it's available as early access to Patreon members at the moment. It will be released to all in 3 days.

    • @CRACKEÐ
      @CRACKEР2 роки тому

      Oh ok sort of new to coding btw these tutorials help a heap

  • @PapaBrizzy
    @PapaBrizzy Місяць тому

    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

    • @Slyddar
      @Slyddar  Місяць тому +1

      Ok, I'll try and mention specifically what I'm doing in future videos. Thanks for the positive feedback.

  • @koto_games3290
    @koto_games3290 2 роки тому +1

    трейлер игралэнд!!! ua-cam.com/video/Jd8yBucK2aQ/v-deo.html

    • @Slyddar
      @Slyddar  2 роки тому

      English please.

  • @TheodorosKosmidis
    @TheodorosKosmidis Рік тому +2

    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

    • @timtimethymetie
      @timtimethymetie Рік тому

      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.

    • @TheodorosKosmidis
      @TheodorosKosmidis Рік тому +1

      @@timtimethymetie thank for the input but i use DND for the course not GML. So I dont have a enemy_processes script.

  • @MikeBergM
    @MikeBergM 27 днів тому

    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 :(

    • @SquidBitts
      @SquidBitts 6 днів тому

      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