playMaker

Author Topic: non-global Global Events  (Read 4538 times)

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
non-global Global Events
« on: March 13, 2015, 06:26:29 PM »
A ways back in the lifetime of this tool it was changed so that any Events sent between FSMs had to be Global.  Recently a colleague discovered that Send Event By Name could still be used to send any Event from one FSM to another without it being marked as Global.  Have I been misunderstanding this whole time the use of these Actions and nature of Global Events, or what's going on here exactly?

redikann

  • Full Member
  • ***
  • Posts: 174
Re: non-global Global Events
« Reply #1 on: March 14, 2015, 12:05:57 PM »
There is a State machine Send Event which can actually pinpoint Game objects And FSM within in them and then send to a specific local event. So say you have a local event 'Jump' and you use it as a Global transition(appearing above the state) but it's not Global. Within that state it can act like a global but outside FSMs cant cause it to fire unless something like the Send Event is used.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: non-global Global Events
« Reply #2 on: March 14, 2015, 12:40:56 PM »
Global events are recognized in the editor, so you can connect them in actions from an intuitive dropdown, and the names are updated everywhere if you rename them.

Send by name does not have those advantages, but is always available. This is a common way of sending events from scripts.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Re: non-global Global Events
« Reply #3 on: March 15, 2015, 04:29:28 PM »
I may not have described my question well enough.

I understand how Send Event and related states work.  However the current functionality contradicts the documentation:
https://hutonggames.fogbugz.com/default.asp?W834

"NOTE: Events must be marked Global to send between FSMs."

Currently it's possible to send non-global events between FSMs via Send Event By Name.  So what happened?  Is the documentation wrong?  Did the Send Event restrictions change? 

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: non-global Global Events
« Reply #4 on: March 15, 2015, 04:32:30 PM »
Maybe it's just unclear, but you do need to set them to global for them to be used in that manner. Otherwise you must fire them by name.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Re: non-global Global Events
« Reply #5 on: March 15, 2015, 05:41:53 PM »
Maybe it's just unclear, but you do need to set them to global for them to be used in that manner. Otherwise you must fire them by name.

Could you elaborate on what's unclear to you?  I am sending non-global events between FSMs using Send Event By Action.  This is demonstrably operating in exactly the way the documentation is saying it should not. 

I've actually been using PlayMaker since 2011, so I remember when the Global Event limitation was implemented, (when global Events themselves were introduced), and this was not possible at the time. 

Either this is a bug with Send Event By Name, a unique function or caveat that is not properly documented, or something else.  I'm hoping Alex or Jean can shed some light on the intended functionality.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: non-global Global Events
« Reply #6 on: March 15, 2015, 09:16:53 PM »
The global flag is more of an organizational/UI thing. It lets the editor limit the events you see in selection menus based on the context. Otherwise you would have to select from all the events in your project when sending events between FSMs.

Quote
"NOTE: Events must be marked Global to send between FSMs."

This could be worded better. Events must be marked as global so you can select them when sending events between FSMs. But there's nothing technically limiting their delivery (e.g., if you use Send Event By Name).

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Re: non-global Global Events
« Reply #7 on: March 16, 2015, 08:09:02 PM »
Thanks Alex!