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

[Spell] Buff that should affect only X targets

Status
Not open for further replies.
Level 17
Joined
Nov 13, 2006
Messages
1,814
Hello there, my idea is too make a buff that makes the unit that has this buff cast and instant Kritical over targeting unit, but, only able too do it X times, were X is equal too spell lvl (max 4) so how can i do it? +rep

maybe with unit indexer?

-make a integer variable array, lets say Critical_Stack

-so make critical strike ability (orc hero ability) and set to 100% chance and add to caster
-set Critical_Stack[custom value of triggering unit]=4

next step:

in damage detection system detect if attacker got higher Critical_Stack[custom value of DamageEventSource] than 0 then decrease it by 1 so
if Critical_Stack[custom value of DamageEventSource] > 0 then
Critical_Stack[custom value of DamageEventSource] = Critical_Stack[custom value of DamageEventSource] - 1
else
if DamageEventSource *dummy critical strike* level higher than 0 then remove the ability
endif
endif

UseGui Damage Engine(also there is the indexer) (by Bribe) in spell section
 
Level 19
Joined
Jan 22, 2011
Messages
3,979
maybe with unit indexer?

-make a integer variable array, lets say Critical_Stack

-so make critical strike ability (orc hero ability) and set to 100% chance and add to caster
-set Critical_Stack[custom value of triggering unit]=4

next step:

in damage detection system detect if attacker got higher Critical_Stack[custom value of DamageEventSource] than 0 then decrease it by 1 so
if Critical_Stack[custom value of DamageEventSource] > 0 then
Critical_Stack[custom value of DamageEventSource] = Critical_Stack[custom value of DamageEventSource] - 1
else
if DamageEventSource *dummy critical strike* level higher than 0 then remove the ability
endif
endif

UseGui Damage Engine(also there is the indexer) (by Bribe) in spell section

its a little complicated, can you post the triggers i have too change please? i hadn´t experience whit custom scripts before
 
Status
Not open for further replies.
Top