• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Condition Question

Status
Not open for further replies.
Level 9
Joined
Aug 1, 2008
Messages
453
How do i make this so it will only do it if i use X item on X item?? Please and thank you ^^

  • Untitled Trigger 010
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to ITEM TEST
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 0 and 100) Less than or equal to 50
        • Then - Actions
          • Item - Remove (Item carried by (Triggering unit) of type ITEM TEST)
          • Item - Create Claws of Attack +15 at (Center of (Playable map area))
          • Hero - Give (Last created item) to (Triggering unit)
        • Else - Actions
          • Item - Remove (Item carried by (Triggering unit) of type ITEM TEST)
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
He wants to use 1 item in his inventory on another item in his inventory (probably fusing, crafting or something like that). But he wants the effect of creating a new item only to take effect when 2 specific items are combined.

I don't know if it's possible to use an item on an item. If not, I suggest you make a trigger that activates when the item is used. Then you check if any of the slots of the hero manipulating the items contains the other item you want to check for. If that's true, you can do the actions.

Do keep in mind that if you can use the manipulating item for multiple combinations that give different results (like item A + item B gives item C, but item A + item D gives item E), you'll get a random of the 2 combinations to be done. To solve this, notify the player to only possess the items he/she wants to combine in his/her inventory at the moment of combination.
 
Level 9
Joined
Aug 1, 2008
Messages
453
so like
  • Untitled Trigger 010
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Target item of ability being cast)) Equal to Crown of Kings +5
      • (Item-type of (Item being manipulated)) Equal to ITEM TEST
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 0 and 100) Less than or equal to 50
        • Then - Actions
          • Item - Remove (Item carried by (Triggering unit) of type ITEM TEST)
          • Item - Create Claws of Attack +15 at (Center of (Playable map area))
          • Hero - Give (Last created item) to (Triggering unit)
        • Else - Actions
          • Item - Remove (Item carried by (Triggering unit) of type ITEM TEST)
Cause that doesnt work...
 
Level 11
Joined
Dec 31, 2007
Messages
780
The event "unit uses item" will never check for the condition "target item of ABILITY being cast"... you need to use the event "unit starts the effect of an ability" coz it is targeted...


try like this...


Oh!... btw, you wont need the "item type of item beeing manipulated" coz it is supposed that if you are using the item ability, it is because you have the item in the inventory.

i didnt try that on WE. Try the way i told you and see if it works, else, ill try it my self and paste the code here


bb


EDIT: ive tried this out and it worked fine for me
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Holy Light (Item)
      • (Target item of ability being cast) Equal to Alleria's Flute of Accuracy 0003 <gen>
    • Actions
      • Unit - Kill Mountain King 0001 <gen>
indeed it killed my Muradin :p


Here it is
 

Attachments

  • Item targeting item test.w3x
    17.1 KB · Views: 42
Last edited:
Status
Not open for further replies.
Top