Cant add units to unitgroup?

Psiblade94122

In need of sleep
Reaction score
138
Code:
Add to bullets
    Events
        Unit - A unit enters (Playable map area)
    Conditions
        ((Triggering unit) is A sapper) Equal to True
    Actions
        Game - Display to (All players) the text: (Name of (Triggering unit))
        Unit Group - Add (Triggering unit) to Bullets

this is strange, i cant add the triggering unit to the unit group

the unit passes the debug <game display to all players> but it dosent get added, anyone know why?
 

Squishy

You can change this now in User CP.
Reaction score
127
Did you try to use the Bullets unit group for anything yet?
 

vypur85

Hibernate
Reaction score
803
How do you know it's not added? Try pick every unit in the Unit Group and put a text message inside and see whether it loops or not. It should be added o_O. Unless you destroyed the Unit Group in another trigger.
 

Psiblade94122

In need of sleep
Reaction score
138
i had another trigger counting off how many units where in the group <that was in the slide trigger for the bullets>

i have no idea why but when i removed the destroy group (udg_UG) the bug dissapeared

for some odd reason when i used the set UG = Bullets, every action done to UG happened to the unit group bullets too, so when i destroyed that dummy var it destroyed the key var.

With that said, now im worried about memory leaks

will this leak?

Code:
Bullet
    Events
        Time - Timer_Bullets expires
    Conditions
    Actions
        Unit Group - Pick every unit in Bullets and do (Actions)
            Loop - Actions
                Set L = (Position of (Picked unit))
                Set L2 = (L offset by ((Mana of (Picked unit)) / 25.00) towards (Facing of (Picked unit)) degrees)
                Unit - Cause (Picked unit) to damage (Picked unit), dealing ((Mana of (Picked unit)) / 25.00) damage of attack type Spells and damage type Normal
                Unit - Move (Picked unit) instantly to L2
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff Time Slow Aura Unit) Equal to True
                    Then - Actions
                        Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - ((Mana of (Picked unit)) / 50.00))
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Percentage mana of (Picked unit)) Less than or equal to 1.00
                            Then - Actions
                                Unit - Kill (Picked unit)
                            Else - Actions
                    Else - Actions
                        Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + ((Mana of (Picked unit)) / 25.00))
                Custom script:   call RemoveLocation(udg_L)
                Custom script:   call RemoveLocation(udg_L2)
        Countdown Timer - Start Timer_heros as a One-shot timer that will expire in 0.02 seconds

im not setting any unitgroup variables
 

Squishy

You can change this now in User CP.
Reaction score
127
Adding units to unit groups doesn't leak, so destroying the group would cause problems. So that means that trigger won't leak.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top