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

Like Critical Strike - but not, and it's not working. help?

Status
Not open for further replies.
Level 4
Joined
Jun 5, 2007
Messages
65
Need help making an ability that works something like critical strike. Basically:

Per level, the ability has a % chance to knock off whatever % off the target's current hp.

for example:

Birgitte has a 5% chance to fire a shot that will take away 30% of the target's current health.

I had a version of this that sort-of worked, however it used the 'unit is attacked' event, which messed it all up (due to 'being attacked' = enemy unit comes in range). Also, the 'unit takes damage' ability is impossible to use in this because it is specific-unit only. I tried using variables:

Every .5 seconds
pick all units owned by enemy of owner of Archer and set NexusShotTarget = picked unit.

Didn't work due to there being 'no variables of this type' under the specific unit events for the Unit section.

I definitely don't want to assign a trigger to each enemy unit on my map (not to mention i have units spawned periodically which would make it impossible).

I'm seriously confused and need some help. TYVM in advance!
-Z

P.S. You'll be like a god if you can help me work this out.. it's beginning to drive me absolutely crazy and I cannot figure out how to make it work.
 
Level 3
Joined
May 28, 2007
Messages
57
1 way you could try is, in Events a unit is attacked, Conditions attacke unit belongs to enemy of <your unit>, Actions if random int between 1-100 <= example 5 this would give a 5% chance unit set targets life to targets life - Max life of target X 0.30 this is damaging the attacked unit for 30% of his hp
you can have a variables called target which is assigned to attacked unit. I don't have my war3 disk with me so i can't check it but that should work.
 
Level 4
Joined
Jun 5, 2007
Messages
65
that was my original trigger, unfortunately it didn't work because of the above mentioned problem:
the event 'unit is attacked' fires whenever the 'attacking unit' is in range of the 'attacking unit', not when it actually takes damage.
 
Level 21
Joined
Aug 3, 2004
Messages
710
I don't know if this is possible, but try and create an poison ability, that deals no damage, and only lasts for 0.01 seconds, then make a custom buff called "NexusShot".

Then create a trigger, that checks whenever a unit takes damage, then check if the unit has the "NexusShot" buff, and if it has, do the critical strike check.

Don't know if it works, but it's worth a try.

EDIT:
Just did a test, it works fine. You have to add the "Unit Takes Damage" event to all unit, which isn't that hard, and not in any way impossible, not even if you create units after the start of the map.
 
Last edited:
Level 4
Joined
Jun 5, 2007
Messages
65
1. Thanks, but... unfortunately I have absolutely NO proficiency in JASS whatsoever.
2. I don't think that spell was what I needed.
 
Level 11
Joined
Jul 12, 2005
Messages
764
It's not the spell itself, but the method of creating an artifical critical strike. Without GUI, you can't do it.
The GUI method, - you add the damageevents to a global trigger -, is extremely buggy, I don't recommend using it.

If you don't know Jass, sry, you won't be able to make this spell...
 
Status
Not open for further replies.
Top