Trigger Help

cleeezzz

The Undead Ranger.
Reaction score
268
Code:
Camo
    Events
        Time - Every 0.30 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 8, do (Actions)
            Loop - Actions
                Custom script:   set bj_wantDestroyGroup = true
                Unit Group - Pick every unit in (Units in (Playable map area) matching ((Level of Camouflage  for (Matching unit)) Equal to 1)) and do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Owner of (Picked unit)) Equal to (Player((Integer A)))
                            Then - Actions
                                Set Position[(Integer A)] = (Position of (Picked unit))
                                Set TempGroup[(Integer A)] = (Units within 600.00 of Position[(Integer A)] matching (((Owner of (Matching unit)) is an enemy of (Owner of (Picked unit))) Equal to True))
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (TempGroup[(Integer A)] is empty) Equal to True
                                    Then - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (Terrain type at Position[(Integer A)]) Equal to Lordaeron Summer - Grass
                                            Then - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        Red_Color[(Integer A)] Greater than 20.00
                                                    Then - Actions
                                                        Set Red_Color[(Integer A)] = (Red_Color[(Integer A)] - 5.00)
                                                    Else - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        Blue_Color[(Integer A)] Greater than 20.00
                                                    Then - Actions
                                                        Set Blue_Color[(Integer A)] = (Blue_Color[(Integer A)] - 5.00)
                                                    Else - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        Invis_A[(Integer A)] Less than 75.00
                                                    Then - Actions
                                                        Set Invis_A[(Integer A)] = (Invis_A[(Integer A)] + 5.00)
                                                    Else - Actions
                                                Animation - Change (Picked unit)'s vertex coloring to (Red_Color[(Integer A)]%, 100.00%, Blue_Color[(Integer A)]%) with Invis_A[(Integer A)]% transparency
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        Invis_A[(Integer A)] Greater than or equal to 50.00
                                                    Then - Actions
                                                        Unit - Make (Picked unit) Invulnerable
                                                    Else - Actions
                                            Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (Terrain type at Position[(Integer A)]) Not equal to Lordaeron Summer - Grass
                                            Then - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        Blue_Color[(Integer A)] Less than 100.00
                                                    Then - Actions
                                                        Set Blue_Color[(Integer A)] = (Blue_Color[(Integer A)] + 20.00)
                                                    Else - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        Red_Color[(Integer A)] Less than 100.00
                                                    Then - Actions
                                                        Set Red_Color[(Integer A)] = (Red_Color[(Integer A)] + 20.00)
                                                    Else - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        Invis_A[(Integer A)] Greater than 0.00
                                                    Then - Actions
                                                        Set Invis_A[(Integer A)] = (Invis_A[(Integer A)] - 10.00)
                                                    Else - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        Invis_A[(Integer A)] Less than 50.00
                                                    Then - Actions
                                                        Unit - Make (Picked unit) Vulnerable
                                                    Else - Actions
                                                Animation - Change (Picked unit)'s vertex coloring to (Red_Color[(Integer A)]%, 100.00%, Blue_Color[(Integer A)]%) with Invis_A[(Integer A)]% transparency
                                            Else - Actions
                                    Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                Blue_Color[(Integer A)] Less than 100.00
                                            Then - Actions
                                                Set Blue_Color[(Integer A)] = (Blue_Color[(Integer A)] + ((Real((Number of units in TempGroup[(Integer A)]))) x 10.00))
                                            Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                Red_Color[(Integer A)] Less than 100.00
                                            Then - Actions
                                                Set Red_Color[(Integer A)] = (Red_Color[(Integer A)] + ((Real((Number of units in TempGroup[(Integer A)]))) x 10.00))
                                            Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                Invis_A[(Integer A)] Greater than 0.00
                                            Then - Actions
                                                Set Invis_A[(Integer A)] = (Invis_A[(Integer A)] - ((Real((Number of units in TempGroup[(Integer A)]))) x 5.00))
                                            Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                Invis_A[(Integer A)] Less than 50.00
                                            Then - Actions
                                                Unit - Make (Picked unit) Vulnerable
                                            Else - Actions
                                        Animation - Change (Picked unit)'s vertex coloring to (Red_Color[(Integer A)]%, 100.00%, Blue_Color[(Integer A)]%) with Invis_A[(Integer A)]% transparency
                            Else - Actions
                Custom script:   call DestroyGroup(udg_TempGroup[bj_forLoopAIndex])
                Custom script:   call RemoveLocation(udg_Position[bj_forLoopAIndex])
sorry i know its long. but im pretty sure the error is in the beginning cuz the trigger doesn't detect the unit created by the trigger below

Code:
Skink
    Events
        Unit - A unit Dies
    Conditions
    Actions
        Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at (Center of (Playable map area)) facing Default building facing degrees

the created one doesn't work with the trigger, help?

(when the unit that has camo dies, it creates another one)

EDIT: fixed, i was putting the custom scripts in the wrong place.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top