So I’ve followed this youtube series https://www.youtube.com/playlist?list=PLmKKTERcjTPKEPl0nk48Tpmj-iWmzqo_Q on how to create a slot based inventory. I’ve gotten fully setup up and now am going in and tweaking stuff. First thing am adjusting is the obtained item message. Am trying to make it like stardew valleys obtain messages. Where it just shows all the item’s you’ve picked up at once instead of going through a queue. I haven’t been able to figure out how to do this. Anyone got any idea’s on how to do that?
Unfamiliar with this particular game’s item collection system.
Where it just shows all the item’s
you’ve picked up at once instead of
going through a queue.
Could you post a screenshot of how you want the items displayed? A grid layout?
Okay this is what am talking about Example - YouTube notice how when you pick up an item it shows the widget instantly. Also when you pick up and different item it creates another widget on top of the old one. Now in my case I would need it to grow down instead of up since my item obtain box in the upper right comer instead of bottom left.
Try using particles.
If it is a rock, have gravity and collision.
If it is wheat, have it rise to the air.
I really like that idea I think I’ll that thanks!
Here’s how you can do it with simple widgets:
This creates crops to interact with and binds a dispatcher to an Event in the Level which, in turn, notifies the Player that a Crop was clicked, sending just the crop’s image (you can send more data, of course)
When the character receives notification, they create a widget at their own position (you can use crop’s position instead), pass on the image of the picked up crop, and add it to the viewport.
The widget is just a single image and an exposed 2d Texture variable, no canvas or anything else. The widget does have an animation that kicks in as soon as it is created. The animation shifts the image in Y (the direction is up to you) and animates the opacity to 0, all of it over 1s.
As soon as the animation is over, the widget removes itself.
The above should be using OnAnimationFinished but it also works fine with Started in this case. Widgets are weird.
It looks like this on my end:
This setup does not include picking up several items at a time but that’s quite straightforward to handle. Let me know if it gives you grief, though.
You can make the player responsible for picking things up rather than the Crops responding:
In this case, player character has an overlapping collision sphere at their feet, it filters for actors, adds them to an array and removes 1 every .2s, creating widgets to visualise the removal. The rest stays the same.
Hope it helps. Good luck with the rest.
Dude this is perfect thank you