Getting Creeps to Cast Your Spells

the_ideal

user title
Reaction score
61
Hi,

Simple question here:
So I have a granite golem creep owned by neutral hostile on my map, and it casts hurl boulder on my hero when my hero approaches it.

This is great. How do I get a custom creep to cast a custom spell without specifically having to trigger each cast?

Thanks! +rep to anything helpful
 

Moridin

Snow Leopard
Reaction score
144
I think the AI editor could do it.

All you have to do is create a custom race with all your units in it along with their abilities and tell them when they should use which ability?
 

Moridin

Snow Leopard
Reaction score
144
I do realise that it is melee AI. However, are you sure that you can't order units to cast?

How does the melee AI cast hero spells? :S
 

Ayanami

칼리
Reaction score
288
13blade619 is correct. For example, give "Impale" to a Neutral Hostile or a Computer Controlled unit, they'll use the ability automatically.
 

the_ideal

user title
Reaction score
61
So what if I create dummy abilities based slow (or a better ability) that creeps use, but then trigger other stuff? Would that work?
 

13lade619

is now a game developer :)
Reaction score
399
yes that;s correct.

but take note that it will only be casted at the 'optimal conditions' which are hardcoded.
(only god knows what they are and how they are determined... lol)

for a concrete example (tested on my custom heroes)

he only casts my Blizzard based ability when there are a bunch of units somewhere
and only casts Starfall when many units are around him.

he never casts them in a 1v1 situation with an enemy hero
 

Bogrim

y hello thar
Reaction score
154
For the reasons that Blade mentioned, it's best to pick your base spell by the AI's behavior when creating custom trigger spells for computer controlled units. For instance, if you want a unit to auto-cast an ability, you could use Slow and trigger the effect.
 

Gwafu

Active Member
Reaction score
12
If it's a neutral hostile, it will cast it. Computer Players don't know if it's a triggered spell or not, they only know that it is based on an default ability (Hurl boulder, etc.). (Haven't tested with Channel though)
 

the_ideal

user title
Reaction score
61
This is very useful information. Especially what Blade said.

So, given that you guys for sure have more experience with creep abilities than I do, what ability would you recommend I use as a base spell for unit-targeted abilities?
 

Zwiebelchen

You can change this now in User CP.
Reaction score
60
So, given that you guys for sure have more experience with creep abilities than I do, what ability would you recommend I use as a base spell for unit-targeted abilities?
It has already been mentioned that sleep does the job best, as the AI will spam that spell and it can be used to trigger any other ability.

If you use a custom AI like my ZTS system, you can also use the premade cycle event.
 
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