playMaker

Author Topic: Broadcast Event Problems [SOLVED]  (Read 6029 times)

Boxman

  • Playmaker Newbie
  • *
  • Posts: 3
Broadcast Event Problems [SOLVED]
« on: October 23, 2011, 04:38:29 AM »
Hey Guys,

When I try to broadcast an event to every FSM in the level I'm finding i get errors that kill performance.

Here is what unity outputs:

"NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMaker.FsmState.OnEnter ()
HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state)
HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState)
HutongGames.PlayMaker.Fsm.DoTransition (HutongGames.PlayMaker.FsmTransition transition, Boolean isGlobal)
HutongGames.PlayMaker.Fsm.ChangeState (System.String eventName)
HutongGames.PlayMaker.Fsm.Event (System.String fsmEventName)
HutongGames.PlayMaker.Actions.BroadcastEvent.BroadcastToAll () (at Assets/PlayMaker/Actions/BroadcastEvent.cs:60)"

And when i double click the error it highlights this line of code:

fsm.Event(broadcastEvent.Value);

Are there any issues with broadcasting events i should be aware of?

Is there a better way of destroying all instances of an object at once?



« Last Edit: November 05, 2011, 02:51:24 PM by alexchouls »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Broadcast Event Problems
« Reply #1 on: October 23, 2011, 04:44:02 AM »
Try using the new BroadcastAll target in the Send Event action (v1.2).

As of 1.2 the Broadcast Event action is obsolete...

Boxman

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Broadcast Event Problems
« Reply #2 on: October 23, 2011, 05:57:21 AM »
Ah ok, cool, thanks.

I thought i was up to date with the latest version but looks like I wasn't