• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Solved] Targeting units with Specific Buff

Status
Not open for further replies.
let me be a little more specific.

I have an ability called PermaFrost. its a toggled ability that gives a buff that slows target down. when i cast Impaling Spear, i want all units with the PermaFrost buff within 700 of Caster to take 75xLevel of PermaFrost.

i am aware i must use Pick units and Do Actions but i cant get it to target correctly.
 
let me be a little more specific.

I have an ability called PermaFrost. its a toggled ability that gives a buff that slows target down. when i cast Impaling Spear, i want all units with the PermaFrost buff within 700 of Caster to take 75xLevel of PermaFrost.

i am aware i must use Pick units and Do Actions but i cant get it to target correctly.

idk if u know but i doubt u can get the buff giver ability level from buff so u are forced to use unit group :/
 
Permafrost Copy
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Impaling Spear (Jeral)
Actions
Set PermaFrost_Position = (Position of (Casting unit))
Set PermaFrost_Select = (Units within 700.00 of (Position of (Casting unit)) matching (((Matching unit) has buff PermaFrost ) Equal to True))
Unit Group - Pick every unit in PermaFrost_Select and do (Actions)
Loop - Actions
Unit - Cause (Casting unit) to damage (Picked unit), dealing (75.00 x (Real((Level of PermaFrost for (Casting unit))))) damage of attack type Spells and damage type Normal
Wait 1.00 seconds
Unit - Remove PermaFrost buff from (Picked unit)
Custom script: call RemoveLocation( udg_PermaFrost_Position)

this is the ability i need help fixing
 
Try using "starts the effect of an ability" or use a damage detection with a dummy unit.

dosnt help. what im trying to do is make Jeral (the caster) deal damage to all units within range that currently have the buff called PermaFrost. all i need to know is how to add units with a specific buff to picked units or to a Unit Group.
 
make sure that units you wanna hit have that buff, if not - add some dummy buff and than use your trigger.

also use Custom script: call DestroyGroup(udg_PermaFrost_Select) at the end)

-----------
or you can try that:
Set PermaFrost_Select = (Units within 700.00 of (Position of (Casting unit)) matching (((Matching unit) belongs to an enemy of casting unit) Equal to True) and ((matching unit) is a structure) not equal to True and (Matching unit) is alive equal to true)
Unit Group - Pick every unit in PermaFrost_Select and do (Actions)
Loop - Actions
If/than/else multiple
Conditions
Picked unit has buff Permafrost equal to true
Actions
Unit - Cause (Casting unit) to damage (Picked unit), dealing (75.00 x (Real((Level of PermaFrost for (Casting unit))))) damage of attack type Spells and damage type Normal
Else
do nothing

But once again - make sure that your targets have that buff
 
as i said before, i couldn't get the units that had a certain buff within range of caster to be included by picked unit. i guess the whole time it was something else within the trigger causing the problem and not the format haha. talk about fail.
 
as i said before, i couldn't get the units that had a certain buff within range of caster to be included by picked unit. i guess the whole time it was something else within the trigger causing the problem and not the format haha. talk about fail.

:ogre_haosis: I remember 4***ing with one ability for three days and finally found that I used another variable from another spell :ogre_hurrhurr: :xxd:
 
Status
Not open for further replies.
Back
Top