• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Enemy spell casters

Status
Not open for further replies.
Level 10
Joined
Apr 3, 2006
Messages
535
Im having some trouble with an enemy hero spell caster. im making a few enemys that cast a few spells, and sometimes they dont cast spells, and other times they do but only when very very low on life?? i have given the enemys the abilitys, and at least 1 level on the point for the ability and full mana but still it seems very unreliable. IS there a special way to encourage them to use abilitys? i have tried triggers, but only a select few abilitys can be forced with triggers
 
Level 4
Joined
Dec 15, 2007
Messages
108
  • trigger
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to unit which u want to cast that spell
      • (Life of (Triggering unit)) Less than 50.00
    • Actions
      • Unit - Add spell to (Triggering unit)
      • Wait 7.00 seconds
      • Unit - Remove spell from (Triggering unit)

if it is an heal spell u have to create a dummy unit wich cast the spell
 
Last edited by a moderator:
Level 10
Joined
Apr 3, 2006
Messages
535
i will give this a go, but is there a reason why sometimes the unit uses spells, and others it wont at all?
 
Level 4
Joined
Dec 15, 2007
Messages
108
maybe u havent or have remove the meele ki its in map initialisation

in action u can also set order unit to
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
My Suggestion
Create an AI... wait its not mine /me dispels mind control on himself
ah yea
Make their abilities autocasting
Based on slow, curse etc
if your ability is firebolt
when someone casts slow create a dummy to fire firebolt

Sorry I couldnt explain well
I'll comeback when I have more IQ
 
Level 6
Joined
Dec 5, 2007
Messages
184
i forgott sth "Unit- order to do sth"
thats right, but what event should he use??? For this Reason it would be easier to make the spell based on 'slow' and trigger(freehand)

event: a unit casts a spell
condition: casted spell = [the modified slow spell]
action: create 1 Dummy for owner of Casting Unit at position of target of abylity being cast)
Order Last created Unit to [the spell you want it to cast]

read the tutorial whose link I postet, there it is explained much better
 
Level 4
Joined
Dec 15, 2007
Messages
108
i already wrote it^^ in an upper post

trigger
Events
Unit - A unit Is attacked
Conditions
(Unit-type of (Triggering unit)) Equal to unit which u want to cast that spell
(Life of (Triggering unit)) Less than 50.00
Actions
Unit - Add spell to (Triggering unit)
Wait 7.00 seconds
Unit - Remove spell from (Triggering unit)
 
Level 10
Joined
Apr 3, 2006
Messages
535
seems changing the unit from neutral hostile to an enemy player makes the hero cast normally
 
Status
Not open for further replies.
Top