• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Weapon System

Status
Not open for further replies.
Level 11
Joined
Oct 31, 2010
Messages
1,057
Weapons are pernament and one-handed weaps is level 1 and two-handed weaps is level 3 and shield are campaign and is level 2..........

so now i can pick up a one-handed weap and a two-handed weap but cannot pick up the shield no matter what O;

here are the triggers

  • Item by two venomous
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Itemlevel[itemlevelplayernumber] Greater than or equal to 4
        • Then - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
          • Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: |cffffcc00Your hand...
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-class of (Item being manipulated)) Equal to Permanent
          • (Item level of (Item being manipulated)) Equal to 1
        • Then - Actions
          • -------- one handed weap --------
          • Set Itemlevel[itemlevelplayernumber] = (Itemlevel[itemlevelplayernumber] + 1)
        • Else - Actions
          • -------- Two handed weap --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-class of (Item being manipulated)) Equal to Permanent
              • (Item level of (Item being manipulated)) Equal to 3
            • Then - Actions
              • Set Itemlevel[itemlevelplayernumber] = (Itemlevel[itemlevelplayernumber] + 3)
            • Else - Actions
              • -------- Shield --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item-class of (Item being manipulated)) Equal to Campaign
                  • (Item level of (Item being manipulated)) Equal to 2
                • Then - Actions
                  • Set Itemlevel[itemlevelplayernumber] = (Itemlevel[itemlevelplayernumber] + 2)
                • Else - Actions
                  • Do nothing
  • Item weapon lose
    • Events
      • Unit - A unit Loses an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item level of (Item being manipulated)) Equal to 1
          • (Item-class of (Item being manipulated)) Equal to Permanent
        • Then - Actions
          • Set Itemlevel[itemlevelplayernumber] = (Itemlevel[itemlevelplayernumber] - 1)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item level of (Item being manipulated)) Equal to 3
              • (Item-class of (Item being manipulated)) Equal to Permanent
            • Then - Actions
              • Set Itemlevel[itemlevelplayernumber] = (Itemlevel[itemlevelplayernumber] - 3)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item-class of (Item being manipulated)) Equal to Campaign
                  • (Item level of (Item being manipulated)) Equal to 2
                • Then - Actions
                  • Set Itemlevel[itemlevelplayernumber] = (Itemlevel[itemlevelplayernumber] - 2)
                • Else - Actions
                  • Do nothing
  • Item preventation
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • ((Hero manipulating item) has an item of type (Random level 1 Permanent item-type)) Equal to True
              • (Item-class of (Item being manipulated)) Equal to Permanent
              • (Item level of (Item being manipulated)) Equal to 1
        • Then - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
          • Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: |cffffcc00You alrea...
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • (Item-class of (Item being manipulated)) Equal to Campaign
                  • (Item level of (Item being manipulated)) Equal to 2
                  • ((Hero manipulating item) has an item of type (Random level 2 Campaign item-type)) Equal to True
            • Then - Actions
              • Hero - Drop (Item being manipulated) from (Hero manipulating item)
              • Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: |cffffcc00You alrea...
            • Else - Actions
              • Do nothing
  • Variables
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set itemlevelplayernumber = (Player number of (Owner of (Hero manipulating item)))
      • Set PlayerSmithTrigger[1] = Smithing Player Red vision <gen>
      • Set Itemlevel[1] = (Player number of Player 1 (Red))
      • Set Itemlevel[2] = (Player number of Player 2 (Blue))
      • Set Itemlevel[3] = (Player number of Player 3 (Teal))
      • Set Itemlevel[4] = (Player number of Player 4 (Purple))
      • Set Itemlevel[5] = (Player number of Player 5 (Yellow))
      • Set Itemlevel[6] = (Player number of Player 6 (Orange))
      • Set Itemlevel[7] = (Player number of Player 7 (Green))
      • Set Itemlevel[8] = (Player number of Player 8 (Pink))
      • Set PlayerSmithTrigger[2] = Smithing Player blue vision <gen>
      • Set PlayerSmithTrigger[3] = Smithing Player teal vision <gen>
      • Set PlayerSmithTrigger[4] = Smithing Player purple vision <gen>
      • Set PlayerSmithTrigger[5] = Smithing Player yellow vision <gen>
      • Set PlayerSmithTrigger[6] = Smithing Player orange vision <gen>
      • Set PlayerSmithTrigger[7] = Smithing Player green vision <gen>
      • Set PlayerSmithTrigger[8] = Smithing Player pink vision <gen>
      • Set PlayerSmithTrigger[9] = Smithing Player gray vision <gen>
      • Set PlayerSmithTrigger[10] = Smithing Player light blue vision <gen>
 
why not just check the item level and increase the unit's threshold by using the item level too? it will make your trigger much shorter and work faster rather than those if-then-elses...

and I don't see a point in having them as different types when you're already using the item level to determine an item anyways...

equip types only use either one of the two, never needed both... I prefer level because you can make unlimited types using item levels...

btw, I don't think its realistic to be able to pick a 1-hand + a 2-hand weapon...

about the shield, when exactly can you not equip the shield? becoz if it happens when you are wearing a 1h+2h, then its fine...

btw, why are you using Owner of unit in a map init trigger?

itemlevelplayernumber = (Player number of (Owner of (Hero manipulating item)))

also player's 4 and up won't be able to pick anything as they're ItemLevel[] value is already 4 and above...

seriously, my suggestion is to read the equip-type tutorial at the tut section and do it like the way it was done in that tutorial becoz your triggers are a complete mess...
 
Level 11
Joined
Oct 31, 2010
Messages
1,057
sorry for not explaining my problems for clearly :c, but this is my problem......i cannot seem to equip the shield but i can equip a one handed sword and a two handed sword O: and what i want is that i can only equip either a shield + a one handed sword or just a shield or just a sword or a two - handed sword
 
why not just check the item level and increase the unit's threshold by using the item level too? it will make your trigger much shorter and work faster rather than those if-then-elses...

and I don't see a point in having them as different types when you're already using the item level to determine an item anyways...

equip types only use either one of the two, never needed both... I prefer level because you can make unlimited types using item levels...

btw, I don't think its realistic to be able to pick a 1-hand + a 2-hand weapon...

about the shield, when exactly can you not equip the shield? becoz if it happens when you are wearing a 1h+2h, then its fine...

btw, why are you using Owner of unit in a map init trigger?

also if two unit's pick an item the item threshold will increase for both of them because you're using the itemlevelblahblah that you have set on map init to be player number of owner of blahblah, which doesn't exist so that itemlevelblahblah will always be equal to 0...

seriously, my suggestion is to read the equip-type tutorial at the tut section and do it like the way it was done in that tutorial becoz your triggers are a complete mess...

read this...

and an explanation of the map init problem...

you did this

Set itemlevelplayernumber = (Player number of (Owner of (Hero manipulating item)))

Hero manipulating item is not existent at map init and as such its owner will not exist too... and so the player number will either be null or zero, so itemlevelplayernumber will always be equal to that... now since you use that variable for the item checks, no matter who is the owner of the unit getting an item, they will all share the same threshold...

sample: unit1 picks up a 2h, then unit2 picks up another 2h, no one will be able to pick any item anymore as the threshold will already be 4...
 
Status
Not open for further replies.
Top