playMaker

Author Topic: Single Transition to Multiple States?  (Read 3327 times)

memetic arts

  • Full Member
  • ***
  • Posts: 141
Single Transition to Multiple States?
« on: April 24, 2013, 11:45:31 PM »
Hi -

I'd posted this question earlier today, but yanked it almost immediately as I realized I could perform a workaround.  While that worked, the question is still nagging me, so I'm reposting just to satisfy my curiosity (and maybe learn a new trick).

Is it possible to wire a single Transition to multiple States?

I basically need a single event to simultaneously set multiple objects, where each object is set by executing the same pattern of five discrete actions. I'll spare you the details of why that is necessary, but in the end it just seemed cleaner and more maintainable to break it out this way rather than to cram twenty actions into a single state.

One option, I suppose, is to broadcast a message, but was wondering if I missed a simpler feature that would allow one to do it all through connectors rather than commands.

My workaround, btw, was to just run the states serially - the chain executes fast enough that the end result feels simultaneous anyway.

Thanks
« Last Edit: April 25, 2013, 12:52:11 AM by memetic arts »

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • Grinder Games
Re: Single Transition to Multiple States?
« Reply #1 on: April 25, 2013, 03:42:53 AM »
You can do that only with multiple FSM not in one FSM (as far as i know).
When i started with Playmaker this annoyed me a bit because i wanted to do all the stuff in one FSM. But when you are getting used to using multiple FSMs the concept works very well. The only thing im missing, would be a complete overview of all FSM inside Unity (something like a master flowchart)

I use "send event" all the time to communicate between the different FSM. You can have one template FSM (so you edit only one FSM for multiple objects) on multiple objects for small tasks and a manager FSM to do the main Gameplay. Then you send global events to each other. And use set/get FSM variables, so you dont need global vars.

I believe there are many more ways but thats how its working pretty well for me.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Single Transition to Multiple States?
« Reply #2 on: April 25, 2013, 07:19:23 AM »
I don't think you can do that.

I would just be using send event or broadcast to activate a state on the objects you want. You could likely use a template for it to save you the trouble of duplicating states and maintaining them separately.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

memetic arts

  • Full Member
  • ***
  • Posts: 141
Re: Single Transition to Multiple States?
« Reply #3 on: April 25, 2013, 09:46:49 AM »
Thank you both for the input, much appreciated.  The multiple FSM / templated approach makes perfect sense, probably just a matter of me needing to dive down a level deeper and expanding my comfort zone.  I just wanted to make sure I wasn't missing an undocumented trick for wiring things together.

Thanks again.