I’m trying to make a sign system for a game I’m working on that I want to function like the Pokémon games. I.e. you walk up to is and press a button and a gui pops up saying what the sign says.
This is the code that send the message to the .gui_script
function on_input(self, action_id, action)
if action_id == hash("action") and action.pressed then
if my_house_sign == 1 then
msg.post("/signs#my_house_sign", "enable-my_house_sign")
end
end
end
This is the code that I thought should make the gui visible
function on_message(self, message_id, message, sender)
if message_id == hash("enable-my_house_sign") then
gui.set_enabled("box", "true")
end
end
This is the .gui file
This is what the nodes look like when visible
this is the eror i get when i try this
ERROR:SCRIPT: assets/sign/sign.gui_script:11: bad argument #1 to 'set_visible' (NodeProxy expected, got string)
Both nodes are enabled but not visible
I’ve read through the gui manual but I just cant wrap my head around it.
If you need to know anything else just let me know.
Any help will be greatly appreciated. Thanks