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

Every x Seconds

Status
Not open for further replies.
Level 17
Joined
Mar 21, 2011
Messages
1,611
hey,
im working on a map and got problems with an ability.
theres an ability that creates a buff, but its a projectyle that has to reach the enemy until buf triggers. i want to add the target to a unit grup if it has the buff. is there a possibility for that? maybe a EVERY X SECONDS in the same trigger as the cast ability event (as a action)?

TY
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Let me get this straight: you want to add a buff to a unit whenever a projectile hits the target? Not after the projectile is cast?

You can use bribe's Damage Detection Engine to detect when the missile hits its target and then add the buff to the unit being hit respectively.
Or you could use something like the cold arrow ability if that's what you want to achieve.
 
Level 17
Joined
Mar 21, 2011
Messages
1,611
I did it like that:

Trigger 1:

Hydro Pump 1
Ereignisse
Einheit - A unit Startet den Effekt einer Fähigkeit
Bedingungen
(Ability being cast) Gleich Hydro Pump
Aktionen
Set Hydropumpe_Einheit = (Load Hashtabelle_Row_4 of (Key (Target unit of ability being cast)) in Hashtabelle)
Set Hydropumpe_Einheit = (Casting unit)
Hashtabelle - Save Handle OfHydropumpe_Einheit as Hashtabelle_Row_4 of (Key (Target unit of ability being cast)) in Hashtabelle
Einheitengruppe - Add (Target unit of ability being cast) to Hydropumpe_Einheitengruppe


Trigger 2:

Hydro Pump 2
Ereignisse
Zeit - Every 0.04 seconds of game time
Bedingungen
Aktionen
Einheitengruppe - Pick every unit in Hydropumpe_Einheitengruppe and do (Actions)
Schleifen - Aktionen
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'-Bedingungen
((Picked unit) has buff Hydro Pump ) Gleich True
'THEN'-Aktionen
Set Hydropumpe_Einheit = (Load Hashtabelle_Row_4 of (Key (Picked unit)) in Hashtabelle)
Einheit - Cause Hydropumpe_Einheit to damage (Picked unit), dealing (1.25 x (Real((Kraft of Hydropumpe_Einheit (EinschlieÃxen bonuses))))) damage of attack type Zaubersprüche and damage type Normal
Einheitengruppe - Remove (Picked unit) from Hydropumpe_Einheitengruppe
'ELSE'-Aktionen
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
have a way, but kinda tricky a bit and i guess work if u dont want missile system what ios the best way

when u cast ur projectile ability then do this

BuffNR just a number, example when in set dmg trigger u check and load from hashtable and it is 1 then cast x ability, if it is 2 then cast y ability to damageeventtarget

anynumber is a number what u want

  • Hashtable - Save BuffNr as (Custom value of (Target unit of ability being cast)) of Anynumber in (Last created hashtable)
(this work if missile allways hit the target after it is casted)

(note: create dummy unit and add ability, order him to cast target allways take a short time, so if u do this then target get the buff after a short delay because buffing with dummy unit not instant :p)
 
Status
Not open for further replies.
Top