playMaker

Author Topic: Autoswap a 'Global transition event' from one state to another  (Read 105 times)

Broken Stylus

  • Hero Member
  • *****
  • Posts: 566
    • View Profile
Autoswap a 'Global transition event' from one state to another
« on: February 21, 2021, 06:07:07 AM »
The black rectangle that floats above a state, this GTE, there shall only be one...

Therefore, if one state has a given GTE (say "Attack") but the user adds the same GTE to another state (not by mistake but by will), Playmaker should automatically remove the old one so there's only one instance of that entering GTE, on the latest modified state.

It's a weird thing that this oddity is still present in Playmaker today in fact.

Let's just have an autoswap function to avoid illogical and useless duplicates of the same GTE inside a single FSM.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 5805
    • View Profile
    • jinxtergames
Re: Autoswap a 'Global transition event' from one state to another
« Reply #1 on: February 21, 2021, 06:21:16 AM »
Hi.
I agree, multiple global variables of the same name should not be 'allowed' as it gives conflicts.
I do think that it should give a warning when changing, which you can optionally disable in the preference.
The warning is good for newer users.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3776
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Autoswap a 'Global transition event' from one state to another
« Reply #2 on: February 23, 2021, 08:24:38 PM »
I agree, this should be a warning and/or a prompt to remove the old transition.

Broken Stylus

  • Hero Member
  • *****
  • Posts: 566
    • View Profile
Re: Autoswap a 'Global transition event' from one state to another
« Reply #3 on: February 25, 2021, 08:34:18 AM »
Could there also be a way to disable each prompt? At this level of work on PM I now find the prompt to be annoying.
Would be good if in the prompt window there was this "do not warn me again" little box to check that would correspond to the respective option somewhere in the PM Preferences.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 5805
    • View Profile
    • jinxtergames
Re: Autoswap a 'Global transition event' from one state to another
« Reply #4 on: February 25, 2021, 10:35:01 AM »
Hi.
The thing is that you can easily accidentally click that check box :)

You would have to check/uncheck only once in the preferences so not to much work to do this :)

Broken Stylus

  • Hero Member
  • *****
  • Posts: 566
    • View Profile
Re: Autoswap a 'Global transition event' from one state to another
« Reply #5 on: February 25, 2021, 03:59:00 PM »
Hi.
The thing is that you can easily accidentally click that check box :)

Perhaps, it depends on where it rests in regard to the two main buttons. The box would be small, contrary to the two main buttons, and would not act as a button itself. IOW, pressing "yeah, don't piss me off again with that prompt" would not close the prompt because you would still need to validate the option with Yes/No to the prompt about swapping the Global Transition Event.

Quote
You would have to check/uncheck only once in the preferences so not to much work to do this :)

Yes, the Preferences should definitely have this option, regardless of it being displayed in the prompt or not.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3776
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Autoswap a 'Global transition event' from one state to another
« Reply #6 on: February 26, 2021, 01:35:22 AM »
All error checks can be individually enabled/disabled in Preferences > Error Checking.

Newer versions of Unity have a Dialog with opt out options that I'm going to start using for some dialogs. I'll definitely use it for anything that pops up often!