How to make bosses cast spells

Status
Not open for further replies.
Simple way; make it each time the unit is attacked, order the boss to cast war stomp (doesnt use if cooldown). You can add conditions to use at certain hp. Note; you need to put an ability based of the order on the unit

Edit: would trigger but on my phone
 
Firstly, give the ability to the Boss then make trigger

  • Casting Spell
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Triggering unit) Equal to (Your unit)
    • Actions
      • Unit - Order (Triggering unit) to Orc Tauren Chieftain - War Stomp
Note: The Boss will automaticly cast war stomp if there are more than 3 enemies attacking him

If you want him to cast something like storm bolt, He will automaticly cast the spell if he has it
 
you can randomize the spells that will be casted too.

  • Boss
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set tempPoint = (Center of (Playable map area))
      • Unit - Create 1 Storm Wyrm for Neutral Hostile at tempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation (udg_tempPoint)
      • Trigger - Add to Randomize <gen> the event (Unit - (Last created unit)'s life becomes Less than 50.00)
  • Randomize
    • Events
    • Conditions
    • Actions
      • Set Chance = (Random real number between 0.00 and 100.00)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Random 1 units from (Units within 512.00 of (Position of (Triggering unit)))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Chance Less than or equal to 50.00
                • Then - Actions
                  • Unit - Order (Triggering unit) to Orc Far Seer - Chain Lightning (Picked unit)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Chance Greater than 50.00
                • Then - Actions
                  • Unit - Order (Triggering unit) to Neutral Naga Sea Witch - Forked Lightning (Picked unit)
                • Else - Actions
            • Else - Actions
 
Last edited:
  • Boss
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set tempPoint = (Center of (Playable map area))
      • Unit - Create 1 Storm Wyrm for Neutral Hostile at tempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation (udg_tempPoint)
      • Trigger - Add to Randomize <gen> the event (Unit - (Last created unit)'s life becomes Less than 50.00)
no, the event is already added from the "Boss" trigger, see above. if you want to make the boss casting spells depending on their life percentage, you need to create the boss via trigger and add event regarding to your boss.

  • Unit - Create 1 Storm Wyrm for Neutral Hostile at tempPoint facing Default building facing degrees
then

  • Trigger - Add to Randomize <gen> the event (Unit - (Last created unit)'s life becomes Less than 50.00)
this way, when the boss gets to 50 % of his life, he will cast chain lightning or forked lightning by 50 % chance each. and this will only happen once to prevent the boss from casting it again after he/she regenerate his life.
 
Status
Not open for further replies.
Back
Top