Usable Items
Jan 1 2020Today, we kept up our New Year’s tradition of going to aquariums by going to see the manatees down by the TECO Electric Plant’s “Manatee Observation Area” (which is run in conjunction with the Tampa Aquarium so it totally counts). Wild manatees are drawn to the warm (clean) water the plant puts out, and so a small exhibit was built around it to allow the public to see them without interfering, and proceeds from the operation go to further help them manatees. Overall, a cool trip.
I added the ability to use inventory items; once clicked, the item follows your mouse, and the next click is “using” the item - either on something, or simply dismissing it. Again favoring simple interfaces, it takes one click to “grab” the item, then the next click does something with it (or “un-grabs” it if nothing was clicked). I also found out how to actually use dictionaries in Godot, which is good/bad; on the good side, they exist and work as expected (mostly), but on the bad side editing them in-editor is a huge pain. I think I can struggle through it for this project, but if I were to expand this to a larger game I’d have to find a better way of doing this. Anyway, that works well enough for now, and Clickables can respond differently when items are “used on” them. The final piece is triggering some outcome when an item is used on the right object, and tracking global state. Then we’ll have a game!