• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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