Handling the different states of items #189
Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
-
I would probably take a similar approach you suggested. Extending func get_mesh() -> Mesh:
var mesh_path = get_property("mesh")
if (mesh_path != null) && ResourceLoader.exists(mesh_path):
var mesh = load(mesh_path)
if mesh is Mesh:
return mesh
return null Unfortunately, the problem you noticed:
is yet to be solved. Ideally, the user would be able to assign resources (i.e. resource IDs) to a property and the protoset editor would come with a resource picker of some sort, but that still has to be implemented. Currently the only way to address a resource in a protoset is using strings (same as with the |
Beta Was this translation helpful? Give feedback.
-
First off, I really appreciate this system as a base. I implemented it a couple of weeks ago and have a system I am happy with for adding items to inventories (from interactables like trees, rocks, etc) and equipping items through item slots. What I am attempting to implement now is for items to exist in different states in the 3d world. The two best examples are items on the ground to be picked up and equipping an item and it showing a mesh in 3d.
Right now I have an inventory slots that I have override the can_hold method so only a helmet can go in the helmet slot etc. What would you recommend is the best way to link (through properties or whatever) certain items equipped to my premade scenes and show them on my character when that item slot has the item. I know this is outside of the scope of your system, but wanted to hear anyone's thoughts for interfacing with the GLOOT system and representing them in 3d.
Beta Was this translation helpful? Give feedback.
All reactions