Early Morning Inventory Interactions
Dec 31 2019I’ve been a bit sick this whole time, and woke up in a coughing fit at around 5:30. After fighting being awake for a while, I finally got up and found everyone else asleep (except Sara who I’d awoken). Sounds like a great time for more Inventory work!
I redid the InventoryItem class as a scene so that it can have all of
the nodes laid out without having to create them manually; Godot’s
ability to use scenes both as rooms and as individual objects within
rooms is super powerful. I moved the existing logic into a new script,
added a new function to create the objects from the scene, and now I’m
getting click events on my InventoryItems. I only need two more things:
to make the item follow the mouse until your next click (to use the
item), and to figure out how to map “item_id: resulting text” on
Clickables so that items can be used on them (I expected this to be an
export(Map, String, String) var responses
kindof thing, but it’s not
clear if Godot lets you do that.