• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] simple gui trigger help needed x(

Status
Not open for further replies.
Level 9
Joined
Jan 14, 2008
Messages
366
i need a gui trigger that does the following:

E: hero picks up item

C: item class of item being manipulated equal to class-X

A: remove all items of item class-x from the heros inventory, except the just acquired item

being trying but nothing i come up with works =(
 
  • weaponremove when new pickedup Copy
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to Artifact
    • Actions
      • Set Temp_Item = (Item being manipulated)
      • Item - Remove (Item carried by (Hero manipulating item) of type Club)
      • Item - Remove (Item carried by (Hero manipulating item) of type Enchanted sword)
      • Item - Remove (Item carried by (Hero manipulating item) of type Fireblast maul)
      • Item - Remove (Item carried by (Hero manipulating item) of type Frostaxe)
      • Item - Remove (Item carried by (Hero manipulating item) of type Lightning blade)
      • Hero - Create (Item-type of Temp_Item) and give it to (Hero manipulating item)
doesnt work cant figure why
 
  • a
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to YourClass
    • Actions
      • Set TempItem = (Item being manipulated)
      • 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
              • And - All (Conditions) are true
                • Conditions
                  • (Item-class of (Item carried by (Triggering unit) in slot (Integer A))) Equal to (Item-class of TempItem)
                  • (Item carried by (Triggering unit) in slot 1) Not equal to TempItem
            • Then - Actions
              • Item - Remove (Item carried by (Triggering unit) in slot (Integer A))
            • Else - Actions
 
  • a
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to YourClass
    • Actions
      • Set TempItem = (Item being manipulated)
      • 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
              • And - All (Conditions) are true
                • Conditions
                  • (Item-class of (Item carried by (Triggering unit) in slot (Integer A))) Equal to (Item-class of TempItem)
                  • (Item carried by (Triggering unit) in slot INTEGER A)** you made a mistake here** Not equal to TempItem
            • Then - Actions
              • Item - Remove (Item carried by (Triggering unit) in slot (Integer A))
            • Else - Actions
 
  • a
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to YourClass
    • Actions
      • Set TempItem = (Item being manipulated)
      • 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-class of (Item carried by (Triggering unit) in slot (Integer A))) Equal to (Item-class of TempItem)
              • Item carried by (Triggering unit) in slot INTEGER A)** you made a mistake here** Not equal to TempItem
            • Then - Actions
              • Item - Remove (Item carried by (Triggering unit) in slot (Integer A))
            • Else - Actions

DarkAngelAzazel you made a mistake there where i pointed with ** ** and i corrected it

oxxo your first trigger doesnt work coz you make an infinite loop there... you pick up the item then remove then pick up then remove infitely .... do you understand what im saying?

perhaps you can fix it this way





  • weaponremove when new pickedup Copy
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to Artifact
    • Actions
      • Trigger - turn off this trigger
      • Set Temp_Item = (Item being manipulated)
      • Item - Remove (Item carried by (Hero manipulating item) of type Club)
      • Item - Remove (Item carried by (Hero manipulating item) of type Enchanted sword)
      • Item - Remove (Item carried by (Hero manipulating item) of type Fireblast maul)
      • Item - Remove (Item carried by (Hero manipulating item) of type Frostaxe)
      • Item - Remove (Item carried by (Hero manipulating item) of type Lightning blade)
      • Hero - Create (Item-type of Temp_Item) and give it to (Hero manipulating item)
      • Trigger - turn on this trigger
but i dont really know :P... this way the trigger doesnt fire you give the item via triggers to your hero coz that happens when the trigger is off


EDIT: BTW azazel if you place conditions one after the other in separate lines warcraft takes them as an AND so there is no need to place them under AND - ALL CONDITIONS ... just saying :P
 
Status
Not open for further replies.
Back
Top