State Machine - Second Instance Not Firing

Get help using Construct 2

Post » Thu Dec 05, 2013 9:32 pm

Title is somewhat confusing, but I'm not sure how else to describe my situation.

I have a state machine that fires functions based on the states of objects. The dilemma is that the functions fire for the first time an object changes state, but not necessarily the second.



In the above image, the first object to have the activity "action" will cause the "ClosestEnemy" function to trigger. The return value is stored as ComputerTarget.

Once that first object is done (and its activity = "finished"), the game selects the next available computer object and has it run through the states. Everything works fine until the computer object has the state "action," in which case the "ClosestEnemy" function does not get called for the second object.

Does anyone have an idea as to why this might be?

The .capx is quite complicated, but the issues all concern the Computer Turn group.

BoardGame.capx
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,234

Post » Thu Dec 05, 2013 9:41 pm

I think you can simply add a "Pick all families computerprograms"

to

families computerprograms activity= "action"



lennaert2013-12-05 21:41:56
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Thu Dec 05, 2013 9:46 pm

If you're talking about this:



Adding that line doesn't work. I think it's redundant anyway.
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,234


Return to How do I....?

Who is online

Users browsing this forum: 25games, Artcadev, mcscooter, Soluna Software and 27 guests