.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
World Supremacy- Save $9.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 2: The Ascension Wars

Reply
 
Thread Tools Display Modes
  #1  
Old January 11th, 2005, 12:41 PM
stecal's Avatar

stecal stecal is offline
Private
 
Join Date: Jun 2001
Location: Philadelphia, PA USA
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
stecal is on a distinguished road
Default 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
Reply With Quote
  #2  
Old January 11th, 2005, 01:31 PM
Arralen's Avatar

Arralen Arralen is offline
Major General
 
Join Date: Nov 2000
Location: 500km from Ulm
Posts: 2,279
Thanks: 9
Thanked 18 Times in 12 Posts
Arralen is on a distinguished road
Default 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.
__________________
As for AI the most effective work around to this problem so far is to simply use an American instead, they tend to put up a bit more of a fight than your average Artificial Idiot.
... James McGuigan on rec.games.computer.stars somewhen back in 1998 ...
Reply With Quote
  #3  
Old January 12th, 2005, 02:26 PM

Wendigo Wendigo is offline
Sergeant
 
Join Date: Sep 2003
Posts: 289
Thanks: 0
Thanked 0 Times in 0 Posts
Wendigo is on a distinguished road
Default 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).
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 02:04 AM.


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