• 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.

[JASS] Get units hit by a spell

Status
Not open for further replies.
Level 1
Joined
May 24, 2008
Messages
3
Hey Community.
I need help with one of my spells.
The Trigger should pick all enemies/units that are in the AOE of a flamestrike.
i have no idea how to do this cos i just started learning Jass.

i tried it with GetUnitsInRangeOfLocAll but dont know how to get the Location of the Flamestrike.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Lol
I suggest first learning some basic GUI.
For instance:
  • Set temp_point = (Target point of ability being cast)
  • Custom script: bj_wantDestroyGroup=true
  • Unit Group - Pick every unit in (Units within 512.00 of temp_point matching (((Matching unit) is alive) Equal to (==) True)) and do (Actions)
    • Loop - Actions
      • Unit - Kill (Picked Unit)
  • Custom script: call RemoveLocation(udg_temp_point)
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
I somehow doubt he knows any Jass.
Anyway it is not too hard to convert it from GUI to custom text.
 
Level 4
Joined
May 3, 2008
Messages
51
Maybe I've got another way:

  • NAME OF TRIGGER
  • Events: An ability is being cast
  • Conditions: Ability being cast Equal To Flame Strike
  • Actions: UnitGroup - Pick every unit in (Units within 512.00(Your Area of the Flamestrike)) of (Target point of ability being cast)) and do (Actions)
    • Actions
    • YOUR ACTIONS
I think more work is needed but I understand it better in that way
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
That ... leaks - one location and one unit group per cast.
If you wonder what leaks are, search for a tutorial.
But I am going to give you a little hint - if you do not want your map to lag or crash wc3, avoid leaks(clean them up).
 
Level 1
Joined
May 24, 2008
Messages
3
ok i tried it with this one
JASS:
function Trig_Flammensaeule_Actions takes nothing returns nothing

    local location loc = GetSpellTargetLoc()
    local group targets = CreateGroup()
    local unit temp
    local real level = I2R( GetUnitAbilityLevel(udg_Master_Of_Flame, 'A006') )
    call GroupEnumUnitsInRangeOfLoc(targets, loc, 200.0, null)
    loop
        set temp = FirstOfGroup(targets)
        exitwhen temp == null 
             //my actions
    endloop

endfunction
found the problem.
 
Status
Not open for further replies.
Top