• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Autocast custom skills (for computers/AI)

Status
Not open for further replies.
Level 2
Joined
Feb 10, 2008
Messages
11
Hi everyone,

How can a unit autocast a custom skill? (Like the wizards from castle fight).

For example a shaman that can autocast a customized chain lightning named Lightning stikes.

Greetz!!
 
I havn't messed around with autocasting abilities as of yet but it doesnt look like it allows you to edit that property in the object editor. I would make a dummy spell based on an autocast spell (i.e. faerie fire: but alter stats so it does nothing). Then make a trigger that runs whenever that ability is cast. In the trigger create a dummy unit, give it the chain lightning, and have him cast it on the target unit. It should be pretty simple.
 
How can he edit fire arrow to chain lighting? (or what do you mean?)

I would make it like:
__________________________________________
If
Shaman's mana >= <Spell mana cost>

Then:
Create dummy
Order dummy to cast chain lighting
Set mana of shaman = mana of shaman - <Spell mana cost>
__________________________________________

Note 1: don't forget to remove memry leak (location)
Note 2: You can make for shaman a skill, that will do nothing, with a description of chain lighing that will be casted by dummy.
Note 3: This spell is MUI, causedummy needs some time to cast a spell. Use local location for the point where dummy will be created.
 
How can he edit fire arrow to chain lighting? (or what do you mean?)

I would make it like:
__________________________________________
If
Shaman's mana >= <Spell mana cost>

Then:
Create dummy
Order dummy to cast chain lighting
Set mana of shaman = mana of shaman - <Spell mana cost>
__________________________________________

Note 1: don't forget to remove memry leak (location)
Note 2: You can make for shaman a skill, that will do nothing, with a description of chain lighing that will be casted by dummy.
Note 3: This spell is MUI, causedummy needs some time to cast a spell. Use local location for the point where dummy will be created.

Thanks for the reply but the spell itself don't has to be autocast, I just need a trigger so that my unit will cast a unit owned spell automaticly when he gets in range of an enemy.

Thanks.
 
Status
Not open for further replies.
Back
Top