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

[Trigger] Int dmg based spells and another problem

Status
Not open for further replies.
Level 29
Joined
Jul 29, 2007
Messages
5,174
Guys I made this 2 triggers and none work.
Can you tell me why or/and make me ones instead ? :grin:

TRIGGER 1
  • Casting
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set CastingTarget = (Target unit of ability being cast)
      • If ((Ability being cast) Equal to Fire Ball (Neutral Hostile)) then do (Unit - Set life of CastingTarget to ((Life of CastingTarget) - (Real(HeroIntelligence[(HeroIntelligence[1] x 2)])))) else do (Do nothing)
  • Int
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set HeroIntelligence[1] = (Intelligence of Hero[1] (Include bonuses))
HeroIntelligence is an Integar
CastingTarget is a unit


SECOND TRIGGER
  • Detect Unit
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Trigger - Add to Show Damages <gen> the event (Unit - (Triggering unit) Takes damage)
  • Show Damages
    • Events
    • Conditions
    • Actions
      • Set loc = (Position of (Triggering unit))
      • Floating Text - Create floating text that reads (String((Integer((Damage taken))))) at loc with Z offset 0.00, using font size 6.00, color (50.00%, 50.00%, 50.00%), and 80.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Set the velocity of (Last created floating text) to 15.00 towards 90.00 degrees
      • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
loc is an point varibale

Please help me :sad:
 
Level 12
Joined
Aug 18, 2006
Messages
1,193
1.
a. use Unit - Cause UNIT to damage TARGET instead of Unit - Set life, else the caster of Fire Ball wont get bounty when killing, or experience for that matter
b. you see, you are using (Real(HeroIntelligence[HeroIntelligence[1] x 2])), meaning, he will "deal" HeroIntelligence[(Intelligence of Hero[1] + Bonuses) x 2], which you havent set yet
example : Hero[1]s Intelligence is equal to 10+2, then the "damage" will be HeroIntelligence[(10+2) x 2(totaly, 24)], which i presume is not Set to any value
2.
i dont belive that Unit- A unit is Attacked, saves a Triggering unit, but an Attacked unit and an Attacking unit
in other words, use Attacked unit instead of Triggering Unit on the first trigger, and Damaged unit instead of Triggering unit in the second trigger
 
Status
Not open for further replies.
Top