• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Units becoming randomly slower?? plz help +rep!

Status
Not open for further replies.
Level 7
Joined
Mar 28, 2009
Messages
210
okay in my map I have a unit rank system which when a unit kills a unit it gains a custom value and such.. triggers below..
  • Rank System
    • Events
      • Unit - A unit Dies
    • Conditions
      • Multiple ConditionsAnd - All (Conditions) are true
        • Conditions
          • ((Owner of (Killing unit)) slot status) Equal to (==) Is playing
          • ((Owner of (Killing unit)) controller) Equal to (==) User
          • (Owner of (Killing unit)) Not equal to (!=) (Owner of (Dying unit))
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Multiple ConditionsOr - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Killing unit)) Equal to (==) Arquebusier
              • (Unit-type of (Killing unit)) Equal to (==) Ballista
              • (Unit-type of (Killing unit)) Equal to (==) Bandit
              • (Unit-type of (Killing unit)) Equal to (==) Blunderbuss
              • (Unit-type of (Killing unit)) Equal to (==) Cannon
              • (Unit-type of (Killing unit)) Equal to (==) Conquistador
              • (Unit-type of (Killing unit)) Equal to (==) Early Medium Tank
              • (Unit-type of (Killing unit)) Equal to (==) Early Rifleman
              • (Unit-type of (Killing unit)) Equal to (==) Early Tank
              • (Unit-type of (Killing unit)) Equal to (==) Eradicator
              • (Unit-type of (Killing unit)) Equal to (==) Fire Trooper
              • (Unit-type of (Killing unit)) Equal to (==) Forest Archer
              • (Unit-type of (Killing unit)) Equal to (==) Gatling Gunner
              • (Unit-type of (Killing unit)) Equal to (==) Grenadier
              • (Unit-type of (Killing unit)) Equal to (==) Halberdier
              • (Unit-type of (Killing unit)) Equal to (==) Handgunner
              • (Unit-type of (Killing unit)) Equal to (==) Heavy Tank
              • (Unit-type of (Killing unit)) Equal to (==) Highlander
              • (Unit-type of (Killing unit)) Equal to (==) Italian Spear Militia
              • (Unit-type of (Killing unit)) Equal to (==) Janissary
              • (Unit-type of (Killing unit)) Equal to (==) Knights Templar
              • (Unit-type of (Killing unit)) Equal to (==) Light AT Gun
              • (Unit-type of (Killing unit)) Equal to (==) MOD Infantry
              • (Unit-type of (Killing unit)) Equal to (==) Machinegunner
              • (Unit-type of (Killing unit)) Equal to (==) Main Battle Tank
              • (Unit-type of (Killing unit)) Equal to (==) Mark I
              • (Unit-type of (Killing unit)) Equal to (==) Mark V
              • (Unit-type of (Killing unit)) Equal to (==) Medic
              • (Unit-type of (Killing unit)) Equal to (==) Medium Tank
              • (Unit-type of (Killing unit)) Equal to (==) Militia Spearmen
              • (Unit-type of (Killing unit)) Equal to (==) Militia Swordsman
              • (Unit-type of (Killing unit)) Equal to (==) Musketeer
              • (Unit-type of (Killing unit)) Equal to (==) Polish Barbarian
              • (Unit-type of (Killing unit)) Equal to (==) Prussian Infantry
              • (Unit-type of (Killing unit)) Equal to (==) Railrifle Trooper
              • (Unit-type of (Killing unit)) Equal to (==) Scout
              • (Unit-type of (Killing unit)) Equal to (==) Sniper
              • (Unit-type of (Killing unit)) Equal to (==) Spear Thrower
              • (Unit-type of (Killing unit)) Equal to (==) Toxic Trooper
              • (Unit-type of (Killing unit)) Equal to (==) Trench Soldier
              • (Unit-type of (Killing unit)) Equal to (==) Spanish Skirmisher
              • (Unit-type of (Killing unit)) Equal to (==) Viking Axeman
              • (Unit-type of (Killing unit)) Equal to (==) Archer
              • (Unit-type of (Killing unit)) Equal to (==) Squad Spearman
              • (Unit-type of (Killing unit)) Equal to (==) Squad Swordsman
              • (Unit-type of (Killing unit)) Equal to (==) Cleric
              • (Unit-type of (Killing unit)) Equal to (==) Gladiator
              • (Unit-type of (Killing unit)) Equal to (==) Gladiator Spearman
              • (Unit-type of (Killing unit)) Equal to (==) Longbowman
              • (Unit-type of (Killing unit)) Equal to (==) British Longbowman
              • (Unit-type of (Killing unit)) Equal to (==) French War Cleric
              • (Unit-type of (Killing unit)) Equal to (==) German Heavy Infantry
              • (Unit-type of (Killing unit)) Equal to (==) Italian Crossbow Militia
              • (Unit-type of (Killing unit)) Equal to (==) Reborn Spartan
              • (Unit-type of (Killing unit)) Equal to (==) Thor's Guard
              • (Unit-type of (Killing unit)) Equal to (==) Crossbowman
              • (Unit-type of (Killing unit)) Equal to (==) Professional Fighter
              • (Unit-type of (Killing unit)) Equal to (==) Professional Spearmen
              • (Unit-type of (Killing unit)) Equal to (==) Heavy Crossbowman
        • Then - Actions
          • Unit - Set the custom value of (Killing unit) to ((Custom value of (Killing unit)) + 1)
          • -------- Major To General --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Custom value of (Killing unit)) Equal to (==) ((RankInteger x 4) + 1)
              • Then - Actions
                • Unit - Remove Major from (Killing unit)
                • Unit - Add General to (Killing unit)
              • Else - Actions
          • -------- Sergeant To Major --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Custom value of (Killing unit)) Equal to (==) ((RankInteger x 3) + 1)
              • Then - Actions
                • Unit - Remove Sergeant from (Killing unit)
                • Unit - Add Major to (Killing unit)
              • Else - Actions
          • -------- Corporal to Sergeant --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Custom value of (Killing unit)) Equal to (==) ((RankInteger x 2) + 1)
              • Then - Actions
                • Unit - Remove Corporal from (Killing unit)
                • Unit - Add Sergeant to (Killing unit)
              • Else - Actions
          • -------- Private To Corporal --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Custom value of (Killing unit)) Equal to (==) ((RankInteger x 1) + 1)
              • Then - Actions
                • Unit - Remove Private from (Killing unit)
                • Unit - Add Corporal to (Killing unit)
              • Else - Actions
          • -------- Nothing to Private --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Custom value of (Killing unit)) Equal to (==) 1
              • Then - Actions
                • Unit - Add Private to (Killing unit)
              • Else - Actions
        • Else - Actions
The Abilities are based on Drunken Brawl and for some reason sometimes the units are redculoisly slow... is it cause its the same ability? bug in blizzard? mess up in triggers? Plz help!
And Thanks for taking the time to try to help me!
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
Doesn't seem like the cause of your problem is from your trigger.

I can't help but notice that your trigger is very inefficient.

Instead of checking the unit type of the killing unit, you could have done something like
  • (Race of (Killing unit)) Equal to Human
or make a custom ability that has no icon, give it to all those unit types that trigger is checking for, and do
  • (Level of KillerMark for (Killing unit)) Greater than 0
Instead of having multiple abilities for each separate rank, couldn't you have just made one ability with several levels representing different ranks?
 
Status
Not open for further replies.
Top