How to Make a boss cast a spell At some event?

Kalder

New Member
Reaction score
1
For my ORPG map i am going to have a boss that uses specific custom abilities. How do i make it so that after some event(Game time, on attack etc.) He will cast the spell on his target because if i use the order to attack or cast a spell on a target it only will let me choose the abilities already in the game. How do i make it so he will cast the ability after some kind of event. Thank you for all info given. :thup::D:thup:
 

jig7c

Stop reading me...-statement
Reaction score
123
what event exactly are you talking about?

if it is after XXX seconds of game time, you might want to put that boss into a unit variable at map init, and then order it to cast that ability...
does the boss already have that ability from that start?

Trigger:
  • Unit - Add Blink to Some unit
    • Set level of Blink for Some unit to 1,2,3, etc...
    • Order Some unit to cast Blink (target point of ability being cast/target unit of ability being cast)
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Trigger:
  • Unit - Add Blink to Some unit
    • Set level of Blink for Some unit to 1,2,3, etc...
    • Order Some unit to cast Blink (target point of ability being cast/target unit of ability being cast)

Wooow extremely free hand lol.
 

Kalder

New Member
Reaction score
1
Yes he does have this ability from the start of the game

Yes he does have this ability from the start of the game and how do i make it so he casts it every XXX Seconds of game time
 

jig7c

Stop reading me...-statement
Reaction score
123
is that boss already placed on the map when the game begins, or he comes in later?
what spell are you casting also?
 

Kalder

New Member
Reaction score
1
He casts...

He is on the map from the start and he casts 4 different spells that are trigger enhanced
 

jig7c

Stop reading me...-statement
Reaction score
123
is the ability being casted on an enemy unit (i.e. shadow strike) or at a point (i.e. carrion swarm)
 

Light Alkmst

New Member
Reaction score
20
when you create custom abilities, they retain the same ability order keyword. i.e. creating an enhanced blink. even if the new ability is not actually called blink or has a completely different triggered functionality, through triggers, it is still ordered with the same keyword
 

Kalder

New Member
Reaction score
1
could work

the boss i have curently has 1 spell based off neutral hostile firebolt, 1 off of chainlightning and one off of acid bomb. So would i just do the basic spells or not?

Edit: I have 2 different spells done so far
Trigger:
  • Power Cannon Blast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Power Cannon Blast
    • Actions
      • Unit - Pause (Triggering unit)
      • Unit - Make (Triggering unit) Invulnerable
      • Unit - Create 1 Power Cannon Strike (Blue) for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by (-600.00, 0.00)) facing 90.00 degrees
      • Wait 2.00 seconds
      • Unit - Create 1 Power Cannon Strike (Green) for (Owner of (Triggering unit)) at ((Center of (Playable map area)) offset by (0.00, -600.00)) facing Default building facing degrees
      • Wait 2.00 seconds
      • Unit - Create 1 Power Cannon Strike (Red) for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by (600.00, 0.00)) facing Default building facing degrees
      • Wait 2.00 seconds
      • Unit - Create 1 Power Cannon Strike (Black) for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by (0.00, 600.00)) facing Default building facing degrees
      • Wait 2.00 seconds
      • Lightning - Create a Mana Flare lightning effect from source ((Position of (Triggering unit)) offset by (-600.00, 0.00)) to target ((Position of (Triggering unit)) offset by (0.00, -600.00))
      • Wait 1.00 seconds
      • Lightning - Create a Mana Flare lightning effect from source ((Position of (Triggering unit)) offset by (0.00, -600.00)) to target ((Position of (Triggering unit)) offset by (600.00, 0.00))
      • Wait 1.00 seconds
      • Lightning - Create a Mana Flare lightning effect from source ((Position of (Triggering unit)) offset by (600.00, 0.00)) to target ((Position of (Triggering unit)) offset by (0.00, 600.00))
      • Wait 1.00 seconds
      • Lightning - Create a Mana Flare lightning effect from source ((Position of (Triggering unit)) offset by (600.00, 0.00)) to target ((Position of (Triggering unit)) offset by (-600.00, 0.00))
based off of thunder clap

