[Trigger] Complicated gui trigger help.

Status
Not open for further replies.
Yes, like the tital says, i'm having trouble with a complicated GUI trigger.
What its basically supposed to do, is when a unit is killed, pick every unit with the same custom value, then remove a spell array 1, 2, and 3, from it, and add spell array 1x1 + 1, 1x2 + 1, and 1x3 + 1 to it. here are the triggers

Here are the triggers

Initalization

JASS:
    set udg_Rank_System_1[1] = 'A00J'
    set udg_Rank_System_1[2] = 'A00I'
    set udg_Rank_System_1[3] = 'A00K'
    set udg_Rank_System_1[4] = 'A00L'
    set udg_Rank_System_1[5] = 'A00M'
    set udg_Rank_System_1[6] = 'A00N'
    set udg_Rank_System_1[7] = 'A00O'
    set udg_Rank_System_1[8] = 'A00P'
    set udg_Rank_System_1[9] = 'A00Q'
    set udg_Rank_System_1[10] = 'A011'
    set udg_Rank_System_1[(10 * 1 + 1 )] = 'A008'
    set udg_Rank_System_1[(10 * 1 + 2 )] = 'A009'
    set udg_Rank_System_1[(10 * 1 + 3 )] = 'A00B'
    set udg_Rank_System_1[(10 * 1 + 4 )] = 'A00A'
    set udg_Rank_System_1[(10 * 1 + 5 )] = 'A00C'
    set udg_Rank_System_1[(10 * 1 + 6 )] = 'A00D'
    set udg_Rank_System_1[(10 * 1 + 7 )] = 'A00E'
    set udg_Rank_System_1[(10 * 1 + 8 )] = 'A00F'
    set udg_Rank_System_1[(10 * 1 + 9 )] = 'A00G'
    set udg_Rank_System_1[(10 * 1 + 10 )] = 'A00H'
    set udg_Rank_System_1[(10 * 2 + 1 )] = 'A010'
    set udg_Rank_System_1[(10 * 2 + 2 )] = 'A00Z'
    set udg_Rank_System_1[(10 * 2 + 3 )] = 'A00Y'
    set udg_Rank_System_1[(10 * 2 + 4 )] = 'A00X'
    set udg_Rank_System_1[(10 * 2 + 5 )] = 'A00W'
    set udg_Rank_System_1[(10 * 2 + 6 )] = 'A00V'
    set udg_Rank_System_1[(10 * 2 + 7 )] = 'A00U'
    set udg_Rank_System_1[(10 * 2 + 8 )] = 'A00T'
    set udg_Rank_System_1[(10 * 2 + 9 * 3 )] = 'A00S'
    set udg_Rank_System_1[(10 * 2 + 10 * 3 )] = 'A017'

Actual rank system:

  • Testing rank system
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) belongs to an ally of (Owner of (Killing unit))) Equal to False
      • (Owner of (Killing unit)) Not equal to (Owner of (Dying unit))
      • (Level of Rank 10 aura dmg for (Killing unit)) Not equal to 1
      • ((Killing unit) is Mechanical) Equal to False
      • ((Killing unit) is A structure) Equal to False
      • ((Killing unit) is A peon-type unit) Equal to False
    • Actions
      • For each (Integer GInteger) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Rank_System_1[GInteger] for (Killing unit)) Equal to 1
            • Then - Actions
              • Set GGroup[1] = (Units in (Playable map area)((Custom value of (Matching unit)) Equal to (Custom value of (Killing unit))))
              • Unit Group - Pick every unit in GGroup[1] and do (Unit - Move (Picked unit) instantly to (Center of (Playable map area))) <--- DEBUG, not actually used in the final trigger
              • Game - Display to (All players) the text: (String(GInteger)) <--- DEBUG, not actually used in the final trigger
              • Unit Group - Pick every unit in GGroup[1] and do (Actions)
                • Loop - Actions
                  • Unit - Remove Rank_System_1[GInteger] from (Killing unit)
                  • Unit - Remove Rank_System_1[(GInteger x 2)] from (Killing unit)
                  • Unit - Remove Rank_System_1[(GInteger x 3)] from (Killing unit)
                  • Unit - Add Rank_System_1[(GInteger + 1)] to (Killing unit)
                  • Unit - Add Rank_System_1[((GInteger x 2) + 1)] to (Killing unit)
                  • Unit - Add Rank_System_1[((GInteger x 3) + 1)] to (Killing unit)
                  • Game - Display to (All players) the text: (String((Custom value of (Picked unit))))
              • Custom script: call DestroyGroup(udg_GGroup[1])
              • Skip remaining actions
            • Else - Actions
              • Wait 0.01 seconds
It shows "1" to all players, but doesn't give the rank, curiously, when i got a unit with a point value of 0 to kill another unit. it gave all the buildings in the playable map area ranks 1 and 2 but stopped there. i dont know why.
 
Last edited:
Level 9
Joined
May 30, 2008
Messages
430
There are alot more simple ways of creating thos rank things (+armor and damage when unit have x kills) that the one u are using. But at your question "(Level of Rank 10 aura dmg for (Killing unit)) Not equal to 1" this is strange condition also u may have problem with your loop in the second trigger (those rank systems dunno what they are but if is ability u must set it's level to 1)
 
Level 4
Joined
Jul 9, 2008
Messages
88
Unless im pointing out something stupid, it appears to me that your globals overlap when you are setting them in the first trigger. The overlap a LOT.
hope i helped
 
Status
Not open for further replies.
Top