State Machine Plugin -v.91 - Beta[updated 2/17/20]

This forum is currently in read-only mode.
0 favourites
From the Asset Store
Best soundtracks for any game. High quality and engaging assets.
  • State Machine Plugin v.90 beta.

    Actions:

    ->Add State

    Params : State name. Starting State.

    Description: Adds a new state with the given name. State names are case sensitive so Lol is different from lol.

    -> Switch State

    Params: State Name.

    Description: Switches the named state IE lol is false lol will become true when the state is switched.

    Conditions

    ->State is True

    Params: State Name

    Description: Returns if the state is true. Invert the condition if you want to see if the state is false.

    -> On State Deactivated

    Params: State Name

    Description: Triggers when a state goes from True To False.

    -> On State Activated

    Params: State Name

    Description: Triggers when the state goes from False To True.

    -> On State Toggled

    Params: State Name

    Description: Triggers when the state toggles.

    v.91 up dates

    [add] - On State Toggle

    [add] - You can now set the default state value

    [change] - Now called state deactivated and activated.

    ___________________________________________________________________________________

    Planned additions :

    -> Set default state when you add a state. - done

    -> Make state Params case insensitive.

    -> In IDE addition of States.

    -> Adaptation to a behavior.

    -> On State Toggled. -done

    Any other suggestions or Ideas post here. Any bugs or problems post here as well.

    Get It Here

  • Excuse my ignorance, but could you explain what a 'State Machine' is? I've seen it mentioned before but never understood what it was and the advantages it brings to the table. Maybe an example *.cap will help?

  • There is an example cap included with the plugin files.

  • Have you thought about making the naming a bit more intuitive? I might go with "State is active" rather than "state is true", and "On state deactivated"/"On state activated" rather than the true-to-false terminology. Interesting idea for a plugin though!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I could change that nothing too hard to change. That is better terminology, I couldn't think of what to call those lol.

  • Excuse my ignorance, but could you explain what a 'State Machine' is? I've seen it mentioned before but never understood what it was and the advantages it brings to the table. Maybe an example *.cap will help?

    A state machine is a logical construct. It's basically a way to simplify handling an object by reducing it's flood of information down into one single "state" variable, that returns simple values like "walking" or "dying" so that you can interact with it it more easily.

  • Sweeeet

    damnit I wanted to do this one but I could never get the SDK to compile with VS9 Express =(

    Downloading

    Edit: Nice... but could it be a behavior instead? I think it'd be much more useful that way (for AI, for example, each instance having its own state). I have no idea how hard it would be to turn it into a behavior though

  • *yoink*

    I'll tell you alter how much I love you!

  • Sweeeet

    damnit I wanted to do this one but I could never get the SDK to compile with VS9 Express =(

    Downloading

    Edit: Nice... but could it be a behavior instead? I think it'd be much more useful that way (for AI, for example, each instance having its own state). I have no idea how hard it would be to turn it into a behavior though

    its not too bad. I will get around to it I have the basics there its just a matter of doing a few things in the SDK

  • Here are a couple terminology suggestions:

    • On State Entry (from False to True)
    • On State Exit (from True to False)

    Also, I believe that "Transition" is the term used for changing states, but I guess Switch works just as well.

  • I changed them to on state activated and on state deactivated for the next build.

  • This is so cool

    Thanks!

  • Plugin has been updated a bit. Im working on the adaptation to a behavior.

    Deadeye gave me the idea to have the option that when you set a state to true all other states are turned to false by default. this would be in addition to the normal changing state options. Do you guys agree or disagree?

  • If it is optional, sure. That'd work like a semaphore. However, when you have multiple state machines, say one for each "activity" - hunting, showering, mating etc. each has a set of states - you'll probably want it all neatly organized into sets or such

  • how would these sets of states work? could you tuen the entire set off. can you define this idea a bit better so I have a better vision of what you would like.

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