HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Custom summon skills that, kill the other summosn when recasted.

11-17-2004, 02:51 PM#1
tekkvicious
kinda of like the feral spirit.

I don't need something like.
unit cast a spell.
pick all units of type of the summoned unit
kill summoned unit


creaute 2-3 summoned unit for picked unit.

i want something that allow for multiple instances.. I know I would be able to do this with some kind of node.. that can hold the casting unit, and the summoned units connect to it. but are there functions for that, and even if there are, are there any type of group that can hold it? or are there any other better methods.
11-17-2004, 03:25 PM#2
DaKaN
Quickly thinking this over

you would need to detect when a unit summons another unit, store the summoned unit in a unit aray, and keep track of the # of summoned units with a counter, when the counter hits 3, kill the first unit, and store the newest there. Then you will need another counter to know where in the index is the oldest summoned unit. You would have to incrment that to 2 now, when the player summons again, kill the unit in array index2, store the new one there, change your oldest counter to 3, when it happens again, reset everything back to 1 and start over.

Thats 1 method, probably not the most efficent, but it will get the job done

Don't forget you will also have to watch for when the unit dies of natural causes (timer expire) and when its killed, and then clean up the array and counters accordingly. It can be tricky
11-17-2004, 03:59 PM#3
tekkvicious
yea,.. i already thought of that,, but im thinking there has to be an easier or simpler or just more effective way, since blizzard is able to have feral spirit, kill all summoned units from that spell when recasted. and they also have carrion beetles that have a max summon capp.
11-17-2004, 04:03 PM#4
DaKaN
yeah, but that was hard coded into the game.dll and not with thier JASS triggers. which makes things a little trickier
11-17-2004, 07:06 PM#5
Beta_Tester
one way you could do it is make the units use custom values and set the summoned units custom value to the player number of the summoning player. Then you can pick only those units by making a unit group trigger thats say pick all units owned by casting player and have a custom value that is equal to the playernumber of casting player.
11-17-2004, 10:00 PM#6
Captain Griffen
Can't you base it on feral spirits?

0 length of time for infinite length...
11-17-2004, 11:45 PM#7
DaKaN
thats summons X units all at the same time, and replaces them all at the same time. He is looking to summon 1 unit at a time, but when you hit the max, start replacing them 1 at a time
11-18-2004, 04:56 AM#8
tekkvicious
I think beta_tester's idea seems like the best choice.
11-18-2004, 12:50 PM#9
Vexorian
Couldn't you just save the summoned unit in an array?

Or do you want multi ple instances unit - wise instead of player - wise?

In that case you can just use something like the handle variables functions