Action not executed with "Perform specified action"

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?

1 Like

It might be that the state transition doesn’t occur because there’s only one state, preventing execution.

How about this approach?

  1. Prepare an empty state and set it as the initial state.
  2. Configure the link so that the state you want to execute transitions to the empty state.

Does that work for you?

1 Like

Thank you for your response.

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.

ActionTest.zip (101.7 KB)

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.

1 Like

Thank you for checking.

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.

It seems the timing with SS was off, but it displayed correctly when I tried again.


For your reference, I’m sending you a working version.
Action_Test_2.zip (501.0 KB)

1 Like

Thank you for sending the project attachment.
I confirmed that it works. (The test project I opened also worked after I reset it.)

I will review the original project to ensure the target objects are placed in the same game scene.