Write Faster Code with Coroutines in Godot 4.2+ and 3.5

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 พ.ย. 2024

ความคิดเห็น • 8

  • @H3_remix
    @H3_remix 8 หลายเดือนก่อน +8

    Thanks for making this video. I love when people take the time to properly explain concepts. I’m a big picture person and when I don’t understand the why I completely lose sight of everything else. Great descriptions, great focus on showing what you’re doing while you’re doing it. This is the best part for me. Some tutorials Blaze through assuming we know. But the issue there is I wouldn’t need a tutorial if I already knew! So I extend my sincerest thank you.

    • @cashewolddew
      @cashewolddew  8 หลายเดือนก่อน +2

      I'm really happy to see comments like this. I'm glad to know I'm heading towards the right direction. Thanks a lot for the kind words 🥜

  • @grzegorzpedrycz2630
    @grzegorzpedrycz2630 7 หลายเดือนก่อน +2

    I just start thinking about how asynchronous operation work in Godot... Thanks for lovely piece of knowledge !

  • @MH-lr6ue
    @MH-lr6ue 7 หลายเดือนก่อน +1

    Thank you. This was very easy to digest

  • @colly6022
    @colly6022 6 หลายเดือนก่อน

    why the lethal company screenshot in the thumbnail? 🤔

    • @cashewolddew
      @cashewolddew  6 หลายเดือนก่อน +3

      Well, since this is a coroutine video, I thought it fitting since the game has YIELD sign.

  • @H3_remix
    @H3_remix 8 หลายเดือนก่อน

    Can I use await inside of an area2d signal? Specifically I have a script where my enemy follows my character when they’re in range. However, even though my character isn’t in range the enemy automatically starts approaching. Not sure why this is because I used an if statement with something like:
    If body.in_group=“player”:
    - not on my pc at the moment but I would be interested to see if await could be used to fix my issue.

    • @cashewolddew
      @cashewolddew  8 หลายเดือนก่อน +2

      You can, of course, wait for a signal, but from the sound of it, it seems that you only want to approach when in range. In that case you could connect the function which makes the enemy seek your character to the body_entered signal of your Area2D. Thus, the character would follow only when entering some area that you define around your character.
      I know about this amazing tutorial th-cam.com/video/MtEh6vofiqQ/w-d-xo.html from Queble which tries to achieve what you describe.