I want to execute the state of another object using the “Execute Specified Action” feature, but it is not working as expected.
To isolate the cause, I created a state that simply outputs text to the console, and I specified it in “Execute Specified Action,” but it is not being executed. (Nothing is displayed in the console, and the next state runs immediately.)
Are there any restrictions or limitations when setting “Execute Specified Action”?
I’ve been using the “Execute Specified Action” feature frequently in my project, and it’s working correctly so far. (I’ve been using it without any particular concern.)
Would it be possible to share the sample project from the screenshot you attached?
I added an initial state and set a link to it.
I tried setting the link conditions to “Unconditional” or “After a certain amount of time,” but the specified action is not being executed.
I have created a test project and attached it.
It is configured to execute the specified action when the Z key is pressed.
I would appreciate it if you could point out any issues.
Checked!
The “Execute specified action” feature is designed to execute the specified action of an object within the same game scene.
In this case, it seems the specified action wasn’t executed because specified_action.tscn did not exist in game_scene. Placing specified_action.tscn in game_scene made it work.
I also verified this on my end.
By placing the specified action.tscn in the game_scene, I confirmed that the idle state (the initial state of the specified action.tscn) runs when the game is executed.
However, what I actually want to run is the “specified action” state in the specified action.tscn.
When the Z key is pressed, “This is the specified action.” should be displayed in the console, but it is not being displayed.
As shown in the attached screenshot, it is also not being displayed there.