• 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] Weird problem

Status
Not open for further replies.
Level 11
Joined
Dec 31, 2007
Messages
780
(I post this trigger for you to understand the whole thing)
  • Gordon attacks with bone breaker
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • Bone_Breaker_Boolean Equal to False
      • (Unit-type of (Attacking unit)) Equal to Minotaur Gordon
      • ((Attacking unit) is an illusion) Not equal to True
      • (((Attacked unit) is A structure) Not equal to True) and (((Attacked unit) belongs to an ally of (Owner of (Attacking unit))) Not equal to True)
      • (Random integer number between 1 and 100) Less than or equal to Bone_Breaker_Percentage
    • Actions
      • Set Bone_Braker_target = (Attacked unit)
      • Trigger - Add to Gordon Deals damage with bone breaker <gen> the event (Unit - Bone_Braker_target Takes damage)
      • Trigger - Turn on Gordon Deals damage with bone breaker <gen>
why could this trigger

  • Gordon Deals damage with bone breaker
    • Events
    • Conditions
      • (Damage source) Equal to Gordon
    • Actions
      • Set Bone_Breaker_Boolean = True
      • Set Bone_Breaker_Extra_Damage = (Damage taken)
      • Set Location4[49] = (Position of Gordon)
      • Floating Text - Create floating text that reads (String((Integer(Bone_Breaker_Extra_Damage)))) at Location4[49] with Z offset 90.00, using font size 12.00, color (100.00%, 20.00%, 20.00%), and 10.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Set the velocity of (Last created floating text) to 80.00 towards 90.00 degrees
      • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
      • Special Effect - Create a special effect attached to the chest of (Attacked unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
      • Special Effect - Destroy (Last created special effect)
      • Trigger - Turn off (This trigger)
      • Unit - Cause Gordon to damage Bone_Braker_target, dealing Bone_Breaker_Extra_Damage damage of attack type Chaos and damage type Universal
      • Custom script: call RemoveLocation(udg_Location4[49])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 30
        • Then - Actions
          • Unit - Set level of Cripple |Demonic Harp Slow for Bone_Breaker_Caster to ((Level of Bone breaker ( Minotaur Gordon ) for Gordon) + 13)
          • Unit - Order Bone_Breaker_Caster to Stop
          • Unit - Order Bone_Breaker_Caster to Undead Necromancer - Cripple Bone_Braker_target
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Bone_Braker_target has buff Broken leg ) Not equal to True
            • Then - Actions
              • Unit - Set level of Cripple |Demonic Harp Slow for Bone_Breaker_Caster to ((Level of Bone breaker ( Minotaur Gordon ) for Gordon) + 9)
              • Unit - Order Bone_Breaker_Caster to Stop
              • Unit - Order Bone_Breaker_Caster to Undead Necromancer - Cripple Bone_Braker_target
            • Else - Actions
              • Do nothing
      • Set Bone_Breaker_Boolean = False




be causing this

gordon.jpg



as you can see i save the damage this unit (giant arthas) is taking into a variable... then i create a floating text with the amount of damage taken and i re-damage the damaged unit with the damage taken... but for some reason a lot of times a 0 appears there...

What could be happening?
 
Level 11
Joined
Dec 31, 2007
Messages
780
well... it is not meant to be a critical strike ability... but can be taken as some sort of...

but i dont understand why, if tell him to do the damage that has already been done, it deals 0 damage (or at least the displayed number is 0)... the event is "unit takes damage" so it shouldnt fire if the enemy doesnt take it
 
Level 11
Joined
Dec 31, 2007
Messages
780
i dont think so.... coz if the variable is not overwritten by a new damage it should have stored the last damage dealt...

besides when a unit is attacked i simply add the attacked unit to a damage detection trigger where everything is done... "unit is attacked" event does nothing
 
Status
Not open for further replies.
Top