Trigger Nesting not working

To get around the absence of a property for the Area of Effect (AoE) trait, I made up a group of 4 traits to start the process (Toggle Range using ALT CTRL F), toggle the AoE off/on (togglerange) and a DP variable that stores the current state of the AoE (setrangeon/off) (Yes - on; No - off).
Trouble is it fails to work. If I delete the togglerangeoff trigger, the togglerangeon works and vice versa. Each of AoE toggles have a different set of KCs to perform and each have a different property match to check before ‘firing’. I added a text trait to a counter to display the range that AoE should use and the state of the DP (displaying either a Yes or No). Initially the Toggle Range trigger trait was above the other 3, I then repositioned this trait to be below the other 3. So no joy on trait position.
As usual, I am seeking help with this. I am stuck, most probably due to inadequte experience. Logically it should work as only one of the toggle on or toggle off should fire.




The problem is that both togglerangeon and togglerangeoff are both going to trigger, one after the after, if the range is currently off (togglerangeon presumably changes rangedisplayed to “Yes”, so then the conditions to trigger togglerangeoff are correct when it gets around to checking it).

The only way I can see to fix it is to add another Dynamic Property (e.g., rangechecked) that you set to “No” before calling togglerangeon and togglerangeoff; make rangechecked=="No" part of the Trigger when properties match for both togglerangeon and togglerangeoff, and add a command to change rangechecked to “Yes” to both of those triggers, also. That way, if one of the triggers activates, it sets rangechecked so the other trigger can’t activate at the same time.

2 Likes

Did that and done. Many thanks. Trees vs forest at times.