Hey. How do you make such a ability.For example , lets say i create a War Stomp spell for a unit.How do i make it autocast.For example , when he is attacked or has enemyes arround him he will cast it.
event a unit attacked/GDD
condition attacked unit equal to your unit AND attacking unit equal to enemy of attacked unit is true
action order your unit to warstomp(unit action, order unit with no target)
Event
A unit is attacked
Condition
(Level of (war stomp)) for attacking unit greater than 0
Action
Set AC_Caster = attacking unit
Set AC_Owner = Owner of AC_Caster
Set AC_Caster_location = location of attacking unit
Set AC_Level = (Level of (war stomp)) for AC_Caster
Set AC_Chance = 4 * (real(AC_Level))
Set AC_Skill = War Stomp
--------------------------------------------------------------------------
If all condition true do then other else
Condition
(Random real number between (1 and 100)) greater than or equal to AC_Chance
Then
Create 1 dummy for AC_Owner at AC_Caster_Location facing default building degrees
Add AC_Skill to last created unit
Set level of AC_Skill of last created unit to AC_Level
Order Last created unit to chieftain - war stomp
Add generic time 3 second to last created unit
Else
--------------------------------------------------------------------------
call RemoveLocation (udg_AC_Caster_Location)
I'm sorry I ol at my cell phone rite now so I can't use trigger.. And I'm just trying to help.. I think my trigger will work.. But if I make false sry I'm still a newbie mapperz.. --"
I'm on a page about incorrect corrections, and spent the better part of like two hours trying to get someone to understand that -5^2 = -25, not 25, and then that post had comments get reposted because that group is self sustaining, and that person was in turn trying to explain what I just explained to them. And I'm taking that as a victory