• 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.

Question about GUI

Status
Not open for further replies.
Level 4
Joined
Jul 19, 2007
Messages
76
Is there any option in GUI, which can do requirement about stats of hero?
example with item:
Item name:...
Item type:...
Item requirements: 10 str,10 agi,10 int
description:...
And if hero stats is less than 10, order it to drop picked item?
Thanks in advance.
 
  • Trigger
  • Events
    • Unit - A unit acquires an item
  • Conditions
    • (Item-type of (Item being manipulated)) Equal to X
  • Actions
    • Set Stats[1] = (Agility of (Triggering unit))
    • Set Stats[2] = (Strength of (Triggering unit))
    • Set Stats[3] = (Intelligence of (Triggering unit))
    • For each (Integer A) from 1 to 3, do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • Stats[(IntegerA)] Less than 10
          • Then - Actions
            • Hero - Drop (Item being Manipulated) from (Triggering unit)
            • Custom script: call BJDebugMsg ("You do not have enough of strength to own this item.")
            • Else - Actions
 
Level 6
Joined
Jan 27, 2007
Messages
208
Hm, whats the different between this
  • Custom script: call DebugMsgBJ ("You do not have enough of strength to own this item.")
and this?
  • Game - Display to (Player group((Owner of (Triggering unit)))) for 3.00 seconds the text: You do not have enough of strength to own this item.
 
Level 4
Joined
Jul 19, 2007
Messages
76
hmm Pharaoh, i have enough stats, but I can't pick again item?
  • Untitled Trigger 005
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Claws of Attack +15
    • Actions
      • Set Stats[1] = (Strength of (Triggering unit) (Include bonuses))
      • Set Stats[2] = (Agility of (Triggering unit) (Include bonuses))
      • Set Stats[3] = (Intelligence of (Triggering unit) (Include bonuses))
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Stats[1] Not equal to 20
            • Stats[2] Not equal to 10
            • Stats[3] Not equal to 15
          • Then - Actions
            • Hero - Drop (Item being manipulated) from (Triggering unit)
          • Else - Actions
 
I'd say none. It's just the triggers are hand-written and I am tired of writing down that line, so I use this custom script, which takes less time! :)

Edit:
Wait, you will either use For each Integer A, do if Stats[IntegerA] or If Stats[1] Less than 20, Stats[2] Less than 15, bla bla.
In your case, use this:
  • Actions
  • Set Stats[1] = (Strength of (Triggering unit) (Include bonuses))
    • Set Stats[2] = (Agility of (Triggering unit) (Include bonuses))
    • Set Stats[3] = (Intelligence of (Triggering unit) (Include bonuses))
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Stats[1] Less than 20) and (Stats[2] Less than 10) and (Stats[3] Less than 15))
    • Then - Actions
      • Hero - Drop (Item being manipulated) from (Triggering unit)
    • Else - Actions
 
Level 6
Joined
Jan 27, 2007
Messages
208
Use (Integer A) instead of [1]/[2]/[3]

And, do you want your item can be picked only if you have 20 Strength, 10 Agility, and 15 Intelligence? Or do you want your item can be picked at least the hero have 20 Strength, 10 Agility, 15 Intelligence?
 
Level 4
Joined
Jul 19, 2007
Messages
76
ups, I'm made wrong the trigger up it need to be less than, but it doesn't work again, I think that I made something wrong but I don't know what..

Pharaoh, can you make a demo map?

l0git3c, I want hero to can pick up item if he have at least 20str, 10agi, 15int.
 
Status
Not open for further replies.
Top