• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Solved] Seting Item Count

Status
Not open for further replies.
Level 6
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 6
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