Another problem with item triggers...

iMephiles

New Member
Reaction score
0
I'll show you what I have so far, it all works, but only correctly if theres only one player, and if someone drops the item and picks it back up, it adds to the integer. I would be able to do it, but it's a little more complicated if the items has levels, I'll show you what I have so far.
Trigger:
  • Boots 2
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Boots of Speed 1
      • And - All (Conditions) are true
        • Conditions
          • ((Hero manipulating item) has an item of type Boots of Speed 1) Equal to True
          • ((Hero manipulating item) has an item of type Boots of Speed 2) Not equal to True
          • ((Hero manipulating item) has an item of type Boots of Speed 3) Not equal to True
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If ((Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Boots of Speed 1) then do (Set Boots2 = (Boots2 + 1)) else do (Do nothing)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Boots2 Greater than or equal to 2
            • Then - Actions
              • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
              • Item - Remove (Item carried by (Triggering unit) of type Boots of Speed 1)
              • Item - Remove (Item carried by (Triggering unit) of type Boots of Speed 1)
              • Hero - Create Boots of Speed 2 and give it to (Triggering unit)
              • Special Effect - Destroy (Last created special effect)
              • Set Boots2 = (Boots2 - 2)
            • Else - Actions

Trigger:
  • Boots 3
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Boots of Speed 1
      • And - All (Conditions) are true
        • Conditions
          • ((Hero manipulating item) has an item of type Boots of Speed 1) Equal to True
          • ((Hero manipulating item) has an item of type Boots of Speed 2) Equal to True
          • ((Hero manipulating item) has an item of type Boots of Speed 3) Not equal to True
    • Actions
      • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
      • Item - Remove (Item carried by (Triggering unit) of type Boots of Speed 2)
      • Item - Remove (Item carried by (Triggering unit) of type Boots of Speed 1)
      • Hero - Create Boots of Speed 3 and give it to (Triggering unit)
      • Special Effect - Destroy (Last created special effect)

Trigger:
  • Boots 4
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Boots of Speed 1
      • And - All (Conditions) are true
        • Conditions
          • ((Hero manipulating item) has an item of type Boots of Speed 1) Equal to True
          • ((Hero manipulating item) has an item of type Boots of Speed 2) Not equal to True
          • ((Hero manipulating item) has an item of type Boots of Speed 3) Equal to True
    • Actions
      • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
      • Item - Remove (Item carried by (Triggering unit) of type Boots of Speed 3)
      • Item - Remove (Item carried by (Triggering unit) of type Boots of Speed 1)
      • Hero - Create Boots of Speed 4 and give it to (Triggering unit)
      • Special Effect - Destroy (Last created special effect)


Edit: I highly doubt I'll have to edit either of the 2nd or 3rd, because they're working just fine, but if absolutely necessary, I'll change them.
 

Carnerox

The one and only.
Reaction score
84
Try replacing
Trigger:
  • Triggering Unit


With

Trigger:
  • Hero manipulating item
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Shouldn't matter...

Also, what is it that doesn't work here ? :S
What does happen ?
 

cleeezzz

The Undead Ranger.
Reaction score
268
i think ive told you this twice already. Set Boots2 = 0 at the top. this acts to reset the counter


Also move the If boots2 greater than equal to 2 OUTSIDE the integer A loop, the check does not need to be run 6 times.

Trigger:
  • Boots 2
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Boots of Speed 1
      • And - All (Conditions) are true
        • Conditions
          • ((Hero manipulating item) has an item of type Boots of Speed 1) Equal to True
          • ((Hero manipulating item) has an item of type Boots of Speed 2) Not equal to True
          • ((Hero manipulating item) has an item of type Boots of Speed 3) Not equal to True
    • Actions
      • Set Boots2 = 0
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If ((Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Boots of Speed 1) then do (Set Boots2 = (Boots2 + 1)) else do (Do nothing)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Boots2 Greater than or equal to 2
        • Then - Actions
          • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
          • Item - Remove (Item carried by (Triggering unit) of type Boots of Speed 1)
          • Item - Remove (Item carried by (Triggering unit) of type Boots of Speed 1)
          • Hero - Create Boots of Speed 2 and give it to (Triggering unit)
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
 

iMephiles

New Member
Reaction score
0
That doesn't work either, which I have also said before. When I have that up, I buy 1, 2, still nothing, 3, still nothing, 4 and than an instant level 4...
it's supposed to be 2 level 1's for a level 2, than another 1 for 3, and another for 4, not 4 for 4 and nothing in between.
 

canons200

New Member
Reaction score
50
if you want 1 + 1 turn 2 then another 1 add in turn 3. use simple trigger.

eg for 2 lv1 boot turn to 1 lv2 boot.
condition check if hero have 2 lv 1 boot, if so then remove them and give 1 lv2 boot

eg for 1 lv1 boot + 1 lv2 boot turn to 1 lv3 boot,
condition check if hero have 1 lv1 boot + 1 lv2 boot, if so then remove them and give 1 lv3 boot

eg for 1 lv1 boot + 1 lv3 boot turn to 1 lv4 boot
condition check if hero have 1 lv1 boot + 1 lv3 boot, if so then remove them and give 4 lv3 boot

what i mean is that, u no need to place all lv1,lv2 and lv 3 boot for checking condition.
 

iMephiles

New Member
Reaction score
0
I know, thats what I'm trying to figure out, how to make it search for 2 of the same item, without it picking the same item twice, which is why making it search for one twice doesn't work, cause it picks the same one.

It works how it is, except if you drop it and pick it back up, that and there are multiple players, so I'm wanting a way for it to work without variables.
 

canons200

New Member
Reaction score
50
try this, it should be working
Trigger:
  • Boots 2
    • Events
    • Unit - A unit Acquires an item
    • Conditions
    • (Item-type of (Item being manipulated)) Equal to Boots of Speed 1
    • Actions
    • Set Boots2 = 0
    • For each (Integer A) from 1 to 6, do (Actions)
    • Loop - Actions
    • If ((Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Boots of Speed 1) then do (Set Boots2 = (Boots2 + 1)) else do (Do nothing)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Boots2 Greater than or equal to 2
    • Then - Actions
    • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
    • Item - Remove (Item carried by (Triggering unit) of type Boots of Speed 1)
    • Item - Remove (Item carried by (Triggering unit) of type Boots of Speed 1)
    • Hero - Create Boots of Speed 2 and give it to (Triggering unit)
    • Special Effect - Destroy (Last created special effect)
    • Else - Actions
 

iMephiles

New Member
Reaction score
0
That's the same one he was showing me, and it doesn't work how I would like it to. I need a trigger without any variables for it to work properly.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top