Just like the title says i'm trying to make the mesh disappear after a set value reaches zero. Current code is trying to simply turn the entity invisible so that later i can implement a resurrect function.

if Sname == get_node("Entity").get_name():
    print("punched number 1")
    selected.health = selected.health - 10
    if selected.health <= 0:
        selected.health = 0
        get_node("Control/Button").disabled = true
        $Entity.visable = false

Is it even possible to toggle that value or is there an easier way to do this? I dont want to use free_queue() as that would interfere with other entitys.

Thanks for the help in advance, im new to Godot so sorry if this ends up being a no brainer.


You should set $Entity.visible, not $Entity.visable.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.