playMaker

Author Topic: [Solved] PlayMaker Send Event to another GameObject  (Read 6890 times)

AizenSousuke

  • Playmaker Newbie
  • *
  • Posts: 10
[Solved] PlayMaker Send Event to another GameObject
« on: September 10, 2014, 09:28:51 AM »
Hi

I'm trying to send a global event to another FSM in another GameObject in the scene through a FSM in another object. I.e, from menu button to a controller.

I did it like the attached picture below using send event by name to a game object but the action won't send the event. Anything I'm doing wrong?

I've tried sending to gameobject FSM and FSM component but it doesn't work.

I did try broadcast all but I just want it to affect the controller gameobject and not other things in the future... that's why I want it just to pin point to the selected gameobject only.
« Last Edit: September 12, 2014, 04:02:47 AM by AizenSousuke »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: PlayMaker Send Event to another GameObject
« Reply #1 on: September 10, 2014, 09:41:08 AM »
Are you sure the FSM and Event are typed correctly in the action?

Does the controller object have that event transition in its current state or set as a global event on a different state?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: PlayMaker Send Event to another GameObject
« Reply #2 on: September 10, 2014, 11:09:43 AM »
I had a similar problem (http://hutonggames.com/playmakerforum/index.php?topic=7682.0) with doing things to a global gameobject's specific FSM, so you could be encountering something similar.

If I'm dealing with prefabs that aren't always in the same scene, I usually use a broadcast all and make my event unique.

Have you checked during runtime that your global gameobject variable isn't losing your gameobject?

Also, another problem I've encountered in the past;  When copy & pasting an action, even if the FSM listed is the right name, unless you select it again on the dropdown, then it doesn't find the target FSM. It really should blank the FSM target if the gameobject target has changed, but it doesn't for me, and this has lead to hours of trying to track down a problem that visually looks ok on the FSM.

AizenSousuke

  • Playmaker Newbie
  • *
  • Posts: 10
Re: PlayMaker Send Event to another GameObject
« Reply #3 on: September 11, 2014, 07:54:57 AM »
Ah... I got it...

When I run the scene my gameobject variable is linked to the prefab but when I added another option to find the gameobject (because playmaker won't let me use scene objects to set in global var) the gameobject variable links to the object in the scene.