HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Single Target Abilities to AOE ability (Efficient)

02-09-2004, 09:29 PM#1
Kolibri
http://www.wc3campaigns.com/forums/s...threadid=47257

I'm linking to it here too, because I'm proud of it (and it uses JASS). :D

I'm considering having X dummy units to cast all the abilities instead of 10 dummy units for each ability (it reuses the units though). Another idea would be to use the following formula.

f(n) is the number of units at the n'th time more than the previous units were used at a time, where

f(0) = 4

f(n) = 4*2^n

So for example if you were to cast the following spells on the following number of units:

1. Mass entangle on 10 units
2. Mass thunderbolt on 7 units
3. Mass Thunderbolt on 15
4. Mass Entangle on 200

The number of dummy units would be:

Start: 4 units
1. 8 units
2. 8 units (unchanged)
3. 16 units
4. 16 units (unchanged)
5. 32 units

Any comments? I think it will be quite a bit more effective, in the sense that you wouldn't need to create as many of dummy units (hopefully).

EDIT: There should probably be some upper limit on the number of dummy units.
Also instead of counting all dummy units there are currently, maybe it would be better if you only counted those who are ready (when checking to see if you should double the amount of dummy units).
02-10-2004, 12:51 AM#2
weaaddar
Please leave all showing off to the repository.
This is mainly a discussion of jass difficulties/bugs/all ai stuff. Complete projects go to the repository, or the jass vault if they are palpable in code snippet form. http://kattana.users.whitehat.dk/forside.php
And technically the best approach would to make this a class where you chose the amount of targets per level or whatever.
02-10-2004, 02:03 PM#3
Kolibri
Well, I did have a question. :)

What would be the most effective algorithm for iincreasing the amount of dummy units?

If you know a bit of JASS you can use the script to cast an ability on a unitgroup instead of an area.