What is the reason why you would use a global event within an action or a state? Isn't the entire purpose of using global events that they are used as global transitions?
Because a long time ago, I was told about a function in Playmaker that wasn't explained in the documentation.
I had a case of a FSM where a global event would interrupt the current flow within that FSM and reroute it to the state this global even pointed at.
A global event carries some kind of "super authority" that precedes that of local events. It just doesn't care what is going in a FSM. If a FSM has a way to receive that global event's "call", it will and that's final.
But it was problematic because I needed that global event to be received only under specific conditions without having to create parallel duplicate FSMs on the same object or use the disgraceful "MoveTo" action.
It turned out that if a global event was actually used as an
exit transition (placed under the state) instead of an entry one (placed above the state, in the black box), it could precisely do that, be received, but
only if that very state was active.
I have a whole game built exploiting this feature, but now it reports an error because it seems to have been completely deprecated.
Having said this, I'm still on 1.9.5.f3 so need to update first to really understand the scope of it. I actually didn't even know there was a new version out there.
1.9.6.f1 isn't even listed on the release notes!
What the hell did the package manager download?
The manager shows this:
1.9.6 (Current) - released on December 18, 2022
As for the notes, it reads:
Version 1.9.5.f3
Added State Transition Hidden By Global Transition Error Check.
Added Duplicate Global Transitions Error Check.
;_;
If I move back to 1.9.4, these issues will go away. I don't even know if these errors are
critical.
P.S.: I have also observed that another type of error, "Duplicate Transition Events", will be fired up by empty black boxes, now that I have migrated the project to this version of Playmaker. These boxes used to host global events but as I modified my FSMs I wasn't sure if I completely wanted to remove them so I merely deleted the events they held (clear transition event), leaving the empty boxes with the three dots as a reminder that there was a global event there. I never went back to delete them entirely.
But to my surprise, I just discovered that these black boxes weren't so empty because they trigger duplicate event errors despite being empty as far as I can tell! In other words, the Graph View tells you it's empty, but Playmaker retains the ID of the last global event that occupied that spot. It runs a comparison and error checking by looking at a piece of data which, for all intents and purposes, was assumed to be deleted by the user (me).