• 🏆 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!

[Trigger] Most weird trigger bug ever :/

Status
Not open for further replies.
Level 8
Joined
Sep 24, 2007
Messages
300
So, I made a rank system, that give 1 item per 4 kills/unit.

SO basicaly, unit kills 4 enemies, item1, 8 enemies item2 etc.

Triggers:
Adding custom value:
  • Unit custom value
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Entering unit)) Not equal to Stuka
          • (Unit-type of (Entering unit)) Not equal to Bomber
          • (Unit-type of (Entering unit)) Not equal to RocketDummy
          • (Unit-type of (Entering unit)) Not equal to Advanced Worker lv3
          • (Unit-type of (Entering unit)) Not equal to Improved Worker
          • (Unit-type of (Entering unit)) Not equal to Worker
          • (Unit-type of (Entering unit)) Not equal to Commander
          • ((Entering unit) is A structure) Not equal to True
        • Then - Actions
          • Set RankingUnitArray = (RankingUnitArray + 1)
          • Unit - Set the custom value of (Entering unit) to RankingUnitArray
          • Trigger - Add to Animations <gen> the event (Unit - (Entering unit) Takes damage)
        • Else - Actions
Ranking trigger:
  • Ranking system
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Dying unit)) Not equal to (Owner of (Killing unit))
      • ((Killing unit) is A structure) Not equal to True
      • (Unit-type of (Killing unit)) Not equal to Goblin Land Mine
      • (Unit-type of (Killing unit)) Not equal to Bomber
      • (Unit-type of (Killing unit)) Not equal to Stuka
      • (Unit-type of (Killing unit)) Not equal to RocketDummy
      • (Unit-type of (Killing unit)) Not equal to Commander
    • Actions
      • Item - Remove (Item carried by (Dying unit) in slot 1)
      • Item - Remove (Item carried by (Dying unit) in slot 2)
      • Item - Remove (Item carried by (Dying unit) in slot 3)
      • Item - Remove (Item carried by (Dying unit) in slot 4)
      • Item - Remove (Item carried by (Dying unit) in slot 5)
      • Item - Remove (Item carried by (Dying unit) in slot 6)
      • Set KillsNumber[(Custom value of (Killing unit))] = (KillsNumber[(Custom value of (Killing unit))] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KillsNumber[(Custom value of (Killing unit))] Equal to 4
        • Then - Actions
          • Item - Create Star of Honor (Y) at (Position of (Killing unit))
          • Hero - Give (Last created item) to (Killing unit)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • KillsNumber[(Custom value of (Killing unit))] Equal to 8
            • Then - Actions
              • Item - Create Star of Honor (V) at (Position of (Killing unit))
              • Hero - Give (Last created item) to (Killing unit)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • KillsNumber[(Custom value of (Killing unit))] Equal to 12
                • Then - Actions
                  • Item - Create Star of Honor (B) at (Position of (Killing unit))
                  • Hero - Give (Last created item) to (Killing unit)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • KillsNumber[(Custom value of (Killing unit))] Equal to 16
                    • Then - Actions
                      • Item - Create Star of Honor (G) at (Position of (Killing unit))
                      • Hero - Give (Last created item) to (Killing unit)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • KillsNumber[(Custom value of (Killing unit))] Equal to 20
                        • Then - Actions
                          • Item - Create Star of Honor (R) at (Position of (Killing unit))
                          • Hero - Give (Last created item) to (Killing unit)
                        • Else - Actions

Now to the problem: After the unit with items get's killed, it's items should be destroyed/removed/not dropped. It basicaly works. All units have human inventory ability, so I disabled dropping items (in object editor) all items also have dropping disabled. So far so good-unit get's killed, no items on the ground.

Now the bug: AFter some time (haven't discovered yet how much, could be fixed, could be random) unit's items appear at the point it died! I tried several times, without clicking anything, but items appeared after some time. Wtf? I even tried to remove items with actions, when unit dies-no help.

edit: Item appearance after death (3 different units): gametime
3:16 death
4:46 appearance

6:10 death
7:26 appearance

7:52 death
instant appearance

The only other trigger that manipulates with rank items is this one, but shouldn't have any effect.


  • First Aid and ranks
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Health Pack
        • Then - Actions
          • Advanced - Heal (Triggering unit) for 300.00 hitpoints
          • Item - Remove (Item being manipulated)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to Star of Honor (Y)
            • Then - Actions
              • Unit - Add Yellow Powerup to (Triggering unit)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item-type of (Item being manipulated)) Equal to Star of Honor (V)
                • Then - Actions
                  • Unit - Add Violet Powerup to (Triggering unit)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item-type of (Item being manipulated)) Equal to Star of Honor (B)
                • Then - Actions
                  • Unit - Add Blue Powerup to (Triggering unit)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Item-type of (Item being manipulated)) Equal to Star of Honor (G)
                    • Then - Actions
                      • Unit - Add Green Powerup to (Triggering unit)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Item-type of (Item being manipulated)) Equal to Star of Honor (R)
                        • Then - Actions
                          • Unit - Add Heal to (Triggering unit)
                        • Else - Actions
 
Level 11
Joined
Nov 15, 2007
Messages
781
Whether an item is droppable or a unit drops items on death or anything like that is completely irrelevant; when a unit which can decay (basically, any non-hero) dies, it will be removed from the game and its items dropped after its corpse decays.
 
Level 5
Joined
Jan 25, 2006
Messages
103
if the unit getting the items already has all/some items in inventory(less slots than the amount of items you are giving to it), the items can not be given to the hero and they will be dropped at position of unit you are trying to add items for.
 
Status
Not open for further replies.
Top