0 votes

Hi all, https://godotengine.org/qa/user/njamster has helped me a lot during my project. Hope this will be another one.

Have tried but I get error. Non-static function can not be found in the script.

func _input(event):
    if Input.is_action_just_pressed("ui_c"):
        if name == "Camera":
            if number < dict.size():
                number += 1

                get_node("LabelForValues").text = "Camera" + String(number)
#               get_node("/root/Node/CameraGimbal").target = get_node("/root/Node/Box").get_path()
                get_node("/root/Node/CameraGimbal").script = load(dict[number][1])
                get_node("/root/Node/CameraGimbal").target = get_viewport().get_node("Node/Player").get_path()
                Global_batch.camera_id += 1
                print("number ", number, " dict ", dict[number][1]," id : ", Global_batch.camera_id, " target ", get_node("/root/Node/CameraGimbal").target)
                get_node("/root/Node/CameraGimbal").get_script().call("ready")
#               get_node("/root/Node/CameraGimbal").target = get_node("/root/Node/Player").get_path()

                return
            if number <= dict.size():
                number -= 1
                get_node("LabelForValues").text = "Camera" + String(number)
                get_node("/root/Node/CameraGimbal").script = load(dict[number][1])
                Global_batch.camera_id -= 1
                get_node("/root/Node/CameraGimbal").target = get_viewport().get_node("Node/Player").get_path()
                print("number ", number, " dict ", dict[number][1]," id : ", Global_batch.camera_id, " target ", get_node("/root/Node/CameraGimbal").target)

                return
asked May 5 in Engine by Okan Ozdemir (193 points)

I can not change the target node from the input level from another Node Skeleton

For each camera script? No, it will be a burden for the game

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.