playMaker

Author Topic: Trigger Events on other Gameobjects  (Read 8955 times)

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Trigger Events on other Gameobjects
« on: July 06, 2011, 03:40:01 PM »
Hey all, I have a project where I'm controlling a character from the third person.  Some mechanics I integrated to the game ended up requiring me to deactivate my character at some points in order to work in the manner I want it to.

Currently I have my player control FSM attached to the player object, so I can't deactivate it without wierdness.  My solution for this is to move the player control FSM to another game object, so I can safely deactivate and reactivate the player when needed.  

The issue I have now is that the Trigger Event action, which I use frequently, is only set up to monitor the trigger events for the object it's currently on, and the object I created as a "system player manager" is just an empty game object used for holding the control FSMs for the game.  

Is there any way to create a Trigger Event Action for PlayMaker that can target another gameobject, so I can simply point it at the player object that has the rigidbody, and which interacts with triggers?  

Thanks for any help!

--

Additional thoughts - I considered leaving the Trigger Events on the player object and having them flip a bool on my player control object.  Then I'd bool test on the player control object every frame to see when the player triggered an event.  I was concerned this might not be efficient though, so if anyone can speak to that it might help a help.  If it's not going to be a perf hit of any kind I could go that route and problem solved!
« Last Edit: July 06, 2011, 04:02:10 PM by artician »

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Re: Trigger Events on other Gameobjects
« Reply #1 on: July 07, 2011, 03:47:51 PM »
I was going to bump this, but it's still at the top of the page!  ;)  What happened to this forum??

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Trigger Events on other Gameobjects
« Reply #2 on: July 07, 2011, 04:08:40 PM »
I would keep an FSM on the trigger object and have that send events to other FSMs as needed with Send Event To FSM (or Send Event in 1.2). It basically just forwards the events to FSMs that need to know about them...

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Re: Trigger Events on other Gameobjects
« Reply #3 on: July 07, 2011, 04:10:43 PM »
Thank you sir.  I was mostly concerned with performance, being a non-programmer I am just being as cautious as possible.

I'm curious to know why you can't target another gameobject to monitor for a trigger event. 
Does Send Event replace Send Event to FSM in 1.2?  
When will 1.2 release?

Thanks for the reply.

« Last Edit: July 07, 2011, 04:21:00 PM by artician »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Trigger Events on other Gameobjects
« Reply #4 on: July 07, 2011, 04:24:52 PM »
In 1.2 Send Event replaces Broadcast Event and Send Event To FSM. Send Event now has an an option for the target (Self, Broadcast, etc.) and you always select events from popups - no more typing event names! This avoids typos and makes it a lot easier to refactor event names across a project. And performance is better too!

1.2 will be released after the unity 3.4 update. There are a couple of features in 3.4 used in the 1.2 update.

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: Trigger Events on other Gameobjects
« Reply #5 on: July 18, 2011, 02:44:01 PM »
I am trying to use a Broadcast Event right now... And it works if i have the Playmaker editor screen active but not if i dont...

What is up with that?

I understand that the actions will be changing with the new release but this seems to be a bug maybe?

Q

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: Trigger Events on other Gameobjects
« Reply #6 on: July 18, 2011, 03:25:46 PM »
Now if i start the project not on the playMaker editor window it does not work... if i move onto it then it starts working.. If i move off it again it keeps working??

Q

MakerPlay

  • Playmaker Newbie
  • *
  • Posts: 19
Re: Trigger Events on other Gameobjects
« Reply #7 on: June 30, 2017, 09:14:11 AM »
I have to say, it is a very important function to have something on board, to change the target object. Especially on the trigger event. Because i want to have a nice structure in my Program stack. Otherwise i have to search it in my 2000 Objects in the hierarchy where my trigger FSM is on.

So, please someone add a function to the trigger event, where i can put my desired target object.
« Last Edit: June 30, 2017, 09:16:32 AM by MakerPlay »