Impale Help

Synthetics

New Member
Reaction score
7
Hey all, im trying to make an stat based impale spell, the problem is im trying to get the spell to cause damge to units with a specific buff but cant get it working does anyone know how to fix it? (and i have read the tutorials :D ) i've pasted my trigger below. thanks in advance for your time and help.

Code:
Armageddon
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Armaggeddon 
    Actions
        Set UnitGroup[(Player number of (Owner of (Triggering unit)))] = (Units within 700.00 of (Target point of ability being cast) matching (((Picked unit) has buff Flame Damage ) Equal to True))
        Unit Group - Pick every unit in UnitGroup[(Player number of (Owner of (Triggering unit)))] and do (Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - ((Real((Intelligence of (Triggering unit) (Include bonuses)))) x 12.00)))
 

ArmedCitizen

Kisses Cats
Reaction score
198
Hey all, im trying to make an stat based impale spell, the problem is im trying to get the spell to cause damge to units with a specific buff but cant get it working does anyone know how to fix it? (and i have read the tutorials :D ) i've pasted my trigger below. thanks in advance for your time and help.

Armageddon
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Armaggeddon
Actions
Set UnitGroup[(Player number of (Owner of (Triggering unit)))] = (Units within 700.00 of (Target point of ability being cast) matching (((Picked unit) has buff Flame Damage ) Equal to True))
Unit Group - Pick every unit in UnitGroup[(Player number of (Owner of (Triggering unit)))] and do (Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - ((Real((Intelligence of (Triggering unit) (Include bonuses)))) x 12.00)))

That might be your problem. Try (Matching unit). And also, you need to remove the unit group via custom script. As is now it still leaks.
 
K

Kerberos

Guest
ArmedCitizen said:
That might be your problem. Try (Matching unit). And also, you need to remove the unit group via custom script. As is now it still leaks.
You'd do that with the action

Code:
Custom script:    call DestroyGroup(udg_UnitGroup)

If UnitGroup isn't actually your variable's name, change the UnitGroup in my example with the real name. The udg_ is vital, though; leave that.
 

Mapster

New Member
Reaction score
4
Code:
Armageddon
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Armaggeddon 
    Actions
        Set UnitGroup[(Player number of (Owner of (Triggering unit)))] = (Units within 700.00 of (Target point of ability being cast) matching (((Picked unit) has buff Flame Damage ) Equal to True))
        Unit Group - Pick every unit in UnitGroup[(Player number of (Owner of (Triggering unit)))] and do (Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - ((Real((Intelligence of (Triggering unit) (Include bonuses)))) x 12.00)))

Try using "Begins casting an ability"

and: Player number of (Owner of (casting unit)))

and: picked unit is the wrong action to use but i'm sure you would have to create a region variable and use "random 100 units in variableregion".

and so on.
 

Synthetics

New Member
Reaction score
7
unfortunately none of those ideas have worked if you have any other suggests i would gladly welcome them!
 

Synthetics

New Member
Reaction score
7
Hazzaarrrrr! i got it to work i changed target point of ability being cast to position of triggering unit and just increase the range. Heres the trigger should any one else have the same problem :D

Armageddon
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Armaggeddon
Actions
Wait ((Distance between (Position of (Triggering unit)) and (Target point of ability being cast)) / 2000.00) seconds
Set UnitGroup[(Player number of (Owner of (Triggering unit)))] = (Units within 1200.00 of (Position of (Triggering unit)) matching (((Matching unit) has buff Flame Damage ) Equal to True))
Unit Group - Pick every unit in UnitGroup[(Player number of (Owner of (Triggering unit)))] and do (Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - ((Real((Intelligence of (Triggering unit) (Include bonuses)))) x 12.00)))
Custom script: call DestroyGroup(udg_UnitGroup[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top