+1 vote

So I got this NPC node and so far I've exported three script variables: Id, Act_type, and sequence.

enter image description here

Here's a bit of his code:

enter image description here

But I want to make the NPC a tool so that I can program in the ability to change his sprite in the editor with a new script variable, so I make him a tool through the code

enter image description here

But when I reload the program and check the NPC in the editor, the script variables are gone.

enter image description here

I need to have my NPC node to have script variables and also be a tool. What can I do? I don't know what's wrong.

asked Mar 7, 2019 in Engine by DoubleCakes (28 points)

So I figured out what the problem was. A script that this node inherited from was using an obsolete(?) get_pos() function and when tools have problems like that in the script, they probably won't function as tools and they definitely won't display their script variables.

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.