• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Spell] Solve MUI problem with arrays

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 20
Joined
Feb 27, 2019
Messages
592
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.
 
Top