Harvesting Resources in Godot 4

Поделиться
HTML-код
  • Опубликовано: 30 сен 2024

Комментарии • 18

  • @simoneabelo
    @simoneabelo 3 месяца назад +1

    12:17 "Hey mate. You've been clicked."

  • @bennettmandino8740
    @bennettmandino8740 4 месяца назад +1

    I told myself if I could figure out how to make a pawn do basic tasks, I'd try making my own game. Thanks to you, I am far beyond that! Keep it up!

  • @definitelyturok
    @definitelyturok 4 месяца назад +2

    Great videos, reallly enjoying the series, keep it up!

  • @F4ngb0n3
    @F4ngb0n3 Месяц назад

    Absolutely brilliant series and seriously looking to finishing it and keep the type flowing! I am having a bit of an issue though; at around 17:16 during the harvest item task -- as far as I can tell from output console all tasks are registering and completing as they should, but I am getting an error throw once the harvest progress has reached 1.
    Invalid get index '2' ( on base Array ) -> where the array is the GetCurrentSubtask return value
    I have scoured the Gitlab and the video to find where I messed up but I have no idea, and printing to console hasnt yielded any results as the task gets completed successfully.

  • @metallmen
    @metallmen 4 месяца назад +3

    Guys who're watching this series, just hit the like button and leave a comment, it's so easy, this awesome series should get much more attention. Thank you!

  • @glyff194
    @glyff194 4 месяца назад

    Great series! Very informative

  • @xcoder2205
    @xcoder2205 4 месяца назад

    Is it better to split the task into multiple?

  • @felipetonkiel7490
    @felipetonkiel7490 4 месяца назад

    in this line to add the task "taskManager.AddTask(Task.TaskType.Harvest, self)" how would you make it so I can reference the "self" from anotehr scene, like an ui in control node?
    I would like to make my ccommand to add task by an button on an separated scene but I can`t seem to figure it out, if you have the spare time to give it would be really helpfull

    • @real_robots
      @real_robots  4 месяца назад +1

      For me, once that function passes the info to the task manager, I can access the task from there.
      For what you're trying to do, you just need to store a reference to it when you click on it, or however you select it, and then pass that on when you press your button.
      When you say a separate scene though, if you're talking about changing scenes and passing info across you'll need to play with Singletons (Autoload), I feel like you just mean a different scene in your current level, in which case you just need its place in the scene tree, either compared to the class calling it $"../" or the root $"/root"
      If you're in a control node, I'd just have it have a reference to the task manager, the same way I've currently got references to the task manager from items and other things being spawned in.

    • @felipetonkiel7490
      @felipetonkiel7490 4 месяца назад

      @@real_robots I'll try it out, thank you by a lot!

  • @felipetonkiel7490
    @felipetonkiel7490 4 месяца назад

    I got this "Attempt to call function 'get_path' in base 'null instance' on a null instance." and can't find where is the problem, can someone help?

    • @real_robots
      @real_robots  4 месяца назад +2

      I think the only place that get_path() is called is in the new SpawnItemByName() function. I add it at 08:14.
      But if that is finding a null then you must have put something wierd into your itemPrototypes array. There shouldn't be any nulls in there, it gets loaded up by the new LoadItemPrototypes() method
      If you're still having trouble, compare what you've got to my latest in the git repo
      gitlab.com/realrobots/rimworldripoff/-/tree/c060ec2185f89063f28677db70ef98575caa3df8

    • @felipetonkiel7490
      @felipetonkiel7490 4 месяца назад +1

      @@real_robots man I swear, when I'm done with my game, half of what I make will go to you

  • @galsanodgerel1793
    @galsanodgerel1793 4 месяца назад +1

    Keep going bro 💪🏻❤

  • @felipetonkiel7490
    @felipetonkiel7490 4 месяца назад

    Man you are really reading my mind when realeasing these videos

  • @CoFloCipher
    @CoFloCipher 4 месяца назад

    This is such a great series!