Trigger:
  • Rotting Corrupted Blast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • (Ability being cast) Equal to Rotting Corrupted Blast
    • Actions
      • Wait 3.00 seconds
      • Unit - Pause (Target unit of ability being cast)
      • Wait 3.00 seconds
      • Unit - Unpause (Target unit of ability being cast)
      • Wait 3.00 seconds
      • Unit - Pause (Target unit of ability being cast)
      • Wait 3.00 seconds
      • Unit - Unpause (Target unit of ability being cast)
      • Wait 3.00 seconds
      • Unit - Pause (Target unit of ability being cast)
      • Wait 3.00 seconds
      • Unit - Unpause (Target unit of ability being cast)
based off of acid bomb

So how would i make it so every XXX seconds of game after engaging him he would cast the spell(s)
or if someone did a specific thing to him he would cast the spell
 

jig7c

Stop reading me...-statement
Reaction score
123
what you would want to do is:

for the thunder clap-based ability..

Trigger:
  • Trigger1
    • Events
      • Every XX seconds of the game-time
    • Conditions
    • Actions
      • Unit - Order Boss <1000> to cast Human - Thunder Clap


for acid bomb...
Trigger:
  • Trigger2
    • Events
      • Every XX seconds of the game-time
    • Conditions
    • Actions
      • Unit - Order Boss <1000> to cast Acid Bomb


for firebolt
Trigger:
  • Trigger3
    • Events
      • Every XX seconds of the game-time
    • Conditions
    • Actions
      • Set Tempgroup = Units within 300 of Boss <1000>
      • Set Tempunit = Random unit from Tempgroup
      • Unit - Order Boss <1000> to cast Neutral - Firebolt on Tempunit
      • Custom script: set udg_Tempunit = null
      • Custom script: call DestroyGroup (udg_Tempgroup)


all the triggers above will cast a spell after XX seconds...
now if you want him to cast a spell when he is engaged, you have to change the event to A unit is attacked, but if you do that, the boss will always cast a spell...

if you want the boss to cast a spell at random times when he is engaged... change the top part of the trigger to something like this...

Trigger:
  • Trigger1
    • Events
      • A unit is attacked
    • Conditions
      • Attacked unit equal to Boss<1000>
      • Random integer between 1 and 100 equal to or less than 25
    • Actions
      • .....

this will give the boss a 25% chance to cast a spell when the boss is engaged...
 

Kalder

New Member
Reaction score
1
Boss <1000>?

What exactly is boss<1000>?

Is it the name of the unit that is on the map at the start like i said?

Which would be more convenient or better to use: spawn the boss at some time or at an event or instead i put him on the map from the start of the game?:confused:
 

Corleone

New Member
Reaction score
44
Boss<1000> refers to the Boss unit in your map. It would probably be easier to just put it in the map right at the started, instead of through triggers.
 

jig7c

Stop reading me...-statement
Reaction score
123
both methods are easier..

if the boss is already on the map, when you make the triggers, that's how it'll look.. Boss <####>...

if the boss is being created thru a trigger later on, right after the boss is created, just set that boss to an unit variable.. and you can use that unit-variable later on for the spell triggers..
 

Nyrano

New Member
Reaction score
4
For some similarity...

I am creating a co-op RPG map with bossfights as well. And what you are suggesting (casting some spell every X seconds) is easily done by the trigger that jig7c wrote.

What I just want to add:

The every X seconds triggers are initially off.

Trigger:
  • Event: Boss takes damage.
    • Conditions:
    • Actions: Turn off (This trigger)
    • Turn on (the triggers that cast spells every X seconds)


And in my map I have got an aggro system called ZTS (all credit to the creators of that system) which reset health to 100% when out of range or no more players around.
In that way you can make a trigger which only runs when the unit has taken damage and checking every X seconds when the boss has 100% HP (so he resetted through the system), to disable all the triggers again and remove all the buffs from him.

It's not very hard and not very easy, but it is possible for you to do... Quite a neat reset system for bosses to be honest. :)
 

Kalder

New Member
Reaction score
1
Good idea Nyrano!

Nyrano that is a very good idea, they both work but yours just seems to be a bit cleaner towards one of the ideas i had "Every XXX seconds of game time make XXXXXX Cast XXXXX" because it doesn't have it constantly running and i think that uses up less space in the map reducing lag even though it reduces it by a miniscule amount. Good Luck to you on your (O)rpg map also.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top