Item Stacking System Help

Azrooh

New Member
Reaction score
5
Solved







Trigger:
  • Stacking
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Shotgun Shell
    • Actions
      • Set BulletType = (Item-type of (Item being manipulated))
      • Set BulletCharge = (Charges remaining in (Item being manipulated))
      • Set BulletUnit = (Triggering unit)
      • Item - Remove (Item being manipulated)
      • Wait 0.01 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (BulletUnit has an item of type BulletType) Equal to True
        • Then - Actions
          • Item - Set charges remaining in (Item carried by BulletUnit of type Shotgun Shell) to ((Charges remaining in (Item carried by BulletUnit of type Shotgun Shell)) + BulletCharge)
        • Else - Actions
          • Hero - Create BulletType and give it to BulletUnit
          • Item - Set charges remaining in (Last created item) to BulletCharge


When I pick up the item, nothing happens.The item isn't even in the unit's inventory. The unit is a normal unit with an inventory instead of a hero, could that be causing it?
 

Skippy

Active Member
Reaction score
39
Don't know.
Maybe change Triggering Unit to Hero manipulating item (doesn't matter if your unit is not hero).
And why do you have wait in your trigger?

EDIT: Check my trigger
Trigger:
  • Charges
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Charges remaining in (Item being manipulated)) Not equal to 0
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to (Item-type of (Item being manipulated))
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
                • Then - Actions
                  • Item - Set charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A)) to ((Charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A))) + (Charges remaining in (Item being manipulated)))
                  • Item - Remove (Item being manipulated)
 

Azrooh

New Member
Reaction score
5
Ah, just solved it by remaking the trigger differently.
It crashes without the wait.
 
General chit-chat
Help Users

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top