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

[HELP] Is there a way...

Status
Not open for further replies.
Level 37
Joined
Mar 6, 2006
Messages
9,243
Create arrays for both item types and abilities.

When you acquire an item, loop through the item type array to get a match, then get the ability at the same index in the ability array. Use skip remaining actions to skip the remaining checks after a match is found.

Pseudo code:

Set itype = Item type of manpulated item
loop
if itype == ItemTypes[loopIndex] then
Unit add ability AbilityArray[loopIndex]
Set level of ability to...
skip remaining actions
endloop

Same thisng for losing the ability.
 
Status
Not open for further replies.
Top