• 🏆 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] An invisible bug

Status
Not open for further replies.
Level 9
Joined
Sep 5, 2007
Messages
358
Hi everyone!
I'm working on a new spell which is almost finished, however, it has a bug that makes it non-MUI in only one thing.
It creates several dummy units in a spiral, and in the end the dummies are removed from the game, however if the spell is being casted more than once at the same time one of the spiral dummy groups won't be removed only the other.
Also there is no other way of killing the dummy because it's an effect and it stays there forever.

This has two triggers and also uses my moving system for the knockback part, I'll just show the trigger where the bug might probably be:

  • ES Timer
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
      • (Number of units in ES_ug_Group) Greater than 0
    • Actions
      • For each (Integer A) from 1 to ES_i_Number, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ES_i_Counter[(Integer A)] Less than or equal to ES_i_SpireNumber[(Integer A)]
                  • ES_i_Counter2[(Integer A)] Less than or equal to ES_i_SpireNumber[(Integer A)]
            • Then - Actions
              • Set ES_pt_TempPoint[(Integer A)] = (ES_pt_Point[(Integer A)] offset by (20.00 + (ES_r_DistanceBetweenSpires[(Integer A)] x (Real(ES_i_Counter[(Integer A)])))) towards (((360.00 / (Real(ES_i_SpireNumber[(Integer A)]))) x (Real(ES_i_Counter2[(Integer A)]))) + (ES_r_DeviationAngle[(Integer A)] x
              • Unit - Create 1 Earth Spire Dummy for (Owner of ES_u_Caster[(Integer A)]) at ES_pt_TempPoint[(Integer A)] facing Default building facing degrees
              • Unit Group - Add (Last created unit) to ES_ug_TempGroup2[(Integer A)]
              • Special Effect - Create a special effect at ES_pt_TempPoint[(Integer A)] using ES_s_SpecialEffect[(Integer A)]
              • Special Effect - Destroy (Last created special effect)
              • Set ES_ug_TempGroup[(Integer A)] = (Units within ES_r_AoERadius[(Integer A)] of ES_pt_TempPoint[(Integer A)] matching ((((Matching unit) belongs to an enemy of (Owner of ES_u_Caster[(Integer A)])) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A flying
              • Unit Group - Pick every unit in ES_ug_TempGroup[(Integer A)] and do (Actions)
                • Loop - Actions
                  • Unit - Cause ES_u_Caster[(Integer A)] to damage (Picked unit), dealing ES_r_Damage[(Integer A)] damage of attack type Spells and damage type Normal
                  • Set DMS_i_Number = (DMS_i_Number + 1)
                  • Set DMS_u_SourceUnit[DMS_i_Number] = (Last created unit)
                  • Set DMS_u_AffectedUnit[DMS_i_Number] = (Picked unit)
                  • Set DMS_b_IsWorking[DMS_i_Number] = True
                  • Set DMS_b_AffectAllies[DMS_i_Number] = False
                  • Set DMS_b_Missile[DMS_i_Number] = False
                  • Set DMS_b_Collision[DMS_i_Number] = False
                  • Set DMS_b_MoveDeath[DMS_i_Number] = True
                  • Set DMS_b_AutoFacing[DMS_i_Number] = True
                  • Set DMS_b_DestroyTrees[DMS_i_Number] = False
                  • Set DMS_b_MissileMoveDamage[DMS_i_Number] = False
                  • Set DMS_b_AffectFlyingUnits[DMS_i_Number] = False
                  • Set DMS_r_Angle[DMS_i_Number] = (Angle from (Position of (Last created unit)) to (Position of (Picked unit)))
                  • Set DMS_r_CollisionRadius[DMS_i_Number] = 0.00
                  • Set DMS_r_Distance[DMS_i_Number] = 0.00
                  • Set DMS_r_MissileDamage[DMS_i_Number] = 0.00
                  • Set DMS_r_MissileMovingDamage[DMS_i_Number] = 0.00
                  • Set DMS_r_MissileRadius[DMS_i_Number] = 0.00
                  • Set DMS_r_DestroyTreesRadius[DMS_i_Number] = 0.00
                  • Set DMS_r_MoveDamage[DMS_i_Number] = ES_r_KnockbackingDamage[(Integer A)]
                  • Set DMS_r_MoveDamageIncrease[(Integer A)] = 0.00
                  • Set DMS_r_Speed[DMS_i_Number] = (5.00 + (5.00 x (Real((Level of ES_a_Ability[(Integer A)] for ES_u_Caster[(Integer A)])))))
                  • Set DMS_r_StoppingSpeed[DMS_i_Number] = 1.50
                  • Set DMS_s_MissileEffect1[DMS_i_Number] = <Empty String>
                  • Set DMS_s_MissileEffect2[DMS_i_Number] = <Empty String>
                  • Set DMS_s_MovingEffect1[DMS_i_Number] = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
                  • Set DMS_s_MovingEffect2[DMS_i_Number] = <Empty String>
                  • Unit Group - Add DMS_u_AffectedUnit[DMS_i_Number] to DMS_ug_Group
              • Custom script: call RemoveLocation( udg_ES_pt_TempPoint[ GetForLoopIndexA( ) ] )
              • Custom script: call DestroyGroup( udg_ES_ug_TempGroup[ GetForLoopIndexA( ) ] )
              • Set ES_i_Counter[(Integer A)] = (ES_i_Counter[(Integer A)] + 1)
              • Set ES_i_Counter2[(Integer A)] = (ES_i_Counter2[(Integer A)] + 1)
            • Else - Actions
              • Game - Display to (All players) the text: end
              • Unit Group - Pick every unit in ES_ug_TempGroup2[(Integer A)] and do (Actions)
                • Loop - Actions
                  • Set ES_pt_TempPoint[(Integer A)] = (Position of (Picked unit))
                  • Unit - Remove (Picked unit) from the game
                  • Special Effect - Create a special effect at ES_pt_TempPoint[(Integer A)] using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call RemoveLocation( udg_ES_pt_TempPoint[ GetForLoopIndexA( ) ] )
              • Custom script: call DestroyGroup( udg_ES_ug_TempGroup2[ GetForLoopIndexA( ) ] )
              • Set ES_u_Caster[(Integer A)] = No unit
              • Unit Group - Remove ES_u_Caster[(Integer A)] from ES_ug_Group
Thanks in advance.

Wizzy..
 
Level 5
Joined
Jan 5, 2008
Messages
145
im not for sure about this but i think... instead of removeing all units in the unit group. make it to remove all units in unit group matching color of owner of triggering player. i think that might do it. but im not for sure. and btw last created unit creates leaks. im going to keep looking in case theres something else.
 
Level 9
Joined
Sep 5, 2007
Messages
358
Hm, i saw it, and is not when you cast it at the same time with other player, it bugs and you cast it for the second time, sorry, i couldnt find the problem.

no the problem isn't that, because if I cast a second time after the first one is finished it works wonders.

Starquizer said:
I looked vaguely at your map, I think the problem is with the special effect variable but I still working on it.

that doesn't make sense, because it only uses the effect when the unit is moving, and it probably shows the message "end" a lot of times instead of only one.
 
Status
Not open for further replies.
Top