• 🏆 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] 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 =(
 
Level 9
Joined
Jan 14, 2008
Messages
366
  • 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
 
Level 13
Joined
Sep 14, 2008
Messages
1,407
  • 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
 
Level 11
Joined
Dec 31, 2007
Messages
780
  • 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
 
Level 11
Joined
Dec 31, 2007
Messages
780
  • 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.
Top