TadeoOrtiz / visual-state-machine

MIT License
15 stars 0 forks source link

I want to add outputs.append(idle) to the on_air.gd script. says "Line 18:Identifier "idle" not declared in the current scope." #1

Open dilectiogames opened 2 weeks ago

dilectiogames commented 2 weeks ago

Godot 4.3

Describe the bug clean installation working on the demo no other changes I want to add outputs.append(idle) to the on_air.gd script. says "Line 18:Identifier "idle" not declared in the current scope."

To Reproduce clean installation working on the demo no other changes try to add outputs.append(idle) to the on_air.gd script. _init function

Expected behavior well don't know, to work like the other states? why it doesn't see this one in particular?

Additional context good start! hopefully this will expand in allowing to create states directly in the graph!

TadeoOrtiz commented 2 weeks ago

The scripts of the demo have been boomed, surely I touched something I shouldn't have and they were like this. To fix it you can go to the “player_state” script and add in the variables the idle output and then add it in the _init of the on_air state.

About creating states in the same editor, I was thinking how I could make a comfortable interface to edit the script, I am still learning how to make addons in Godot but I will give you all the best possible experience.