.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Dominions 3: The Awakening (http://forum.shrapnelgames.com/forumdisplay.php?f=138)
-   -   Quick scripting question (http://forum.shrapnelgames.com/showthread.php?t=48821)

Snacktime May 18th, 2012 04:03 PM

Quick scripting question
 
Is it possible to script a commander to cast a spell that you have not researched at the time you are scripting, but that you know you will have researched by the combat phase of the turn? Will it work?

Immaculate May 18th, 2012 04:11 PM

Re: Quick scripting question
 
no- you cannot select a spell you have not researched. the best you can do is to script "cast spell" using the generic command and hope they go for the right one- in some cases it works.

Soyweiser May 19th, 2012 07:10 AM

Re: Quick scripting question
 
It depends on the spell if Immaculate's trick works. If it is a spell they would cast after the 5 rounds of scripting are over, then it will probably get cast. Otherwise, nope. (This means you can test if they will cast your spell).

Snacktime May 19th, 2012 08:24 AM

Re: Quick scripting question
 
Thanks guys!

JonBrave May 22nd, 2012 06:18 PM

Re: Quick scripting question
 
As I learnt recently, if you script to cast a spell and it can't be cast (e.g. insufficient level or gems, or already cast), the mage will "substitute" not "skip". So you could do that in the script and hope he will pick a newly discovered spell... ;)

krpeters May 22nd, 2012 08:23 PM

Re: Quick scripting question
 
Keep in mind that "substitute" means "commit suicide" whenever possible.

For example, an Eagle King casting Ironskin on his own, then frying himself with Shock Wave.


All times are GMT -4. The time now is 10:15 AM.

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