Тёмный

How to Make Collectable Objects in Godot 4 (coins, apples, etc) 

DevWorm
Подписаться 32 тыс.
Просмотров 28 тыс.
50% 1

Apples, Coins, Blocks, anything.. it doesn't matter in this Godot 4 tutorial I teach step by step how to create collectable objects for your games. Collectable objects make your game much more engaging and entertaining!
link to art: devworm.itch.io/survival-game...
link to series playlist: • How to Make Survival G...
----------------------------------------------------------
Thank you so much for watching I really hope this video helped.
if you did enjoy or this video was helpful then all i ask is if you could please go and click that subscribe button to help out the channel. It means so much and I love your feedback in the comments. If you are having any issues with the code talked about in the video then please let me know in the comments and I will be for sure to get back to you soon. Again thanks so much and I would love to see you again!
have a great rest of you day and of course be safe :)
- thanks DevWorm,
----------------------------------------------------------

Опубликовано:

 

1 окт 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 207   
@PunCala
@PunCala 10 месяцев назад
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.
@LEQN
@LEQN 9 месяцев назад
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!
@akiameaart
@akiameaart 10 месяцев назад
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.
@Luks_FS
@Luks_FS 4 месяца назад
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.
@TrashPandaCleaningCandyFloss
@TrashPandaCleaningCandyFloss Месяц назад
life saver, noticed my exited function was busted and was driving me nuts haha, but this comment saved my sanity, thank you!
@HippocritterXD
@HippocritterXD 10 месяцев назад
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
@RXBeetle
@RXBeetle 7 месяцев назад
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!!
@Jigga1.21
@Jigga1.21 10 месяцев назад
awesome Dev, ill be watching this tomarrow, thank you! Well done! ✌
@Hades200082
@Hades200082 9 месяцев назад
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.
@dev-worm
@dev-worm 10 месяцев назад
This is Episode 3 of the Survival Series. Complete Survival Series Playlist: ru-vid.com/group/PL3cGrGHvkwn2NOT1LSwf5d2XZmlc5Bjsn Hope this series helps!
@FilenameNULL415
@FilenameNULL415 10 месяцев назад
Well, soon can you make a tutorial of life system? Like player's death cutscene and game over
@HippocritterXD
@HippocritterXD 9 месяцев назад
I can't wait for the next video of this tutorial. Starting to go in withdrawal 😂
@ericwood1185
@ericwood1185 9 месяцев назад
dang i just got done an theres no inventory tutorial yet ;( Is it still coming i hope?
@HippocritterXD
@HippocritterXD 9 месяцев назад
@@ericwood1185 any day now, he commented that he was nearly done or already done 👍🏻
@keithestanol3771
@keithestanol3771 8 месяцев назад
As I knew it would be, this is so good. Thank you for all your work.
@FilenameNULL415
@FilenameNULL415 10 месяцев назад
Very helpful video I waited here. Nice!
@user-wu1fl2cc3n
@user-wu1fl2cc3n 8 месяцев назад
great vid . completing ur tutorials 1 by 1 :D
@KalenusxD
@KalenusxD 10 месяцев назад
Nice! Keep the good work!
@AzzuBananas
@AzzuBananas 10 месяцев назад
thnks for the content! i'm learning a lot in your videos!
@cd2028
@cd2028 4 месяца назад
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
@jeremiahaemile2008
@jeremiahaemile2008 9 месяцев назад
Congratulations 9k 🎉🎉🎉 Don't forget me when you grow up ❤❤
@Programming_Of_All
@Programming_Of_All 10 месяцев назад
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. :)
@dev-worm
@dev-worm 10 месяцев назад
of course!
@kuritsu6239
@kuritsu6239 10 месяцев назад
So usefull i really love your work !
@dev-worm
@dev-worm 10 месяцев назад
so glad to hear that!
@natebuckwell1383
@natebuckwell1383 10 месяцев назад
These are so good! Can you do a video on a leveling/Job/Class system with xp?
@pauldebus4070
@pauldebus4070 9 месяцев назад
Great series to realize some ideas in Godot with 0 knowledge about this engine. Keep going! :)
@Graylegs
@Graylegs 9 месяцев назад
Thanks so much for doing these!
@dev-worm
@dev-worm 9 месяцев назад
I'm so glad that I am able to help! Thanks for watching!
@fiskvik
@fiskvik 7 месяцев назад
could you release the script files somewhere so we can read through them?
@abdullaharraayid19
@abdullaharraayid19 8 месяцев назад
it work for me, thank you, finaly i found the good one that i can easy to understand
@dev-worm
@dev-worm 8 месяцев назад
Glad it helped
@balderkjs
@balderkjs 5 месяцев назад
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.
@Solace243
@Solace243 3 месяца назад
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.
@dev-worm
@dev-worm 3 месяца назад
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
@trouble6043
@trouble6043 10 месяцев назад
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! ❤
@Kamari333
@Kamari333 3 месяца назад
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
@HippocritterXD
@HippocritterXD 10 месяцев назад
Ow boy I can't wait to start this one tonight 😊
@legm8034
@legm8034 7 месяцев назад
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
@SOSmysteries
@SOSmysteries 9 месяцев назад
Great stuff, thanks
@A1SD1
@A1SD1 7 месяцев назад
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??
@caitlin3091
@caitlin3091 3 месяца назад
Can you make a video explaining the AnimationTree node? Love your videos!
@Dapaa-h8v
@Dapaa-h8v 9 месяцев назад
continue please, very interesting, I appreciate it, I'm waiting for the continuation of the game👍🏻👍🏻👍🏻
@dev-worm
@dev-worm 9 месяцев назад
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!!
@Wiswaswes
@Wiswaswes 6 месяцев назад
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
@Chelsea.United.limits
@Chelsea.United.limits 7 месяцев назад
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
@Poronekton
@Poronekton 10 месяцев назад
Love the BL2 main menu music for like 5 sec at 20ish mins XD very funny
@raynelsonchan4406
@raynelsonchan4406 10 месяцев назад
my method for this is using a +=1, where the global script is true and then false once the stuff is interacted. If the object is 0 however (note that I'm setting player inventory as 0 to 3, and apple state to 3 to 0), if apple is 0, the player can no longer pick up any apple. idk if this is a good method or not, so please gove some tipz
@IsmaiilDev
@IsmaiilDev 10 месяцев назад
Continue 👍👍👍
@Darth_cam377
@Darth_cam377 4 месяца назад
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
@Ümitcan_Uygun06
@Ümitcan_Uygun06 7 месяцев назад
you are amazing bro
@dev-worm
@dev-worm 7 месяцев назад
thank you brother!!!
@MH-lr6ue
@MH-lr6ue 4 месяца назад
not too many issues with this one. my apple isnt perfectly centered but everything else works. thanks.
@ChubbyPuppyGeneral77
@ChubbyPuppyGeneral77 7 месяцев назад
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'.
@meltrop9580
@meltrop9580 4 месяца назад
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():
@cd2028
@cd2028 4 месяца назад
Thank yo!
@diogenesnascimento6433
@diogenesnascimento6433 9 дней назад
thanks man, now i feel dumb haha
@katiescape
@katiescape Месяц назад
I keep having an error with infinitley spawning apples, not sure why.
@adriilorenzo_
@adriilorenzo_ 4 месяца назад
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?
@CalamityIDK
@CalamityIDK 3 месяца назад
Did you make the timer one shot or did you not send the signal from the timer
@zcdace2204
@zcdace2204 28 дней назад
I'm kinda curious. Is it possible to just compile multiple collectables into one png? And if so how?
@Z0mbie432
@Z0mbie432 3 месяца назад
great vid thanks
@dev-worm
@dev-worm 3 месяца назад
thank you so much!
@duncanbrown2907
@duncanbrown2907 2 месяца назад
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.
@FosterFilms12
@FosterFilms12 Месяц назад
How would you type ou that print statement? I'm having trouble getting the player to register in the pickable area
@AyushKumar-cz8ds
@AyushKumar-cz8ds 5 месяцев назад
Can we add a cool down for when the apples spawn on the tress
@tomoyaokazaki2138
@tomoyaokazaki2138 3 месяца назад
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
@dev-worm 3 месяца назад
glad to hear!! thanks! if you need any help with the mining portion of your game then feel free to reach out!
@tomoyaokazaki2138
@tomoyaokazaki2138 3 месяца назад
@@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?
@Zahardnik3
@Zahardnik3 5 месяцев назад
Thanks!
@dev-worm
@dev-worm 5 месяцев назад
Zahardnik thank you!
@khushraswant2852
@khushraswant2852 6 дней назад
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
@dev-worm
@dev-worm 6 дней назад
yes you completely can!! i just did it this way to make the wait time controllable from the code!! but either way works perfect!
@ragnarok3888
@ragnarok3888 3 месяца назад
Umm my apple tree doesn't spawn apples at all i followed all you said, can somebody pls offer advice
@ayaicaz
@ayaicaz Месяц назад
I cant move the trees, I did everything like you showed but I cant still move them.
@successspotu
@successspotu 10 месяцев назад
Nice video i thought you reupload deleted video sound track management
@ArsoodDev
@ArsoodDev 9 месяцев назад
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
@Timetrill
@Timetrill 10 дней назад
If you click it multiple times before queue_free() is signaled (while animation is playing) it will collect multiple times
@mikoajkowalczyk2244
@mikoajkowalczyk2244 24 дня назад
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
@user-eu2gr7ky8f
@user-eu2gr7ky8f 9 месяцев назад
BTW can u also tell how to make this into a mobile game movement or smth like that
@TheStapluh
@TheStapluh 8 месяцев назад
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?
@shini547
@shini547 8 месяцев назад
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 😅
@Icygamesense
@Icygamesense 8 месяцев назад
had the same issue and this fixed it, thanks! @@shini547
@GenTink
@GenTink 7 месяцев назад
@@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.
@thibaultjp5550
@thibaultjp5550 6 месяцев назад
Same issue.. global_position need to be 52,54 and she's 105, 86.. I don't understand :)
@MD-yd8lh
@MD-yd8lh 4 месяца назад
Based tutorial
@p1ayer248
@p1ayer248 6 месяцев назад
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?
@AdamAlshrouf-sy3ss
@AdamAlshrouf-sy3ss 6 месяцев назад
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()
@GrilledCheeseSandwich1
@GrilledCheeseSandwich1 3 месяца назад
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.
@jh-oy8pr
@jh-oy8pr 9 месяцев назад
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
@dev-worm
@dev-worm 9 месяцев назад
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
@jh-oy8pr
@jh-oy8pr 9 месяцев назад
@@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
@jh-oy8pr
@jh-oy8pr 9 месяцев назад
@@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
@russ556
@russ556 9 месяцев назад
Thanks bro
@dev-worm
@dev-worm 9 месяцев назад
anytime brother, So glad I could help!
@swagsonville9675
@swagsonville9675 8 месяцев назад
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
@leonrayamarison742
@leonrayamarison742 7 месяцев назад
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
@kagttanay6310
@kagttanay6310 7 месяцев назад
@@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
@Automageddon
@Automageddon 7 месяцев назад
@@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
@MilkyWayHeroz
@MilkyWayHeroz 7 месяцев назад
i fixed this problem by changing var state = "no apples" to var state = "apples" up at the top of the script
@saucystruggles2629
@saucystruggles2629 6 месяцев назад
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
@SoSlendder
@SoSlendder 8 месяцев назад
the location of where the apple falls relative to the tree is completely off and im very new to this any suggestion
@TheStapluh
@TheStapluh 8 месяцев назад
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
@shini547
@shini547 8 месяцев назад
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 😅
@scotmcpherson
@scotmcpherson 9 месяцев назад
Great, job....just FYI instantiate is pronounced.....in-stan-shee-ate 👍
@hussain_abdullah
@hussain_abdullah 9 месяцев назад
Great,I love you man
@jeremiahaemile2008
@jeremiahaemile2008 9 месяцев назад
حسين ده اخر حاجة كنت اتوقعه في حياتي ❓❓
@hussain_abdullah
@hussain_abdullah 9 месяцев назад
@@jeremiahaemile2008 كنت اقصد الي كتبتة بطريقة نضيفة👀 مو الي ممكن تكون ببالك
@jeremiahaemile2008
@jeremiahaemile2008 9 месяцев назад
​@@hussain_abdullahانت فهمتني غلط خالص اخر حاجة كنت اتقوقعه انك هنا مش كلمه تحبه في الله مش قصدي كدا
@hussain_abdullah
@hussain_abdullah 9 месяцев назад
@@jeremiahaemile2008 لا ياخي تحصلني بكل مكان
@jeremiahaemile2008
@jeremiahaemile2008 9 месяцев назад
@@hussain_abdullah عشان انت مشهور وكدا وبنصدم من انك ببتفرج الاحنا بنتفرجه بنفرح لما نلاقي يوتيوبر الاحنا بنتفرجه عليه ببتفرج علي احنا بنتفرج عليه فبنحس بفرحه لو عاوز تخلص من موضوع ده اتفرج فيديوهات بحسابك خاص
@DylanDev14
@DylanDev14 7 месяцев назад
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').
@DylanDev14
@DylanDev14 7 месяцев назад
nevermind I fixed it, this is why I love game dev :)
@dev-worm
@dev-worm 7 месяцев назад
its the best feeling ever when you figure it out lol
@Shawn-cq7qy
@Shawn-cq7qy 9 месяцев назад
Can you make 3d grappling hook for Godot 4
@relaxedmakuhita2478
@relaxedmakuhita2478 6 месяцев назад
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
@relaxedmakuhita2478
@relaxedmakuhita2478 6 месяцев назад
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
@brianmarkowitz
@brianmarkowitz 5 месяцев назад
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.
@kingdaniel9624
@kingdaniel9624 5 месяцев назад
​​​@@brianmarkowitz In the player's movements script you must add the func player():
@voc007
@voc007 5 месяцев назад
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....
@arthurwiebusch9292
@arthurwiebusch9292 7 месяцев назад
nice
@Beefyjesus0
@Beefyjesus0 Месяц назад
having an issue with the apple showing up far to the left. has anything changed with global position or with Marker2D?
@dev-worm
@dev-worm 29 дней назад
check the offset on the marker2d and on the tree!!
@Beefyjesus0
@Beefyjesus0 29 дней назад
@@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
@Beefyjesus0
@Beefyjesus0 28 дней назад
just in case it happens to anyone else, the offset for my main world got moved somehow and thats what was the issue.
@eliseCosbon
@eliseCosbon 8 месяцев назад
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
@eliseCosbon
@eliseCosbon 8 месяцев назад
oh, it can sense the player entering and exiting, now i do not know the problem hehe
@eliseCosbon
@eliseCosbon 8 месяцев назад
i fixed it, it is just a naming problem hehe
@dev-worm
@dev-worm 8 месяцев назад
glad you fixed it!! sorry i couldnt get back to you in time!
@williambgood9265
@williambgood9265 6 месяцев назад
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.
@bobby6828
@bobby6828 6 месяцев назад
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)
@alexmcgreal836
@alexmcgreal836 5 месяцев назад
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 👍
@FarhanAkbarnezhad-hu5gq
@FarhanAkbarnezhad-hu5gq 3 месяца назад
what is has_method("player")?
@dev-worm
@dev-worm 3 месяца назад
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
@khenardfiguracion3697
@khenardfiguracion3697 10 дней назад
please help! I cant proceed because when i press E on my keyboard, the apple is not picked. HELLPP
@dev-worm
@dev-worm 9 дней назад
did you create the "e" input in the input map?? within the project settings?
@DrW1ne
@DrW1ne 10 месяцев назад
I suggest making more tips videos, I miss them.
@dev-worm
@dev-worm 10 месяцев назад
working on one right now! next video will be a more of tip video!
@Quizerno
@Quizerno 6 месяцев назад
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.
@chriswooten8032
@chriswooten8032 8 месяцев назад
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.
@NeoSmooth
@NeoSmooth 7 дней назад
same
@NeoSmooth
@NeoSmooth 7 дней назад
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
@mylainedejean4951
@mylainedejean4951 4 месяца назад
Is this the same for a chest? Open, drop item and fade.
@dev-worm
@dev-worm 4 месяца назад
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
@mylainedejean4951
@mylainedejean4951 4 месяца назад
@@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.
@jeremiahaemile2008
@jeremiahaemile2008 10 месяцев назад
You level in montag is upgrade ❤❤
@kristisnoobpw5767
@kristisnoobpw5767 9 месяцев назад
where are the other videos of this series? why u stopped uploading
@dev-worm
@dev-worm 9 месяцев назад
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!
@kristisnoobpw5767
@kristisnoobpw5767 9 месяцев назад
@@dev-wormthank you for the answer! I just saw that the 4th video is already uploaded!
@FurBohen
@FurBohen 7 месяцев назад
Hey weird bug with tree's growing back apples, they should in theory grow back in order of picked, anyone else noticed this?
@inyoke1241
@inyoke1241 9 месяцев назад
cant wait 🥵
@dev-worm
@dev-worm 9 месяцев назад
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!
@Ryxbar
@Ryxbar 4 месяца назад
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
@dev-worm 4 месяца назад
ahh sorry about that lol!! if you arnt understanding then please feel free to reach out!
@Ryxbar
@Ryxbar 4 месяца назад
@@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
@Andy-jd2un
@Andy-jd2un 7 месяцев назад
20:48 *Smooth jazz intensifies*
@jackygreenhow9889
@jackygreenhow9889 4 месяца назад
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
@dev-worm 4 месяца назад
glad you've figured it out now!! but that must've been so annoying for something so small to be the issue
@jackygreenhow9889
@jackygreenhow9889 4 месяца назад
@@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.
@longuemire748
@longuemire748 7 месяцев назад
Thank you Why use a "player" function rather than a "player" group?
@dev-worm
@dev-worm 7 месяцев назад
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!
@scoobytalks4189
@scoobytalks4189 5 месяцев назад
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.
@dev-worm
@dev-worm 5 месяцев назад
hmm.. thats weird.. something must be connect somewhere. not sure tho unless im able to look at it!!
@NeoSmooth
@NeoSmooth 7 дней назад
@@dev-worm solution for this?
@NeoSmooth
@NeoSmooth 7 дней назад
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
@Necrincito
@Necrincito 2 месяца назад
tree felling and harvesting tutorial (terraria style, StardewValley) please 😕
@dev-worm
@dev-worm 2 месяца назад
Ill look into it soon!! thanks for reaching out!!
@123chicken88
@123chicken88 6 месяцев назад
can someone help me and put they code to the reply's plz
@AdamAlshrouf-sy3ss
@AdamAlshrouf-sy3ss 6 месяцев назад
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()
@ManaTrooo
@ManaTrooo 9 месяцев назад
badly need an inventory vid, i did one but it worked so badly :(
@dev-worm
@dev-worm 9 месяцев назад
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!
@ManaTrooo
@ManaTrooo 9 месяцев назад
@@dev-worm I am excited!
@FuzzballStudios
@FuzzballStudios 10 месяцев назад
The “t” is silent.
@jeremiahaemile2008
@jeremiahaemile2008 10 месяцев назад
Of what word
@Computer-instructor
@Computer-instructor 4 месяца назад
Hi
@dev-worm
@dev-worm 4 месяца назад
hello!!
@khaledmoussa2668
@khaledmoussa2668 10 дней назад
did he just mispronounce "instantiate"?
@RandomGuyOnDaFreakingNet
@RandomGuyOnDaFreakingNet 10 месяцев назад
hi
@dev-worm
@dev-worm 10 месяцев назад
hello!
@Enginor
@Enginor 5 месяцев назад
20:48 :D
@FosterFilms12
@FosterFilms12 Месяц назад
I'm having trouble getting the pickable area to register the player. I'm able to pick all of the trees at once if I set "player_in_area = true", but not if I'm trying to use the collisionShape to sense the player. I've made to sure add func player(): pass to the player script. Is there anyway I could debug this? heres what I've got as well. extends Node2D var state = "no apples" # no apples, apples var player_in_area = false func _ready(): if state == "no apples": $growth_timer.start() func _process(delta): if state == "no apples": $AnimatedSprite2D.play("no apples") if state == "apples": $AnimatedSprite2D.play("apples") if player_in_area: if Input.is_action_just_pressed("use"): state = "no apples" $growth_timer.start() func _on_pickable_area_body_entered(body): if body.has_method("player"): player_in_area = true func _on_pickable_area_body_exited(body): if body.has_method("player"): player_in_area = false func _on_growth_timer_timeout(): if state == "no apples": state = "apples"
@microwire007
@microwire007 9 месяцев назад
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.
@jeremiahaemile2008
@jeremiahaemile2008 9 месяцев назад
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
@dev-worm
@dev-worm 9 месяцев назад
@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.
@microwire007
@microwire007 9 месяцев назад
@@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!
@AMINEI-wl9rk
@AMINEI-wl9rk 3 дня назад
extends Node2D var state = "no_apples" var player_in_area = false func _ready(): if state == "no_apples": $growth_timer.start() func _process(delta): if state == "no_apples": $AnimatedSprite2D.play("no_apples") if state == "apples": $AnimatedSprite2D.play("apples") if player_in_area: if Input.is_action_just_pressed("e"): state = "no_apples" $growth_timer.start() func _on_pickable_area_body_entered(body): if body.has_method("player"): player_in_area = true func _on_pickable_area_body_exited(body): if body.has_method("player"): player_in_area = false func _on_growth_timer_timeout(): if state == "no_apples": state = "apples"
Далее