HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How do I summon other units?

07-19-2002, 01:17 PM#1
Guest
I dont know if this is a dumb question but, I wanted to summon another unit other than water elemental and feril spirit.
Does anyone know how to do that? If you do please post it.;)
07-19-2002, 03:19 PM#2
Guest
an easy way would be changing the models of the summoned unit to what you want them to be in unit editor.
07-19-2002, 03:29 PM#3
Guest
OK I'll try that.Thanks:D
07-19-2002, 09:28 PM#4
Khaoz
Here is a way to make the Summon Water Elemental turn into a Summon Warrior Ability, that at Lvl 1, summons a Footman, and at lvl 2 summons a knight, and lvl3, well I didnt add one but you should get the basic idea from what I put. Some basic tweaking of this and you could fit it to any summoning need.


Events:
Unit - A unit owned by Player 1 (Red) Is Summoned

Unit - A unit owned by Player 2 (Blue) Is Summoned


Conditions:
(Unit Type of (Summoning Unit)) Equal to Your Custom Unit*


Actions:
If [(Unit Type of (Summoned Unit) Equal to Water Elemental (Level 1)] then do [Replace (Summoned Unit) with a Footman Using (the new unit's default)] else do [Do Nothing]

If [(Unit Type of (Summoned Unit) Equal to Water Elemental (Level 2)] then do [Replace (Summoned Unit) with a Knight Using (the new unit's default)] else do [Do Nothing]

Special Effect - Create special effect attached to the overhead of (Last Replaced Unit) Using Abilities\Spells\Human\Resurrect\Resurrecttarget.mdx**


* Custom Unit refers to the unit you want to be able to summon Footmen or Knights. It doesnt have to literally be a Custom Unit, any unit with the 'Summon Water Elemental' HERO SKill that is added to the comparision will be able to Summon them. This also makes it so you can still have Water Elemental Summons used normally by regular units.
** This is optional because the replacement is done so fast that the summoning animation will appear to be attached to the new unit, but it is nice to have a more fitting special effect, for example, using dark portal effect for summoning daemons....


This trigger works great, and looks even better. The only problems is that the new summoned units wont have a timer. They will last forever or until they are killed. Also the original special effect will remain no matter what so if you dont want it to show you will have to do some slk editing or choose a summoning spell that provides a fitting animation or that has one that is hardly noticable where you can use one.
07-19-2002, 10:51 PM#5
Guest
Yeah, as has been pointed out by others, you can make 'custom' summoned units using 2 variables, or multiples of custom summons using 2 arrays, and a variable.

Array1 = unit array
Array2 = integer array
variable = integer.

The first array lists all the different summoned units currently in play.
Array1[variable] = summoned unit
array2[variable] = 60
Variable++
you'll cycle through the array allocating each new summoned unit to an individual index.

The second array is the timer set for each .
Set up a Periodic event of 1 second intervals. Each time it goes off, decrement each value in Array2
for (x = 0; x<=variable; x++)
if ( array2[x] = 0)
kill array1[x];
else
array2[x] = array2[x] -1;

This will cause each individual timer to slowly count down, eventually reaching 0, where the respective unit will be killed. The timers are set to whatever value you want them to be when you instantiate the new summoned unit (that first bit) with 60 second spawn time.

Um, is that pretty clear?

The idea isn't actually mine, but it makes sense, and, of course, works great.
07-20-2002, 01:38 AM#6
Guest
Um... This is getting confusing...:confused: :confused: I'll just stick to the easy one.:)
07-20-2002, 01:44 AM#7
Guest
With the summoning, i just finished my wc3 map scenario. It replaces the humans and orcs with elves and trolls. Download the attachment below. Please post me on how you like the idea then i'll make better maps with the same races. Or i'll improve the races. crits and comments are welcome
07-21-2002, 02:07 PM#8
Guest
Darn the only thing is that the computer dosn't move...
07-21-2002, 08:47 PM#9
OrcishSpacesuit
That method with the arrays appears good, but here's a better way to kill off a summoned unit: Give the summoned unit mana, and have it start with 0. Whenever one of those units has max mana, kill it. Make max mana be how many seconds you want it to last, and mana regen 1 per second. If you wanted to get facny, you could set it up so mana goes down, so it's a real countdown timer.
07-21-2002, 10:12 PM#10
Guest
Yeah but how do you get in to that array stuff?
07-22-2002, 12:02 AM#11
Guest
Quote:
Originally posted by OrcishSpacesuit
That method with the arrays appears good, but here's a better way to kill off a summoned unit: Give the summoned unit mana, and have it start with 0. Whenever one of those units has max mana, kill it. Make max mana be how many seconds you want it to last, and mana regen 1 per second. If you wanted to get facny, you could set it up so mana goes down, so it's a real countdown timer.


Great Idea! Wish I'd thought of it first :). That's a hell of a lot simpler :).