• 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] Leak

Status
Not open for further replies.
Level 9
Joined
Oct 17, 2009
Messages
370
THX to you

{EDIT}
this is my triggers...
  • Healing ward init
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Healing Totem
          • (Unit-type of (Triggering unit)) Equal to Healing Totem 2
          • (Unit-type of (Triggering unit)) Equal to Healing Totem 3
          • (Unit-type of (Triggering unit)) Equal to Healing Totem 4
          • (Unit-type of (Triggering unit)) Equal to Healing Totem 5
    • Actions
      • Set HWTP[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))
  • Healing ward eyecandy
    • Events
      • Time - Every 1.30 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • ((Picked unit) is in (Units within 500.00 of HWTP[1])) Equal to True
                  • ((Picked unit) is in (Units within 500.00 of HWTP[2])) Equal to True
                  • ((Picked unit) is in (Units within 500.00 of HWTP[3])) Equal to True
                  • ((Picked unit) is in (Units within 500.00 of HWTP[4])) Equal to True
                  • ((Picked unit) is in (Units within 500.00 of HWTP[5])) Equal to True
                  • ((Picked unit) is in (Units within 500.00 of HWTP[6])) Equal to True
                  • ((Picked unit) is in (Units within 500.00 of HWTP[7])) Equal to True
                  • ((Picked unit) is in (Units within 500.00 of HWTP[8])) Equal to True
                  • ((Picked unit) is in (Units within 500.00 of HWTP[9])) Equal to True
                  • ((Picked unit) is in (Units within 500.00 of HWTP[10])) Equal to True
            • Then - Actions
              • Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
              • Special Effect - Destroy (Last created special effect)
              • For each (Integer A) from 1 to 10, do (Actions)
                • Loop - Actions
                  • Custom script: call RemoveLocation( udg_arrayHWTP[ udg_index1 ] )
                  • Custom script: call RemoveLocation( udg_arrayHWTP[ udg_index2 ] )
                  • Custom script: call RemoveLocation( udg_arrayHWTP[ udg_index3 ] )
                  • Custom script: call RemoveLocation( udg_arrayHWTP[ udg_index4 ] )
                  • Custom script: call RemoveLocation( udg_arrayHWTP[ udg_index5 ] )
                  • Custom script: call RemoveLocation( udg_arrayHWTP[ udg_index6 ] )
                  • Custom script: call RemoveLocation( udg_arrayHWTP[ udg_index7 ] )
                  • Custom script: call RemoveLocation( udg_arrayHWTP[ udg_index8 ] )
                  • Custom script: call RemoveLocation( udg_arrayHWTP[ udg_index9 ] )
                  • Custom script: call RemoveLocation( udg_arrayHWTP[ udg_index10 ] )
            • Else - Actions
is that how it shall be ??? (above)
i could make one variable for each but that will take more time so i dont want to do that
 
Last edited by a moderator:
Level 13
Joined
Apr 15, 2008
Messages
1,063
You got 10 unit group leaks there :grin:
((Picked unit) is in (Units within 500.00 of HWTP[10])) Equal to True leaks a unit group

From what I understand, this should just apply some sort of effect to every unit that comes near any of those healing wards. (I gues that could be done with Life Regeneration aura, but anyway, here is how it should be triggered:
  • Healing ward init
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Healing Totem
          • (Unit-type of (Triggering unit)) Equal to Healing Totem 2
          • (Unit-type of (Triggering unit)) Equal to Healing Totem 3
          • (Unit-type of (Triggering unit)) Equal to Healing Totem 4
          • (Unit-type of (Triggering unit)) Equal to Healing Totem 5
    • Actions
      • ---------- remove previous location -------
      • Custom script: call RemoveLocation( HWTP[(Player number of (Owner of (Triggering unit)))] )
      • Set HWTP[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))
  • Healing ward eyecandy
    • Events
      • Time - Every 1.30 seconds of game time
    • Conditions
    • Actions
      • For Loop Integer A = 1 to 12
        • Custom script: set bj_wantDestroyGroup = true
        • Unit Group - Pick every unit in (Units within 500.00 of HWTP[Integer A]) and do (Actions)
          • Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
          • Special Effect - Destroy (Last created special effect)
Also, you propably don't understand the greatest advantage of arrays, if you wanted to remove locations for all players, you do it this way:
  • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions
      • Custom script: call RemoveLocation( udg_arrayHWTP[ GetForLoopIndexA() ] )
 
Level 13
Joined
Apr 15, 2008
Messages
1,063
Well you would have to use JASS functions in there, this would be
  • Custom script: call RemoveLocation( udg_HWTP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
If you don't know jass, just save the index to some other variable using GUI functions:
  • Set index = (Player number of (Owner of (Triggering unit)))
  • Custom script: call RemoveLocation( udg_HWTP[udg_index] )
OR save the entire location to temporary variable:
  • Set temp_location = HWTP[ (Player number of (Owner of (Triggering unit))) ]
  • Custom script: call RemoveLocation( udg_temp_location )
 
Level 9
Joined
Oct 17, 2009
Messages
370
well now this spell is working... is there any way to make it mui? i want it to summon an healing totem that heals nearby units by a % of maximum hp every second. all that can be made in the object editor. BUT i want it to show a the holy light on nearby units every 1.3 second too... i can use buffs to indicate which unit that shall have the special effect... but buffs stays for like 1.5 sec after it moves out of range so that wont work... current triggers:
  • Healing ward init
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Healing Totem
          • (Unit-type of (Triggering unit)) Equal to Healing Totem 2
          • (Unit-type of (Triggering unit)) Equal to Healing Totem 3
          • (Unit-type of (Triggering unit)) Equal to Healing Totem 4
          • (Unit-type of (Triggering unit)) Equal to Healing Totem 5
    • Actions
      • Set INDEX = (Player number of (Owner of (Triggering unit)))
      • Custom script: call RemoveLocation (udg_HWTP[udg_INDEX])
      • Set HWTP[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))
  • Healing ward eyecandy
    • Events
      • Time - Every 1.30 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units within 500.00 of HWTP[(Integer A)]) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) has buff Healing... ) Equal to True
                • Then - Actions
                  • Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
 
Status
Not open for further replies.
Top