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

[JASS] Damage Detection of any kind

Status
Not open for further replies.
Level 1
Joined
Aug 7, 2007
Messages
1
Hey guys,

I'm making a Stealth spell incredibly similar to the World of Warcraft spell that Rogues have. The essentials are that it decreases movement speed on activation (instead of increasing as traditional Wind Walk does), and will break if ANY damage is taken.

I've got the reduced movement speed down (I hope) but still am lacking the damage detection. I'm fairly new to JASS so there's probably some simple solution that I'll bang my head against the wall about later, but could you guys humor me please?
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
The really complicated damage detection Blizzard has made:
  • Events
  • Unit - A Unit is damaged
  • Conditions
  • Triggering Unit has Stealth buff Equal to True
 
Level 12
Joined
Aug 18, 2006
Messages
1,193
shift klick movement speed bonus and insert -20 or something :)
read the whole post next time, okay :p

anyhow, there is no A unit Takes damage event, so this is a common trick to make this work in GUI atleast

  • Trigger 1
  • Events
    • Unit - A unit Learns a Skill
  • Conditions
    • (Learned skill) Equal to Stealth
    • ((Learning unit) is in StealthGroup) Equal to False
  • Actions
    • Unit Group - Add (Learning unit) to Stealth Group
    • Trigger - Add to Trigger 2 <gen> the event ((Learning unit) Takes damage)
  • Trigger 2
  • Events
  • Conditions
    • ((Triggering unit) has Stealth buff) Equal to True)
  • Actions
    • Unit - Remove Stealth buff from (Triggering unit)
take those as examples and turn them into better JASS triggers :p
 
Level 11
Joined
Apr 6, 2008
Messages
760
dont get why the event is when the unit learn the skill and why u have that group


  • Trigger
    • Events
      • Unit - "Unit" Takes Damage
    • Conditions
      • (Damage taken) Greater than (>) 0.00
    • Actions
      • Unit - Remove Stealth buff from (Triggering unit)
  • Other Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) "Stealth"
    • Actions
      • Trigger - Add to "trigger" the event (Unit - (Triggering unit) Takes Damage)
 
Status
Not open for further replies.
Top