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

Recognize an "array"

Status
Not open for further replies.
Level 2
Joined
Feb 23, 2004
Messages
26
First of all hello, this is my first post from long time.
As you may have guessed I got a little problem in a map I'm on.


Actions
Set CurrentInteger = 1
Set IS_ItemType[CurrentInteger] = dagger Unequiped
Set IS_ItemType_Equivalent[CurrentInteger] = dagger Equiped

Set CurrentInteger = 2

Set IS_ItemType[CurrentInteger] = sword Unequiped
Set IS_ItemType_Equivalent[CurrentInteger] = sword Equiped
[etc]

I've done this trigger for a simple Weapon equiping system. But for some reasons I can't find how to recognize the "array" of an item.
Example : the item "blade" is being used, I would like to get the X of "IS_ItemType[X]" (Which may be 54 for example) without using the item levels (already used for essential triggers).

Thanks for any future help !
 
Level 5
Joined
May 9, 2006
Messages
162
Start a loop from 1 to maximum number of items. Then add an if: if item-type of item being manipulated equal to your item then (your actions).
 
Status
Not open for further replies.
Top