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

crit system

Status
Not open for further replies.
Level 7
Joined
Feb 1, 2008
Messages
296
use a damage detection trigger. for example
  • Damage Detection Initialization
  • Events
    • Unit - A unit enters (Playable Map Area)
  • Conditions
  • Actions
    • Trigger - Add (Entering Unit takes damage) to (Damage Detection)
  • Damage Detection
  • Events
  • Conditions
  • Actions
    • <Insert Need Actions>

You can make Critical strike stack by making a condition using loops for example if for every integer a loop between 1 and 6, if the unit has <Insert Item> in inventory integer A, add +<Insert Critical Strike Chance> to a variable. After that, make a condition saying that if a random number between 1 and 100 is lower than your variable, deal Damage Source x <Insert Value>.
 
Level 15
Joined
Aug 14, 2007
Messages
936
Simple as crystal, you will learn to seperate attacks from other source of damage. Firstly by making all your abilities like frost nova casted by dummy instead of your main hero.

Secondly, use the trigger from jadegolem for this operation

Thirdly, check if damage source is a hero or not

Fourth Step, now you throw the logic jadegolem suggested and get over with it =X
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
The biggest problem here is that you can't detect the souce of the damage (only the damaging unit). The way I do this is replacing all damaging spells by Acid Bomb with 0.1 dmg and some dummy debuff. In the "Unit - Takes Damage" trigger, I test for the debuff (which, in case of Acid Bomb, is applied directly before the damage), and if it is present, I remove it and damage the unit accordingly by trigger.
 
Status
Not open for further replies.
Top