[Trigger] buggy trigger

Status
Not open for further replies.
Level 25
Joined
Mar 29, 2020
Messages
1,466
A spell of mine that was working perfectly stopped working when I transferred it to a new map. I broke it into pieces and was surprised to find the following:

  • bank tunnel
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Banking Tunnel (Level 1)
          • (Unit-type of (Triggering unit)) Equal to Banking Tunnel (Level 2)
          • (Unit-type of (Triggering unit)) Equal to Banking Tunnel (Level 3)
    • Actions
      • Unit Group - Add (Triggering unit) to BankGroup
      • Game - Display to (All players) the text: (bankgroup: + (String((Number of units in BankGroup))))
there is a lot more to the spell, but I disabled it (and didn't copy it here) bc the problem starts here. for the first two times the unit (any of the three) is summoned everything works fine (returns 1, and then 2 in the message), but from the third time and on it keeps returning that the group is empty. and there is no other active code touching this variable. I'm pretty sure this has to be a bug. anyone know how I can fix this?

thanks!

Edit: I tried creating a new variable and replacing the old one, still getting the same issue.

Edit: another anomaly that may point to the source of the problem - in the object manager, when I check where these variables are used, it says that this trigger is actually in a different folder than where it appears in the trigger editor.... curious and curiouser...
 
Last edited:
Level 25
Joined
Mar 29, 2020
Messages
1,466
I tried braking this down even further to find the issue. now I'm not using anything custom, just a shadow hunter with serpent wards. still - counts 1,2 then constantly returns 0. ?????!

  • plzwrk
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Serpent Ward (Level 1)
    • Actions
      • Unit Group - Add (Triggering unit) to Dumbgroup
      • Game - Display to (All players) the text: (group: + (String((Number of units in Dumbgroup))))
 
Level 13
Joined
Feb 5, 2018
Messages
567
Well I made a blank map with this and it works. You propably have something in your map messing with your triggers.

  • Woo
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Serpent Ward (Level 1)
          • (Unit-type of (Triggering unit)) Equal to Serpent Ward (Level 2)
          • (Unit-type of (Triggering unit)) Equal to Serpent Ward (Level 3)
    • Actions
      • Unit Group - Add (Triggering unit) to Group
      • Game - Display to (All players) the text: (String((Number of units in Group)))
 
Last edited:
Status
Not open for further replies.
Top