• 🏆 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!

[Trigger] Trigger help

Status
Not open for further replies.
Level 24
Joined
Feb 9, 2009
Messages
1,787
Basically this is a spell that i got, in the second Trigger (RuinedFleshDamage) it states that the unit with this ability has to be present in the map installation. My question is that can there be a way around this? because i want it for a specific hero that is chosen in a hero tavern and not immediately on the map.

  • Ruined Flesh Init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Runed Flesh
    • Actions
      • Set RF_ShieldLife = 500.00
      • Set RF_Caster = (Casting unit)
      • Set RF_Duration = 30.00
      • Trigger - Turn on Ruined Flesh Loop <gen>
  • Ruined Flesh Damage
    • Events
      • Unit - Blood Mage 0015 <gen> Takes damage
    • Conditions
      • ((Attacked unit) has buff Runed Flesh ) Equal to True
    • Actions
      • -------- Blood mage 0015 <Gen> is a preset unit, you would need a unit already placed on the map on map initialization --------
      • Set RF_Damage = (Damage taken)
      • Set RF_ShieldLife = (RF_ShieldLife - RF_Damage)
      • Unit - Set life of RF_Caster to ((Life of RF_Caster) + RF_Damage)
  • Ruined Flesh Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set RF_Location = (Position of RF_Caster)
      • -------- This works a timer. for each second a real variable is decreased by 1. The maximum of that real (Duration) is equal to the amount of seconds it lasts --------
      • Set RF_Duration = (RF_Duration - 1.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RF_ShieldLife Greater than 0.00
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RF_Duration Greater than 0.00
            • Then - Actions
            • Else - Actions
              • -------- Most Special Effects carry out their effect even when destroyed. --------
              • Set RF_Duration = 30.00
              • Set RF_ShieldLife = 500.00
              • Special Effect - Create a special effect attached to the Attach Point - Overhead of RF_Caster using BlueImmolationDamage.mdx
              • Special Effect - Destroy (Last created special effect)
        • Else - Actions
          • -------- A location leaks a point, taking up memory. It is removed by this jass line. --------
          • Custom script: call RemoveLocation (udg_RF_Location)
          • Unit - Remove Runed Flesh buff from RF_Caster
          • Trigger - Turn off (This trigger)
 
Level 11
Joined
May 31, 2008
Messages
698
Well that depends. If it is possible for each player to have one of these heroes, then you will need 12 arrays, 1 for each player. But if there can only be one of this kind of hero on the map then you dont need arrays.
 
Level 24
Joined
Feb 9, 2009
Messages
1,787
The damage isn't absorbed. But Maker thanks to you, i made a Frankenstein hybrid of your Trigger:
  • Ruined Flesh Damage 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Runed Flesh
    • Actions
      • Wait 0.01 seconds
      • Trigger - Add to Ruined Flesh Damage 2 <gen> the event (Unit - RF_Caster Takes damage)
      • Trigger - Turn off (This trigger)
 
Level 5
Joined
Mar 17, 2005
Messages
135
  • Ruined Flesh Damage
    • Events
      • Unit - Blood Mage 0015 <gen> Takes damage
    • Conditions
      • ((Attacked unit) has buff Runed Flesh ) Equal to True
    • Actions
      • -------- Blood mage 0015 <Gen> is a preset unit, you would need a unit already placed on the map on map initialization --------
      • Set RF_Damage = (Damage taken)
      • Set RF_ShieldLife = (RF_ShieldLife - RF_Damage)
      • Unit - Set life of RF_Caster to ((Life of RF_Caster) + RF_Damage)
Why not just add this for event instead of what you have.
  • Unit - A unit Is attacked
This should make it so that whatever unit has that buff and is attacked then your actions will occur. I think this is what your asking for but I may have misread your question/problem.
 
Level 24
Joined
Feb 9, 2009
Messages
1,787
Yes in fact i mentioned it

The damage isn't absorbed. But Maker thanks to you, i made a
Frankenstein hybrid of your Trigger:

Ruined Flesh Damage 1
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Ruined Flesh
Actions
Wait 0.01 seconds
Trigger - Add to Ruined Flesh Damage 2 <gen> the event (Unit - RF_Caster Takes damage)
Trigger - Turn off (This trigger)
 
Level 8
Joined
Nov 20, 2008
Messages
445
  • Ruined Flesh Damage 2
    • Events
    • Conditions
      • ((Triggering Unit) has buff Runed Flesh ) Equal to True
    • Actions
      • Set RF_Damage = (Damage taken)
      • Set RF_ShieldLife = (RF_ShieldLife - RF_Damage)
      • Unit - Set life of RF_Caster to ((Life of RF_Caster) + RF_Damage)
  • Ruined Flesh Damage 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Runed Flesh
    • Actions
      • Set RF_ShieldLife = 500.00
      • Set RF_Caster = (Casting unit)
      • Set RF_Duration = 30.00
      • Trigger - Turn on Ruined Flesh Loop <gen>
      • Trigger - Add to Ruined Flesh Damage 2 <gen> the event (Unit - (Triggering Unit) Takes damage)
 
Status
Not open for further replies.
Top