aoe stun

Status
Not open for further replies.
Level 3
Joined
Sep 3, 2007
Messages
30
can anyone here create a aoe stun for me

i have no clue how to make it and i want it to be like Fan of Knives but instead storm bolts come out stunning units around it can anyone please post one up. Thanks!
 
I asked this question in a different forum. However since I saw this topic here, I'll paste the code I got from him. (btw, I don't know much about JASS)

JASS:
function Trig_Stun_AOE_Actions takes nothing returns nothing
   local unit Caster = GetTriggerUnit()
   local player Owner = GetOwningPlayer(Caster)
   local unit Dummy
   local real DummyX = GetUnitX(Caster)
   local real DummyY = GetUnitY(Caster)
   local real DummyFlyHeight = GetUnitFlyHeight(Caster)
   local group G = CreateGroup()
   local unit EnumUnit
   local integer AbilityLevel = GetUnitAbilityLevel(Caster,'A07E')
   call GroupEnumUnitsInRange(G, DummyX,DummyY, 500, null)
   loop
      set EnumUnit = FirstOfGroup(G)
      exitwhen EnumUnit==null
      if GetUnitState(EnumUnit, UNIT_STATE_LIFE) > 0 and IsUnitEnemy(EnumUnit, Owner) then
         if IsUnitVisible(EnumUnit, Owner) and GetUnitAbilityLevel(EnumUnit, 'Avul') == 0 then
            set Dummy = CreateUnit(Owner,'h01B',DummyX,DummyY,0)
            call UnitAddAbility(Dummy, 'A07F')
            call SetUnitAbilityLevel(Dummy, 'A07F', AbilityLevel)
            call SetUnitFlyHeight(Dummy,DummyFlyHeight,0)
            call IssueTargetOrder( Dummy, "thunderbolt", EnumUnit )
         endif
      endif
      call GroupRemoveUnit(G, EnumUnit)
   endloop
   call DestroyGroup(G)
   set G = null
   set Caster = null
   set Owner = null
   set Dummy = null
endfunction

In this example the A07E is the casted dummy ability and A07F is the storm bolt like ability with stun.

This is storm bolt based "fan of knives" with individual stun.
 
Hmm, I think he knows too little GUI and not to mention any JASS.
And besides doing these:
set Dummy = CreateUnit(Owner,'h01B',DummyX,DummyY,0)
call UnitAddAbility(Dummy, 'A07F')
call SetUnitAbilityLevel(Dummy, 'A07F', AbilityLevel)
in the loop is just plain "stupid" ;)
Here is my suggestion.
 

Attachments

Hmm, I think he knows too little GUI and not to mention any JASS.
And besides doing these:
set Dummy = CreateUnit(Owner,'h01B',DummyX,DummyY,0)
call UnitAddAbility(Dummy, 'A07F')
call SetUnitAbilityLevel(Dummy, 'A07F', AbilityLevel)
in the loop is just plain "stupid" ;)
Here is my suggestion.

awesome job! this is exactly what i was looking for :D
+rep
 
Status
Not open for further replies.
Back
Top