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

[Solved] Seting Item Count

Status
Not open for further replies.
Level 7
Joined
Jan 29, 2010
Messages
213
[SOLVED]

Hi all! :)
I have some kind of a problem. I wan't to count items witch have been targeted by ability beiing cast:

  • counting items
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Counting Items
    • Actions
      • Item - Pick every item in (Region centered at (Target point of ability being cast) with size (200.00, 200.00)) and do (Actions)
        • Loop - Actions
I only need action like that:
  • set counted_items = counted_items + >Picked items<
Theres no such thing like picked item or Im a bit blind... :/

If you now how to make it pls WRITE dont hesitate (thank u!!!)


--- --- --- --- /// --- --- --- \\\ --- --- --- ---
((PLS dont write such thing like trigger leaks... (if theres some kind of thing like custom script witch destroys picked items group(I DO NOT CARE!!!)))
 
Last edited:
Level 17
Joined
Feb 11, 2011
Messages
1,860
Is this what you want?

  • Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to [your ability]
    • Actions
      • Set p = (Target point of ability being cast)
      • Item - Pick every item in (Region centered at p with size (200.00, 200.00)) and do (Actions)
        • Loop - Actions
          • Set count = (count + 1)
      • Custom script: call RemoveLocation(udg_p)
 
Level 7
Joined
Jan 29, 2010
Messages
213
Is this what you want?

  • Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to [your ability]
    • Actions
      • Set p = (Target point of ability being cast)
      • Item - Pick every item in (Region centered at p with size (200.00, 200.00)) and do (Actions)
        • Loop - Actions
          • Set count = (count + 1)
      • Custom script: call RemoveLocation(udg_p)

It's strange but it's working like it has to! thanks +rep
 
Status
Not open for further replies.
Top