• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] weird problem with unit groups..

Status
Not open for further replies.
Level 9
Joined
Jul 24, 2007
Messages
308
i have a problem with unit groups, units not being added !! here is the trigger :
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Owner of (Casting unit)) Food used) Equal to 0
    • Then - Actions
      • Unit - Order (Casting unit) to Stop
      • Do nothing
    • Else - Actions
      • Set CastingUnit = (Position of (Casting unit))
      • Set ShootAngle = (Facing of (Casting unit))
      • For each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Unit(not variable) for (Owner of (Casting unit)) at CastingUnit facing ShootAngle degrees <--- works
          • Unit Group - Add (Last created unit) to BuggingUnitGroup <---- doesnt work
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Last created unit) is in BuggingUnitGroup) Equal to True
            • Then - Actions
              • Quest - Display to (All players) the Quest Update message: Unit Added to Group < ----- message not being displayed
            • Else - Actions
      • Player - Add -1 to (Owner of (Casting unit)) Food used
      • Custom script: call RemoveLocation (udg_CastingUnit)
      • Unit Group - Add (Casting unit) to AnotherUselessGroup <---- works
      • Camera - Shake the camera for (Owner of (Casting unit)) with magnitude 1.20
and this :
  • Unit Group - Pick every unit in BuggingUnitGroup and do (Actions) <---- does not loop/picks anything
    • Loop - Actions
      • Set AttackerUnit = (Picked unit)
      • Game - Display to (All players) the text: (Unit : + Picked Unit)
      • Game - Display to (All players) the text: (Unit : + (Name of AttackerUnit))
      • Unit - Set the custom value of AttackerUnit to ((Custom value of AttackerUnit) + 1)
      • Game - Display to (All players) the text: (Unit : + Value +1)
      • Set UnitOffset = ((Position of Bullet) offset by 125.00 towards (Facing of AttackerUnit) degrees)
      • Unit - Move AttackerUnit instantly to UnitOffset
      • Game - Display to (All players) the text: (Unit : + Move)
      • Set UnitHit = (Units within 75.00 of (Position of AttackerUnit) matching ((((Matching unit) belongs to an enemy of (Owner of Bullet)) Equal to True) and (((Matching unit) is dead) Equal to False)))
      • Unit Group - Pick every unit in UnitHit and do (Actions)
        • Loop - Actions
          • Set Damage = (Random real number between 30.00 and 45.00)
          • Unit - Cause AttackerUnit to damage (Picked unit), dealing WeaponDamage damage of attack type Normal and damage type Universal
          • Unit Group - Remove AttackerUnit from Bullets
          • Unit - Remove AttackerUnit from the game
          • Game - Display to (All players) the text: (Unit : + Hit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • Mode_Thing Equal to True
              • Mode_Thing2 Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Custom value of Bullet) Greater than or equal to 6
            • Then - Actions
              • Unit Group - Remove AttackerUnit from BuggingUnitGroup
              • Unit - Remove AttackerUnit from the game
              • Game - Display to (All players) the text: (Unit : + Remove)
            • Else - Actions
              • Do nothing
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Custom value of Bullet) Greater than or equal to 20
            • Then - Actions
              • Unit Group - Remove AttackerUnit from BuggingUnitGroup
              • Unit - Remove AttackerUnit from the game
              • Game - Display to (All players) the text: (Unit : + Remove)
            • Else - Actions
              • Do nothing
          • Do nothing
      • Custom script: call RemoveLocation (udg_UnitOffset)
      • Custom script: call DestroyGroup (udg_UnitHit)

message not being displayed
unit actions in group not happening
unit is not being added -,-
sm1 help me please
BuggingUnitGroup picking nothing
no message is being displayed from both triggers
units are being created, but not added to group !!
 
Last edited:
Status
Not open for further replies.
Top