State Machine - Second Instance Not Firing

0 favourites
  • 3 posts
From the Asset Store
State Machine
$10.99 USD
State Machine is a great tool for managing the state of anything in your game.
  • 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.

    <img src="http://i.imgur.com/uVetsh9.png" border="0">

    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

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

    to

    families computerprograms activity= "action"

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If you're talking about this:

    <img src="http://i.imgur.com/d1eNOzs.png" border="0" />

    Adding that line doesn't work. I think it's redundant anyway.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)