playMaker

Author Topic: Event not used by this state or any global transition error  (Read 1294 times)

Leandro.Gil

  • Playmaker Newbie
  • *
  • Posts: 1
Hi,
I created a custom action to launch an event on a singleton receiving as parameter a FsmEvent but this shows "Event not used by this state or any global transition!" error in the editor, I tried to override ErrorCheck but the error is still there

Basically is this same error: http://hutonggames.com/playmakerforum/index.php?topic=2952.0 but the post is 5 years old and flagged as solved and I see no solution (Only a workaround that would like to avoid) also an admin said:
"That error is indeed a false positive. I'll add a NoErrorCheck attribute for such cases" but found no documentation on said attribute.

Thanks in advance!

Code: [Select]
    public class TestAction : FsmStateAction {

        [RequiredField]
        public FsmEvent paramEvent;

        public override void Reset() {
            paramEvent = null;
        }

        public override void OnEnter() {
            TestSingleton.instance.LaunchEvent(paramEvent);
            Finish();
        }
        public override string ErrorCheck() {
            return null;
        }
    }

Wolfride

  • Playmaker Newbie
  • *
  • Posts: 11
Re: Event not used by this state or any global transition error
« Reply #1 on: May 20, 2018, 06:57:53 PM »
This might seem too obvious but sometimes those errors appear in non custom things when trying to do global transitions. Have you tried opening a new scene and giving it another shot, or make a new game object set and try connecting it again?

Make the event you plan to make global and THEN try to connect it, see if that helps.

Sorry it's not great help, I'm just a customer. lol But say I set up a global transition for awsd; I've had the error fire on D while the rest were fine, as example.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Event not used by this state or any global transition error
« Reply #2 on: May 21, 2018, 11:22:57 AM »
I'll take another look at adding a NoErrorCheck attribute in the next update... I think it just got prioritized lower than other fixes/features...