.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Dominions 2: The Ascension Wars (http://forum.shrapnelgames.com/forumdisplay.php?f=55)
-   -   Spell scripting question (http://forum.shrapnelgames.com/showthread.php?t=22323)

stecal January 11th, 2005 12:41 PM

Spell scripting question
 
How do make a spell caster cast certain protective/enhancing spells on specific units? Do they just cast it on the nearest unit or does the unit have to be under his command? Is there some routine that chooses the best target for such a spell?

Thanks,

Steve

Arralen January 11th, 2005 01:31 PM

Re: Spell scripting question
 
.. mostly random. And don't forget about Murphy.

To get the best chances, make shure the unit is the only valid target in range. Could be difficult, though, as the mage may turn out to be a bit selfish.

Sometimes it works to put mage and target into the very same square, with some free space around them.

Wendigo January 12th, 2005 02:26 PM

Re: Spell scripting question
 
Quote:

stecal said:
How do make a spell caster cast certain protective/enhancing spells on specific units? Do they just cast it on the nearest unit or does the unit have to be under his command? Is there some routine that chooses the best target for such a spell?


The tactical spell Ai is pretty good for this:
-Area effect buffs will try to target the biggest concentration of troops in range (example: legions of steel)
So long as you are careful with troop placement and not place a big unit of archers next to the knights you want to buff you shall do fine.

-Area 1 and 1-unit buffs will however prioritize depending on hit points: pretenders & big monsters will be given preference even over the caster (example: luck).


All times are GMT -4. The time now is 07:52 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.