• 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 faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Problemm with system. Find exact unit.

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
I have provided you a test map, the trigger is bugged at first but has been fixed by Jay the Editor (about looping integer, use another integer variable)

INSTRUCTIONS;
1. Select a unit to assign index value to that unit
2. Re-select the unit (click/drag-select/etc) to view what index value does the unit currently holds

The idea is to loop through all index size and check whether (Triggering unit) or any other event-response (in your case, it should (Target unit of ability being cast)) is equal to Unit[LoopingValue]

If the LoopingValue reaches certain value and that unit is equal to (Target unit of ability being cast), the value has reached.

For example, you have target a unit that has index of 8, which means Target[8]
The next time you cast the spell, it would loop through all index size, which in this case currently max size is 8
So from 1 to 8.

(Target unit of ability being cast) Equal to Target[1] - NO
(Target unit of ability being cast) Equal to Target[2] - NO
---
---
---
(Target unit of ability being cast) Equal to Target[8] - YES

That means, that unit holds index value of 8.
 

Attachments

  • Checking Index.w3x
    12.9 KB · Views: 26
Status
Not open for further replies.
Top