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

[Spell] Solve MUI problem with arrays

Status
Not open for further replies.
Level 8
Joined
Apr 24, 2008
Messages
151
Hello everyone! Making a common spell, which locks the target in cage and damage him, ill made some arrays to make it MUI, but i cant solve my problem. Can u give me the answer, why MUI wont works? Do not focus what do a spell, i need to know, why mui not works. Ty

About the spell, spell should locks the target in a cage, if cage dies before prisoner dies, he gets free.
image_2023-08-16_11-20-13.png

image_2023-08-16_11-20-33.png
 

Attachments

  • cage_mui.w3m
    14.8 KB · Views: 0
Last edited:
Level 23
Joined
Feb 27, 2019
Messages
767
you use int as an index but int can only be a single number at a time. when another unit casts the spell int will change. this kind of way would work if you add a loop in cagecond from 1 to int but that would be very resource intensive since it would loop for as many times as the spell has been cast during the game every 0.03 seconds and stores a lot of variables in memory. there is another way called dynamic indexing which works similar but recycles the index keeping int at the number of currently active spells. using dynamic indexing the trigger is instead turned off when int equals 0. another way to make the spell mui is to use a unit indexer which is a system that would need to be implemented. with that you could use pick every unit in group and set the index (int) to custom value of unit. using that the trigger should be turned off outside the pick every unit function when the number of units in the group equals 0. a pmi way is like a unit indexer but player number is the index. that can be used if the spell can only be cast by 1 unit from each player at a time.
 
Status
Not open for further replies.
Top