Condition, Damage taken

eric92

New Member
Reaction score
3
How do you make a condition that can tell if the damage taken was from an ability? I need something like: Conditions: damage taken was from an ability equal to trure... i need something like that.
 

luorax

Invasion in Duskwood
Reaction score
67
Uhh, it's a bit complicated, but... Hmm, I have an idea, but to make it, you need the World Editor Unlimited.

So my trigger:

Trigger:
  • Stormbolt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Storm Bolt (Abil)
    • Actions
      • Set SB_Unit = (Target unit of ability being cast)
      • Set SB_Caster = (Triggering unit)
      • Trigger - Add to SB_Trigger the event (Unit - SB_Unit Takes damage)
      • Trigger - Take SB_Trigger and add this condition: ((Damage taken) Greater than 0.00)
      • Trigger - Take SB_Trigger and add this condition: ((Damage source) Equal to SB_Caster)
      • Trigger - Take SB_Trigger and add this action: (Game - Display to (All players) the text: (Damage done: + (String((Damage taken)))))
      • Trigger - Take SB_Trigger and add this action: (Trigger - Take SB_Trigger and remove all actions)
      • Trigger - Take SB_Trigger and add this action: (Trigger - Take SB_Trigger and remove all conditions )


You have to create a this trigger for every single target spells and add the spells with an "or" condition, and you have to create an another one for the AoE spells using an unit group.

Forgot to add: this trigger leaks, I made it to demonstrate :D

EDIT: ooh, wait... something doesn't work...
Trigger:
  • Trigger - Take SB_Trigger and add this condition: ((Damage source) Equal to (Triggering unit))


Without it works, but fires when the target takes damage, not depends on the damage source...

EDIT2: okay, I'm a complete retard, the problem solved, trigger and map updated.
 

luorax

Invasion in Duskwood
Reaction score
67
I don't use it. I use JASS NewGan Pack (I'm a JASSer), I only use it's interface, because it contains a lot of actions, conditions and events, what the original editor doesn't, but available it's JASS command. And it's loading screen looks better :p

EDIT: ohh, and this trigger doesn't contain any function, what aren't exist in the original wc3 script file. (So doesn't contain any custom function [There aren't any problem with the WE Unlimited, the problems are with some of its custom abils, because they uss Game Caches and return bugs, and it could crash the game, as someone said.)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top