Make a unit cast an ability

Level 1
Joined
May 29, 2006
Messages
5
Hi all, I'm making a map in the style of Tales of Kaltazar: Boreal Conflict and am having trouble making the AI controlled units cast spells. Spells that are autocast like slow will cast, but other like healing wave won't cast.

I have a unit that has the ability healing wave and he never casts it.
 
Level 1
Joined
May 29, 2006
Messages
5
So, make a trigger which checks if the unit is in combat, and if it is have a chance to cast heal?
 
Level 1
Joined
Feb 1, 2008
Messages
2
It should be something like this..

For the sake of this, I'll just use a peasant...

  • Event - Unit - Peasant 0000 <gen>'s life becomes Less than 100.00
  • Action - Unit - Order Priest 0001 <gen> to Human Priest - Heal Peasant 0000 <gen>
 
Level 1
Joined
May 29, 2006
Messages
5
It should be something like this..

For the sake of this, I'll just use a peasant...

  • Event - Unit - Peasant 0000 <gen>'s life becomes Less than 100.00
  • Action - Unit - Order Priest 0001 <gen> to Human Priest - Heal Peasant 0000 <gen>

I don't think that's gonna work...is there anyway to make a unit cast an ability if it can? Or a way to make an ability autocast?
 
Level 7
Joined
Nov 13, 2006
Messages
243
if you make it autocast it will be fucked up and it will consume mana uber fast because it will trigger every time it is finished cooling down ...

do it like this

Event - Periodic Event 0.1 seconds
Condition - Game Over equal to False
Action -
If/Then/Else
If-
If unit in range <range here> of triggering unit> life equal or less then <hp you want>
Then-
Order unit to "Shadow Hunter - Healing Wave" Triggering unit
Else - Do Nothing
 
Level 1
Joined
May 29, 2006
Messages
5
hmm, that would probably works, thanks

edit: this trigger seems to work

  • Events
    • Unit - A unit Is attacked
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Life of (Triggering unit)) Less than or equal to ((Max life of (Triggering unit)) - 70.00)
        • (Distance between (Position of (Triggering unit)) and (Position of (Random unit from (Units of type Paladin)))) Less than or equal to 700.00
      • Then - Actions
        • Unit Group - Pick every unit in (Units of type Paladin) and do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Distance between (Position of (Triggering unit)) and (Position of (Picked unit))) Less than or equal to 700.00
              • Then - Actions
                • Unit - Order (Picked unit) to Human Paladin - Holy Light (Triggering unit)
              • Else - Actions
                • Do nothing
      • Else - Actions
        • Do nothing


Edit 2: Nevermind, I can't use the Unit - Order (Picked unit) to Human Paladin - Holy Light (Triggering unit) to cast a custom ability?
 
Last edited:
Level 1
Joined
May 29, 2006
Messages
5
hmm...what if its based of the Healing Wave (Neutral) ability? Is there a way to make that unit cast that?
 
Top