You are definitely getting better at this. Your channel is incredibly valuable, please keep going. Some suggestions on how to improve: take a note of how Clear Code teaches in their video "The ultimate introduction to Godot 4": 1. the state the problem or motivation for wanting to do something, 2. they tell what approach they are going to use 3. they show the approach 4. they show any potential problems that arise from the approach 5. they describe the reason why said problem arose 6. they fix the problem. Notice how you tend to skip phases 1 and 2, and that makes it sometimes difficult to follow.
On top of that: they then give you an assignment on how to practise it yourself. I never actually do the assignment, but I do quickly think about how I would approach it. Clear code has a strong and effective educational method in their videos!
If you're having problem with apples not spawning (with timer), you probably written state == "apples" instead of state = "apples" in func _on_growth_timer_timeout():
Thank you so much for the tutorials! I'm excited for the next one. I also love your quick (but still clear) pace. I often find myself zoning out when other tutorials move so slowly.
Another great episode. I'm so glad you decided to make a survival game tutorial. I have been wanting to make a survival game my self and this will be a great help
I'm really enjoying following along. One small issue that's probably more to do with the Godot UI and my age than it is your teaching... I find that sometimes you click through a series of Godot UI controls quickly and I have to rewind 2-3 times to see where you went and follow along. Is it possible for you to better show where you are clicking in the Godot UI so it's super clear? It should only be needed the first time through a given process in each video for me, once we're repeating things I'm good. One thing I find really good in your videos is that you don't hide your mistakes. Explaining your mistakes and how you fix them is incredibly valuable. Thank you.
for those who were unable to execute the animation of apples disappearing from the tree: in the signals connect _on_pickable_area_body_entered(body): and _on_pickable_area_body_exited(body): instead of _on_pickable_area_area_entered(body): and _on_pickable_area_area_exited(body): Note: do not rename in the script, disconnect the signal and reconnect again the right way.
Across multiple tutorials and engines, I don't think I've ever watched any tutorials as helpful as yours have been to me, by far the easiest to takes notes and branch off of. Thank you very much for your hard work!!
thankfully, had no errors or visual issues for this video. Only thing I noticed was that you went a little too fast in the entire process of adding stuff, coding, switching immediately to another script, etc. But it's no big deal, I can deal with just pausing and rewinding :) Keep up the good work! I am definitely enjoying this series! :D I hope I can incorporate this with making a mining system. I would just have to change the Harvesting part to mining (adding the animation for mining with a pickaxe, and coding in the logic with how many hits it takes to break the ore with whatever pickaxe type I'm using).
@@dev-worm I definitely will need help with it tbh, but idk how I can reach out to you besides commenting on your videos 😣😓 Would you be willing to communicate another way?
Your teaching style is really working well with me, I did spend a solid hour swearing at my PC because i had a has. instead of a has_ So that was fun :> But yeah man your pace and ability to create + answer side notes makes it a lot easier to understand and piece the dots together of why this would work and for what reason would i use it. So yeah, Thankyou. Youre the first tutorial producer that matches my learning style.
I'm so happy to hear that!! thank you!! I'm sorry about the has. issue... I would have for sure done the same.. little errors like that are so frustrating lol
If you place multiple apple trees that intersect than with the current setup you would only need to press the key once and it would collect all apples from all trees. So you would need some additional logic to deal with that
I think I am having this problem. At first I need to enter the collision area once to pick the apple. Then once I move away and pick another trees apple I end up picking all of the trees apples at once far from the collision area. Any solution ?
I like this tutorial series as I am coming over to godot from unity and i'm unfamiliar with how everything works here. just a small comment: The fade animation does not need to have defined a position and rotation track as it should fade regardless. Since the apple will have played the "fallingfromtree" animation already, it will fade at the position it ended the previous animation at.
If your having trouble with the has_method("player") line. you can test its by putting a print statement right after. i found the using has_signal("player") works better is you add func _ready(): add_user_signal("player") to the player script I have no idea how has_method works but this seems to be more versatile anyway.
Hi DevWorm!!! thanks for making such a detailed video, your videos definitely helped me so much! I got one query though, couldn't you make the fade animaiton in the the same animation which you were making which is "fallingfromtree" instead of making two seperate animations
Sorry for the wait!! The rest of the series will be uploaded consistently every other day and should be finished within the next 2 weeks max!! Inventory part will be uploaded tomorrow!!
Hey man I’m using this game as an assignment for my digital class (hope that’s alright) but respectfully when do you think you’ll be able to upload the rest of the tutorials as this game is due very soon for me. Thanks
uploading the tutorial portion tomorrow and Friday.. then will be uploading the rest of the series, within the next week and a half... I'm not sure if that meets your deadline or not, but I hope I'm able to help! Sorry for the inconvenience
@@dev-worm nah your alright man i have just been incorporating ur tutorials from you other rpg Godot game such as the enemy and combat system but yeah would appreciate it if could upload them asap. Thanks a lot for the game tho helped a lot with the assignment
@@dev-wormand yeah I was going to ask my game should work right if I use ur tutorials from you other rpg game right I created the slime and it works good just have to add my combat system and health bar
Thanks for the vid, I’ve been looking foward to it. Can you make a video about making Finite State Machines, its a crucial step of being organized and more readable. Thanks again! ❤
Troubleshooting for you guys: 1) If you have the problem where the apple doesnt appear on the tree, make sure the whole animation is reset to its original and starting state and not when it's faded away 2) If the apple stays on the tree and disappears instead of falling down and fading, remember that the "Autoplay on Load" for "fallingfromtree" animation must be On but for the "fading" animation it must be Off
Hello, following all the steps when I get to minute 9.20, which is the time to see that the trees are growing apples, it doesn't work for me, everything is correct and I have followed everything step by step, but it doesn't work, what can I do? be the problem?
The rough part about watching these tutorials is that everything works for the most part, but godot updates so often that there's just several crucial bits of code that are now deprecated or just don't work, and it's impossible as a beginner to understand what it is I'm supposed to replace it with or how to get it working again
I totally get that! I am currently working on an updated version, which I am planning on uploading in around 2 weeks, and that series will cover all that you see here and much more, so hopefully it will help clear up some of the confusion!
@dev-worm Awesome!! It's been really helpful so far and I'm already feeling more confident and knowledgeable after just a few videos, so it's great to hear that.
for a long time my player wasnt being recofnised as within the pickable area. after a long time i figured out that within my player scene, i had the collision shape nested within the camera2d, rather as outside the camera only nested in player scene.
@@dev-worm haha yes. got there in the end though. its funny how many times i get stuck for ages, the realise its just a spelling error. I've just added a area2d and collision area for the lake, once inside if i press f then a fish is added into my inventory. i created the logic thanks to your apple and stick guide. im wondering do you have a discord? would be a great discussion tool for viewers of your content.
Ok I want to say, that this tutorial is very nice clear about all the steps involved. And what you've done is very impressive. But the title of the video is "How to Make Collectable Objects in Godot 4 ", not "how to make an apple tree that will spawn collectible apples after a certain amount of time and drop them" It gives a lot of information that might not be applicable to the task. That said, I will definitely keep following.
i have followed your videos painstakingly, but find that i am still not getting any collision detection. no matter what i do or what settings i check for troubleshooting, the characterbody2d does not interact with the area2d i have checked that neither are collision disabled. i have checked that they have the same collision layers and masks on. i have checked that they are under the same parent node in the world scene. but nothing seems to work
hey i'm am new to coding/developing. I was following along pretty well with the video until the end. I created my animations and saved them like the video, but once my code was typed in it keeps giving me node not found =(. code matches what you showed word for word but I can get pass this any ideas??
I had the same problem with one of the trees. I found out that it was located as a sub branch from the other tree located on the nodes in the left under the node world. I moved it and made it a sub branch from the node world like the other tree and not a sub from the node apple tree like it was before and that fixed my problem. I hope I explained it well enough 😅
Hello, I am one of your followers and I had a request for a video. How could you make a worm similar to the worms in the game Terraria? I would be very grateful if you would please
sorry for the wait, the inventory part has just been completed and will be uploaded tomorrow... the rest of the series is on track to be uploaded consistently every other day within the next 2 weeks!
My apple tree is spawning apples way off to the bottom right of where the trees are located. Had to fix this by placing the Marker2D several coordinates to the top left of tree, but that isn't a real fix. Any idea why it would be spawning the apples in a weird position like that even if the Marker2D is directly on the tree?
I had the same problem with one of the trees. I found out that it was located as a sub branch from the other tree located on the nodes in the left under the node world. I moved it and made it a sub branch from the node world like the other tree and not a sub from the node apple tree like it was before and that fixed my problem. I hope I explained it well enough 😅
@@shini547 ahhhh yes same. I'd instantiated the apple_tree as a child of a different child instead of the main scene. Once I reparented it everything worked right.
Hi, DevWorm, Ive been following along with this series here up to this point at 9:41 where I am officially stumped. My trees are simply not growing apples and Ive no clue why. Ive followed every step and script meticulously, but for some reason I cannot figure out why my trees are stuck on the "no apples" animation. If you could suggest something, Id appreciate it. *nvm, I fixed it...turns out my timer was labeled as "timer" still instead of "growth_timer" fml
Did it work after fixing that? Thought that was my mistake but the animation keeps on getting stuck at no apples,did you had any other errors in the code? Thanks
@@leonrayamarison742 under the growth timer function you most likely checked if state was apples instead of setting it to apples. The code should be like this: func _on_growth_timer_timeout(): if state == "no apples": state = apples
@@leonrayamarison742 I was stuck here too. What I realised is that I only wrote the _on_growth_timer_timeout(): function but I did not send the signal from the growth_timer
I am having a similar problem, expect I can not get the apples to grow back on the tree with the timer. My script should be the exact same as the video except at the top of script I needed to write var state = "apples" instead of var state = "no apples". I was able to continue with the video getting the falling apple and to have it fade, but I am unsure on how to fix the timer so that the apple trees will grow back. Please help
oh man, you started going REALLY fast once the animation started and through to the end. I had to pause and replay a lot more in this episode than the others so far. Guess that's just my inexperience showing lol
@@dev-worm don't worry it's definitely a me thing lol I'm new not just to godot but scripting as well. The last time I scripted anything was in Lua for a Roblox game back in like 2012, and I wasn't exactly proficient then either. Just tales time, I get that. Great videos though, I'm learning a ton and with some small moments here and there where you go awfully fast, the rest of the videos are well-placed and very well explained, so even someone like me can follow and actually feel like I'm learning something ^.^ thanks for your hard work
I got stuck around 9:40 my trees start with no apples, three seconds they grow apples, but pressing e doesnt removed them. My script should be exactly the same with and no errors so im not why its not working. Please help thanks
The only thing I can think of is that the packable area isn't registering the player has entered so pressing e does nothing. Not sure if that's ture or how to fix it if it is
Have a weird problem. When spawning the apple collectible. It doesn't display the apple animation at all. The instance is spawning, I get the +1 Apple text. And tree is regrowing. Weird. I even deleted the opacity from the timeline because I thought I messed something up and it was interfering. But nope ... any ideas?
I had the same problem. The fix was to change the ordering of the apple_instance's positioning and creation so that the adding to the global tree happens first: get_parent().add_child(apple_instance) apple_instance.global_position = $Marker2D.global_position Reason: Note that setting a node's global_position when it has no parent (e.g. before adding it as a child to some other node) is equivalent to setting its position because there are no parent transforms to take into account. I don't know why it's fine in the video. But you can test this by simply setting disabling the line # apple_instance.global_position = $Marker2D.global_position Then the apple will drop at 0,0 which "should" be in the middle of the map.
@@GrilledCheeseSandwich1 Hey man this reply really helps. I can't believe how much problems that I've encountered in this tutorial even though already followed it bit by bit hahaha.
All the animations work, but nothing happens when I press "e" in the actual game. I wanted to know how this can be fixed, and as always, thank you so much for your tutorials! PLEASE HELP! I looked at the errors and it said, Missing connected method '_on_pickable_area_area_body_entered' for signal 'body_entered' from node 'Apple Tree/pickable_area Area' to node 'Apple Tree'.Missing connected method '_on_pickable_area_area_body_exited' for signal 'body_exited' from node 'Apple Tree/pickable_area Area' to node 'Apple Tree'.
@@hussain_abdullah عشان انت مشهور وكدا وبنصدم من انك ببتفرج الاحنا بنتفرجه بنفرح لما نلاقي يوتيوبر الاحنا بنتفرجه عليه ببتفرج علي احنا بنتفرج عليه فبنحس بفرحه لو عاوز تخلص من موضوع ده اتفرج فيديوهات بحسابك خاص
you could do it either way, and im trying to keep things more simple and easier to understand and I feel that classes could have a whole video explaining them.. which I am looking to upload soon!
I have the solution for me: func _on_pickable_area_body_exited(body): if body.has_method("player"): player_in_area = false have to be called. proof if same of these function are still called
Incredible series, im at inventory 2 but i have this bug where both trees replenish at the same time, even when i pick the apples at very different times.
I have the solution for me: func _on_pickable_area_body_exited(body): if body.has_method("player"): player_in_area = false have to be called. proof if same of these function are still called
Having an issue with trying to spawn the godot logo, when you collect the apple. I keep getting an error that says: Invalid get index 'global' (on base: 'StaticBody2D').
it checks if the body entering the area has a function within it called "player" so within your player script add a function named player and just put pass with it. So like. func player(): pass
I am making this game for android but how do i replace the e button with the touch screen button node i did it but it didn't work can you please help me
Can someone help me i used coins instead of trees but when i run the game the timer starts the animation and i cant pick the coin up. instead of respawning it it starts the animation
yes you could do it like this! but for a chest you would probably want to randomize the drops.. correct? or have the drops collected by a button or by the player running over the top of them
@@dev-worm i trying the code for the apple tree (is not working). It is a mix with the code for Apple tree and rock? Yes, i want random items but i don't know how.
just finished what i think is a really good one, ill upload it within the next day!! I just finished it and am working on the editing of it as we speak!!! So i really hope you find it helpful!
Anyone figured out the problem with the marker2D ? I checked the script twice and it is correct, although apple spawns far from the apple tree, it must be some setting of the 2D marker but I can't find a solution. Marker2D is centered on the Apple tree, yet the apple spawns in the middle of the stage.
if you use a scene in which you merge all elements, in my case game.tscn, and you have moved the world/map, the global_position is no longer correct. check all your scenes in which you use your world as a child to see if anything is shifted (y at the top and x on the left should be 0)
I've just had this issue myself, my problem was that I animated the root node of the apple so when the apple falling animation played it reset the apple position to the centre of the scene. Make sure you animate the sprite and not the root node 👍
sorry for the wait, the inventory part has just been completed and will be uploaded tomorrow... the rest of the series is on track to be uploaded consistently every other day within the next 2 weeks!
hm if i had to guess you would be running the wrong scene and not the world scene, I really dont know why it would be all gray except for that reason!! let me know if that helps! also are you getting any error messages or anything? Im sorry you are having trouble I hope we get it figured out!
Please don't leave us hanging like this. I thought you were going to be releasing these "every other day"? Just an update to what's happening would be nice. I get you have a life outside of YT so no need for details and I hope everything is alright.
Man he make script for videos and montage unlike the past videos he post video with no montage, no script ,and if there thing wrong he think about the wrong in video with out delete the part of thinking so waiting is better than getting low quality videos
@microwire007 I'm sorry, just finished it all!! and Episode 4 and 5 will be upload on back to back days as they go together to create the inventory! Im really happy with how the inventory turned out and Im sure youll be impressed with it. Sorry it took so long but an inventory is really important and i wanted to make sure it was as perfect as possible.
You are definitely getting better at this. Your channel is incredibly valuable, please keep going. Some suggestions on how to improve: take a note of how Clear Code teaches in their video "The ultimate introduction to Godot 4": 1. the state the problem or motivation for wanting to do something, 2. they tell what approach they are going to use 3. they show the approach 4. they show any potential problems that arise from the approach 5. they describe the reason why said problem arose 6. they fix the problem.
Notice how you tend to skip phases 1 and 2, and that makes it sometimes difficult to follow.
On top of that: they then give you an assignment on how to practise it yourself. I never actually do the assignment, but I do quickly think about how I would approach it.
Clear code has a strong and effective educational method in their videos!
If you're having problem with apples not spawning (with timer), you probably written state == "apples" instead of state = "apples" in func _on_growth_timer_timeout():
Thank yo!
thanks man, now i feel dumb haha
thanks man code saver
Thank you so much for the tutorials! I'm excited for the next one. I also love your quick (but still clear) pace. I often find myself zoning out when other tutorials move so slowly.
Another great episode. I'm so glad you decided to make a survival game tutorial. I have been wanting to make a survival game my self and this will be a great help
I'm really enjoying following along.
One small issue that's probably more to do with the Godot UI and my age than it is your teaching... I find that sometimes you click through a series of Godot UI controls quickly and I have to rewind 2-3 times to see where you went and follow along. Is it possible for you to better show where you are clicking in the Godot UI so it's super clear? It should only be needed the first time through a given process in each video for me, once we're repeating things I'm good.
One thing I find really good in your videos is that you don't hide your mistakes. Explaining your mistakes and how you fix them is incredibly valuable. Thank you.
for those who were unable to execute the animation of apples disappearing from the tree: in the signals connect
_on_pickable_area_body_entered(body):
and
_on_pickable_area_body_exited(body):
instead of
_on_pickable_area_area_entered(body):
and
_on_pickable_area_area_exited(body):
Note: do not rename in the script, disconnect the signal and reconnect again the right way.
life saver, noticed my exited function was busted and was driving me nuts haha, but this comment saved my sanity, thank you!
Across multiple tutorials and engines, I don't think I've ever watched any tutorials as helpful as yours have been to me, by far the easiest to takes notes and branch off of. Thank you very much for your hard work!!
thankfully, had no errors or visual issues for this video. Only thing I noticed was that you went a little too fast in the entire process of adding stuff, coding, switching immediately to another script, etc. But it's no big deal, I can deal with just pausing and rewinding :) Keep up the good work! I am definitely enjoying this series! :D I hope I can incorporate this with making a mining system.
I would just have to change the Harvesting part to mining (adding the animation for mining with a pickaxe, and coding in the logic with how many hits it takes to break the ore with whatever pickaxe type I'm using).
glad to hear!! thanks! if you need any help with the mining portion of your game then feel free to reach out!
@@dev-worm I definitely will need help with it tbh, but idk how I can reach out to you besides commenting on your videos 😣😓
Would you be willing to communicate another way?
Your teaching style is really working well with me,
I did spend a solid hour swearing at my PC because i had a has. instead of a has_
So that was fun :>
But yeah man your pace and ability to create + answer side notes
makes it a lot easier to understand and piece the dots together of why this would work and for what reason would i use it.
So yeah, Thankyou.
Youre the first tutorial producer that matches my learning style.
I'm so happy to hear that!! thank you!! I'm sorry about the has. issue... I would have for sure done the same.. little errors like that are so frustrating lol
not too many issues with this one. my apple isnt perfectly centered but everything else works. thanks.
Love the BL2 main menu music for like 5 sec at 20ish mins XD very funny
Congratulations 9k 🎉🎉🎉
Don't forget me when you grow up ❤❤
These are so good! Can you do a video on a leveling/Job/Class system with xp?
Great series to realize some ideas in Godot with 0 knowledge about this engine. Keep going! :)
If you place multiple apple trees that intersect than with the current setup you would only need to press the key once and it would collect all apples from all trees. So you would need some additional logic to deal with that
I think I am having this problem. At first I need to enter the collision area once to pick the apple. Then once I move away and pick another trees apple I end up picking all of the trees apples at once far from the collision area. Any solution ?
awesome Dev, ill be watching this tomarrow, thank you! Well done! ✌
I like this tutorial series as I am coming over to godot from unity and i'm unfamiliar with how everything works here.
just a small comment:
The fade animation does not need to have defined a position and rotation track as it should fade regardless. Since the apple will have played the "fallingfromtree" animation already, it will fade at the position it ended the previous animation at.
If your having trouble with the has_method("player") line. you can test its by putting a print statement right after. i found the using has_signal("player") works better is you add
func _ready():
add_user_signal("player")
to the player script
I have no idea how has_method works but this seems to be more versatile anyway.
How would you type ou that print statement? I'm having trouble getting the player to register in the pickable area
Thanks mate life saver!
I tried this but the entering the zone is still not detected
I am following it and i am gonna use the things that are necessary for my game thanks for the video . I appreciate it man thanks. :)
of course!
instead of typing res:// at 10:57 you can click and drag the scene from the filesystem and it will add the file path in the line of code automatically
great vid . completing ur tutorials 1 by 1 :D
Very helpful video I waited here. Nice!
Can you make a video explaining the AnimationTree node? Love your videos!
As I knew it would be, this is so good. Thank you for all your work.
Hi DevWorm!!! thanks for making such a detailed video, your videos definitely helped me so much! I got one query though, couldn't you make the fade animaiton in the the same animation which you were making which is "fallingfromtree" instead of making two seperate animations
yes you completely can!! i just did it this way to make the wait time controllable from the code!! but either way works perfect!
20:48
*Smooth jazz intensifies*
If you click it multiple times before queue_free() is signaled (while animation is playing) it will collect multiple times
continue please, very interesting, I appreciate it, I'm waiting for the continuation of the game👍🏻👍🏻👍🏻
Sorry for the wait!! The rest of the series will be uploaded consistently every other day and should be finished within the next 2 weeks max!! Inventory part will be uploaded tomorrow!!
could you release the script files somewhere so we can read through them?
Thanks so much for doing these!
I'm so glad that I am able to help! Thanks for watching!
So usefull i really love your work !
so glad to hear that!
Hey man I’m using this game as an assignment for my digital class (hope that’s alright) but respectfully when do you think you’ll be able to upload the rest of the tutorials as this game is due very soon for me. Thanks
uploading the tutorial portion tomorrow and Friday.. then will be uploading the rest of the series, within the next week and a half... I'm not sure if that meets your deadline or not, but I hope I'm able to help! Sorry for the inconvenience
@@dev-worm nah your alright man i have just been incorporating ur tutorials from you other rpg Godot game such as the enemy and combat system but yeah would appreciate it if could upload them asap. Thanks a lot for the game tho helped a lot with the assignment
@@dev-wormand yeah I was going to ask my game should work right if I use ur tutorials from you other rpg game right I created the slime and it works good just have to add my combat system and health bar
Thanks for the vid, I’ve been looking foward to it. Can you make a video about making Finite State Machines, its a crucial step of being organized and more readable. Thanks again! ❤
Troubleshooting for you guys:
1) If you have the problem where the apple doesnt appear on the tree, make sure the whole animation is reset to its original and starting state and not when it's faded away
2) If the apple stays on the tree and disappears instead of falling down and fading, remember that the "Autoplay on Load" for "fallingfromtree" animation must be On but for the "fading" animation it must be Off
Nice! Keep the good work!
it work for me, thank you, finaly i found the good one that i can easy to understand
Glad it helped
Continue 👍👍👍
Hello, following all the steps when I get to minute 9.20, which is the time to see that the trees are growing apples, it doesn't work for me, everything is correct and I have followed everything step by step, but it doesn't work, what can I do? be the problem?
Did you make the timer one shot or did you not send the signal from the timer
I keep having an error with infinitley spawning apples, not sure why.
Ow boy I can't wait to start this one tonight 😊
The rough part about watching these tutorials is that everything works for the most part, but godot updates so often that there's just several crucial bits of code that are now deprecated or just don't work, and it's impossible as a beginner to understand what it is I'm supposed to replace it with or how to get it working again
I totally get that! I am currently working on an updated version, which I am planning on uploading in around 2 weeks, and that series will cover all that you see here and much more, so hopefully it will help clear up some of the confusion!
@dev-worm Awesome!! It's been really helpful so far and I'm already feeling more confident and knowledgeable after just a few videos, so it's great to hear that.
thnks for the content! i'm learning a lot in your videos!
for a long time my player wasnt being recofnised as within the pickable area. after a long time i figured out that within my player scene, i had the collision shape nested within the camera2d, rather as outside the camera only nested in player scene.
glad you've figured it out now!! but that must've been so annoying for something so small to be the issue
@@dev-worm haha yes. got there in the end though. its funny how many times i get stuck for ages, the realise its just a spelling error. I've just added a area2d and collision area for the lake, once inside if i press f then a fish is added into my inventory. i created the logic thanks to your apple and stick guide.
im wondering do you have a discord? would be a great discussion tool for viewers of your content.
Great, job....just FYI instantiate is pronounced.....in-stan-shee-ate 👍
Ok I want to say, that this tutorial is very nice clear about all the steps involved. And what you've done is very impressive.
But the title of the video is "How to Make Collectable Objects in Godot 4 ", not "how to make an apple tree that will spawn collectible apples after a certain amount of time and drop them"
It gives a lot of information that might not be applicable to the task. That said, I will definitely keep following.
i have followed your videos painstakingly, but find that i am still not getting any collision detection. no matter what i do or what settings i check for troubleshooting, the characterbody2d does not interact with the area2d
i have checked that neither are collision disabled. i have checked that they have the same collision layers and masks on. i have checked that they are under the same parent node in the world scene. but nothing seems to work
Nice video i thought you reupload deleted video sound track management
I suggest making more tips videos, I miss them.
working on one right now! next video will be a more of tip video!
hey i'm am new to coding/developing. I was following along pretty well with the video until the end. I created my animations and saved them like the video, but once my code was typed in it keeps giving me node not found =(. code matches what you showed word for word but I can get pass this any ideas??
Great stuff, thanks
the location of where the apple falls relative to the tree is completely off and im very new to this any suggestion
Same here and I can't figure out why. I had to move the Marker2D northwest of the tree just to get it to spawn in the correct location
I had the same problem with one of the trees. I found out that it was located as a sub branch from the other tree located on the nodes in the left under the node world. I moved it and made it a sub branch from the node world like the other tree and not a sub from the node apple tree like it was before and that fixed my problem.
I hope I explained it well enough 😅
Is there a reason you didn't add the fallfromtree animation as autoplay and queue_free method at the end of fade animation?
Good catch that is what I shouldve done here. Not sure why I didnt.
Hello, I am one of your followers and I had a request for a video. How could you make a worm similar to the worms in the game Terraria? I would be very grateful if you would please
where are the other videos of this series? why u stopped uploading
sorry for the wait, the inventory part has just been completed and will be uploaded tomorrow... the rest of the series is on track to be uploaded consistently every other day within the next 2 weeks!
@@dev-wormthank you for the answer! I just saw that the 4th video is already uploaded!
My apple tree is spawning apples way off to the bottom right of where the trees are located. Had to fix this by placing the Marker2D several coordinates to the top left of tree, but that isn't a real fix. Any idea why it would be spawning the apples in a weird position like that even if the Marker2D is directly on the tree?
I had the same problem with one of the trees. I found out that it was located as a sub branch from the other tree located on the nodes in the left under the node world. I moved it and made it a sub branch from the node world like the other tree and not a sub from the node apple tree like it was before and that fixed my problem.
I hope I explained it well enough 😅
had the same issue and this fixed it, thanks! @@shini547
@@shini547 ahhhh yes same. I'd instantiated the apple_tree as a child of a different child instead of the main scene. Once I reparented it everything worked right.
Same issue.. global_position need to be 52,54 and she's 105, 86.. I don't understand :)
Hi, DevWorm, Ive been following along with this series here up to this point at 9:41 where I am officially stumped. My trees are simply not growing apples and Ive no clue why. Ive followed every step and script meticulously, but for some reason I cannot figure out why my trees are stuck on the "no apples" animation. If you could suggest something, Id appreciate it.
*nvm, I fixed it...turns out my timer was labeled as "timer" still instead of "growth_timer" fml
Did it work after fixing that? Thought that was my mistake but the animation keeps on getting stuck at no apples,did you had any other errors in the code? Thanks
@@leonrayamarison742 under the growth timer function you most likely checked if state was apples instead of setting it to apples. The code should be like this:
func _on_growth_timer_timeout():
if state == "no apples":
state = apples
@@leonrayamarison742 I was stuck here too. What I realised is that I only wrote the _on_growth_timer_timeout(): function but I did not send the signal from the growth_timer
i fixed this problem by changing var state = "no apples" to var state = "apples" up at the top of the script
I am having a similar problem, expect I can not get the apples to grow back on the tree with the timer. My script should be the exact same as the video except at the top of script I needed to write var state = "apples" instead of var state = "no apples". I was able to continue with the video getting the falling apple and to have it fade, but I am unsure on how to fix the timer so that the apple trees will grow back. Please help
I'm kinda curious. Is it possible to just compile multiple collectables into one png? And if so how?
you are amazing bro
thank you brother!!!
oh man, you started going REALLY fast once the animation started and through to the end. I had to pause and replay a lot more in this episode than the others so far. Guess that's just my inexperience showing lol
ahh sorry about that lol!! if you arnt understanding then please feel free to reach out!
@@dev-worm don't worry it's definitely a me thing lol I'm new not just to godot but scripting as well. The last time I scripted anything was in Lua for a Roblox game back in like 2012, and I wasn't exactly proficient then either. Just tales time, I get that.
Great videos though, I'm learning a ton and with some small moments here and there where you go awfully fast, the rest of the videos are well-placed and very well explained, so even someone like me can follow and actually feel like I'm learning something ^.^ thanks for your hard work
worked just fine, but the change applied to all apple trees that i put on the map as a whole whenever i clicked the button to interact with it.
I got stuck around 9:40 my trees start with no apples, three seconds they grow apples, but pressing e doesnt removed them. My script should be exactly the same with and no errors so im not why its not working. Please help thanks
The only thing I can think of is that the packable area isn't registering the player has entered so pressing e does nothing. Not sure if that's ture or how to fix it if it is
ive run into the exact same trouble. @@relaxedmakuhita2478 i tried seeing if maybe it had something to do with the z index, but that didnt work.
@@brianmarkowitz In the player's movements script you must add the func player():
I had this problem, did have the func player(): but one of the lines I had - body.has_meta - instead of body.has_method - because of autofill....
Have a weird problem. When spawning the apple collectible. It doesn't display the apple animation at all. The instance is spawning, I get the +1 Apple text. And tree is regrowing. Weird. I even deleted the opacity from the timeline because I thought I messed something up and it was interfering. But nope ... any ideas?
you have to put $AnimationPlayer in script apple_collectable here! and ez!
extends StaticBody2D
func _ready():
fallfromtree()
func fallfromtree():
$AnimationPlayer.play("fallingfromtree")
await get_tree().create_timer(1.5).timeout
$AnimationPlayer.play("fade")
print(" +1 apples")
await get_tree().create_timer(0.3).timeout
queue_free()
I had the same problem. The fix was to change the ordering of the apple_instance's positioning and creation so that the adding to the global tree happens first:
get_parent().add_child(apple_instance)
apple_instance.global_position = $Marker2D.global_position
Reason: Note that setting a node's global_position when it has no parent (e.g. before adding it as a child to some other node) is equivalent to setting its position because there are no parent transforms to take into account.
I don't know why it's fine in the video. But you can test this by simply setting disabling the line
# apple_instance.global_position = $Marker2D.global_position
Then the apple will drop at 0,0 which "should" be in the middle of the map.
Thanks very much it worked finely.
@@GrilledCheeseSandwich1 Hey man this reply really helps. I can't believe how much problems that I've encountered in this tutorial even though already followed it bit by bit hahaha.
Can we add a cool down for when the apples spawn on the tress
All the animations work, but nothing happens when I press "e" in the actual game. I wanted to know how this can be fixed, and as always, thank you so much for your tutorials! PLEASE HELP! I looked at the errors and it said,
Missing connected method '_on_pickable_area_area_body_entered' for signal 'body_entered' from node 'Apple Tree/pickable_area Area' to node 'Apple Tree'.Missing connected method '_on_pickable_area_area_body_exited' for signal 'body_exited' from node 'Apple Tree/pickable_area Area' to node 'Apple Tree'.
great vid thanks
thank you so much!
Great,I love you man
حسين ده اخر حاجة كنت اتوقعه في حياتي ❓❓
@@jeremiahaemile2008 كنت اقصد الي كتبتة بطريقة نضيفة👀
مو الي ممكن تكون ببالك
@@hussain_abdullahانت فهمتني غلط خالص
اخر حاجة كنت اتقوقعه انك هنا مش كلمه تحبه في الله مش قصدي كدا
@@jeremiahaemile2008 لا ياخي
تحصلني بكل مكان
@@hussain_abdullah عشان انت مشهور وكدا وبنصدم من انك ببتفرج الاحنا بنتفرجه بنفرح لما نلاقي يوتيوبر الاحنا بنتفرجه عليه ببتفرج علي احنا بنتفرج عليه فبنحس بفرحه
لو عاوز تخلص من موضوع ده اتفرج فيديوهات بحسابك خاص
Thank you
Why use a "player" function rather than a "player" group?
you could do it either way, and im trying to keep things more simple and easier to understand and I feel that classes could have a whole video explaining them.. which I am looking to upload soon!
Based tutorial
I cant move the trees, I did everything like you showed but I cant still move them.
I am getting it to work but for some reason, my player is picking both trees at the same time. No matter where I am on the map.
same
I have the solution for me:
func _on_pickable_area_body_exited(body):
if body.has_method("player"):
player_in_area = false
have to be called.
proof if same of these function are still called
Thanks!
Zahardnik thank you!
did he just mispronounce "instantiate"?
Incredible series, im at inventory 2 but i have this bug where both trees replenish at the same time, even when i pick the apples at very different times.
hmm.. thats weird.. something must be connect somewhere. not sure tho unless im able to look at it!!
@@dev-worm solution for this?
I have the solution for me:
func _on_pickable_area_body_exited(body):
if body.has_method("player"):
player_in_area = false
have to be called.
proof if same of these function are still called
BTW can u also tell how to make this into a mobile game movement or smth like that
Thanks bro
anytime brother, So glad I could help!
Having an issue with trying to spawn the godot logo, when you collect the apple. I keep getting an error that says:
Invalid get index 'global' (on base: 'StaticBody2D').
nevermind I fixed it, this is why I love game dev :)
its the best feeling ever when you figure it out lol
what is has_method("player")?
it checks if the body entering the area has a function within it called "player" so within your player script add a function named player and just put pass with it. So like.
func player():
pass
You level in montag is upgrade ❤❤
tree felling and harvesting tutorial (terraria style, StardewValley) please 😕
Ill look into it soon!! thanks for reaching out!!
Can you make 3d grappling hook for Godot 4
nice
having an issue with the apple showing up far to the left. has anything changed with global position or with Marker2D?
check the offset on the marker2d and on the tree!!
@@dev-worm I have the marker right on 0, 0 in the middle of the tree. Is the offset something else? I'll try it when I get home, thanks
just in case it happens to anyone else, the offset for my main world got moved somehow and thats what was the issue.
I am making this game for android but how do i replace the e button with the touch screen button node i did it but it didn't work can you please help me
hey I press e and I'm in the area and nothing happens the code is the same I'm really confused so help would be appreciated
When I press the letter e, the apple does not fall. Please reply.
Can someone help me i used coins instead of trees but when i run the game the timer starts the animation and i cant pick the coin up. instead of respawning it it starts the animation
Umm my apple tree doesn't spawn apples at all i followed all you said, can somebody pls offer advice
i have been following along but i still encountered a problem, the tree is not sensing if the player entered or exited the collision. please help
oh, it can sense the player entering and exiting, now i do not know the problem hehe
i fixed it, it is just a naming problem hehe
glad you fixed it!! sorry i couldnt get back to you in time!
please help! I cant proceed because when i press E on my keyboard, the apple is not picked. HELLPP
did you create the "e" input in the input map?? within the project settings?
Yeah b7ut not working@@dev-worm
Is this the same for a chest? Open, drop item and fade.
yes you could do it like this! but for a chest you would probably want to randomize the drops.. correct? or have the drops collected by a button or by the player running over the top of them
@@dev-worm i trying the code for the apple tree (is not working). It is a mix with the code for Apple tree and rock? Yes, i want random items but i don't know how.
badly need an inventory vid, i did one but it worked so badly :(
just finished what i think is a really good one, ill upload it within the next day!! I just finished it and am working on the editing of it as we speak!!! So i really hope you find it helpful!
@@dev-worm I am excited!
Anyone figured out the problem with the marker2D ?
I checked the script twice and it is correct, although apple spawns far from the apple tree, it must be some setting of the 2D marker but I can't find a solution. Marker2D is centered on the Apple tree, yet the apple spawns in the middle of the stage.
if you use a scene in which you merge all elements, in my case game.tscn, and you have moved the world/map, the global_position is no longer correct. check all your scenes in which you use your world as a child to see if anything is shifted (y at the top and x on the left should be 0)
I've just had this issue myself, my problem was that I animated the root node of the apple so when the apple falling animation played it reset the apple position to the centre of the scene. Make sure you animate the sprite and not the root node 👍
Hey weird bug with tree's growing back apples, they should in theory grow back in order of picked, anyone else noticed this?
cant wait 🥵
sorry for the wait, the inventory part has just been completed and will be uploaded tomorrow... the rest of the series is on track to be uploaded consistently every other day within the next 2 weeks!
This is Episode 3 of the Survival Series.
Complete Survival Series Playlist: ruclips.net/p/PL3cGrGHvkwn2NOT1LSwf5d2XZmlc5Bjsn
Hope this series helps!
Well, soon can you make a tutorial of life system? Like player's death cutscene and game over
I can't wait for the next video of this tutorial. Starting to go in withdrawal 😂
dang i just got done an theres no inventory tutorial yet ;( Is it still coming i hope?
@@ericwood1185 any day now, he commented that he was nearly done or already done 👍🏻
im stuck at 9:12 when i start the game i see all gray
pls help
hm if i had to guess you would be running the wrong scene and not the world scene, I really dont know why it would be all gray except for that reason!! let me know if that helps! also are you getting any error messages or anything? Im sorry you are having trouble I hope we get it figured out!
@@dev-worm when i start the game is appear a error on the scrips (says) "Attempt to call function "start" in base "null istance" on a null istance"
@@dev-worm ty so much for helping me (:
can pls help me
20:48 :D
The “t” is silent.
Of what word
can someone help me and put they code to the reply's plz
extends StaticBody2D
func _ready():
fallfromtree()
func fallfromtree():
$AnimationPlayer.play("fallingfromtree")
await get_tree().create_timer(1.5).timeout
$AnimationPlayer.play("fade")
print(" +1 apples")
await get_tree().create_timer(0.3).timeout
queue_free()
Please don't leave us hanging like this. I thought you were going to be releasing these "every other day"? Just an update to what's happening would be nice. I get you have a life outside of YT so no need for details and I hope everything is alright.
Man he make script for videos and montage unlike the past videos he post video with no montage, no script ,and if there thing wrong he think about the wrong in video with out delete the part of thinking so waiting is better than getting low quality videos
@microwire007 I'm sorry, just finished it all!! and Episode 4 and 5 will be upload on back to back days as they go together to create the inventory! Im really happy with how the inventory turned out and Im sure youll be impressed with it. Sorry it took so long but an inventory is really important and i wanted to make sure it was as perfect as possible.
@@dev-worm All good mate. I misunderstood how you were doing it, I thought you had them all ready to go. Happy to wait, your content is worth it!