This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
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
in Engine by (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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.