• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Item Custom Value

Status
Not open for further replies.
Level 7
Joined
Mar 5, 2009
Messages
254
Hello guys,ok i need a help with this : How to edit this trigger,so i can add few items that when they are picked that trigger won't run for them,custom value won't be set for them.
  • item ownership
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set tempItem = (Item being manipulated)
      • Set tempInt = (Custom value of tempItem)
      • Set tempForce = (Player group((Owner of (Triggering unit))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (tempInt Equal to 0) or (tempInt Equal to (Player number of (Owner of (Triggering unit))))
        • Then - Actions
          • Item - Set the custom value of tempItem to (Player number of (Owner of (Triggering unit)))
        • Else - Actions
          • Hero - Drop tempItem from (Triggering unit)
          • Game - Display to tempForce the text: You are not allowed...
      • Custom script: call DestroyForce(udg_tempForce)
Idk because im sleepy or what but i can't think of a way right now.
 
Set those items in a variable or store the item-types in a variable (array) and an if then else that checks if the (Item being manipulated) is Not Equal to (Item) [Item comparison, if you use item variable(s)] and (Item-type of (Item being manipulated)) is Not Equal to ItemTypeVar[] [Item-type comparison, if you use item-type variable(s)]. Run a loop and include the if/then/else statement within it. Skip remaining actions if the loop has found equality between the acquired item and the variable'd one.
 
Status
Not open for further replies.
Back
Top