0 votes

I made a file called test.gd in order to check if the assumed result was obtained,
"Script is not Tool, will not be able run:" will appear and will not be executed.
How do I run the script with "Run Script"?

in Engine by (48 points)

Have you tried adding the keyword tool to the top of the script?

thx.
...but, I understood that putting the keyword tool.
Specifically, how can I do?

Code:

func _ready():
    set_process(true)

func _process(delta):
    for i in range(5):
        print("i:%d" % [i])
        print("data.append(_array_init)")
        for j in range(5):
            print("j:%d" % [j])
            print("data[%d].append(_arrry_init)" % [i])

Though I would like to say thank you,
This time "Could not instance Script.
Did you Forget tool Keyword? "Has come out.
What should I do?
I think that tool was attached.
code:

tool
extends Node

var data = []

func _ready():
    for i in range(5):
        print("i:%d" % [i])
        print("data.append(_array_init)")
        for j in range(5):
            print("j:%d" % [j])
            print("data[%d].append(_arrry_init)" % [i])

Sorry, it is not clear to me what you're trying to do. Is this supposed be a command line run script, an instanced script from another script, a tool mode script for add-on?

Sorry.
Do Not Use To Add-on.

1 Answer

0 votes

A few years late, but I believe you were looking for how to use an EditorScript.

There is documentation now for it: https://docs.godotengine.org/en/stable/classes/class_editorscript.html

by (5,200 points)
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.
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 webmaster@godotengine.org with your username.