playMaker

Author Topic: Anim Events  (Read 2021 times)

SeanC

  • Junior Playmaker
  • **
  • Posts: 61
Anim Events
« on: July 28, 2012, 08:53:03 PM »
I just have a couple of questions regarding anim events.

1) Does the current "Send Event" function broadcast the event to all state machines on the game object? Is there a way to target a specific FSM?

2) Can anim events trigger FSMs that are not on the same game object? This seems like an absolute must. I realize you can send an event to the attached GO and have that broadcast an event, but it seems superfluous and besides, i prefer to use null objects to hold all my FSMs, leaving the models free to be exchanged if necessary.

Thanks!
Sean

Horror

  • Junior Playmaker
  • **
  • Posts: 79
Re: Anim Events
« Reply #1 on: July 29, 2012, 03:54:28 AM »
The send event can handle events in several ways.

If you set the Send Target to "Self" you are sending an event to any FSM on that object containing the event name you are sending.

If you set Send Target to "Game Object" then it will send to a specific Game Object and trigger all FSMs on that game object containing the event that you specify.

Setting Send Target to "Game Object FSM" will send an event to the game object that you specify with the FSM name that you specify. I think this is what you want.

Broadcast All will send to every game object in your scene and any game object with the event you sent will perform that action. I've never used FSMComponent before.

I think if you want your animation to trigger another game object you will have to setup your animation action to send a FINISH event to another node within your current FSM and then that node would contain a Send Event which will target your other game object.
« Last Edit: July 29, 2012, 03:56:23 AM by Horror »