• 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] Tiny trigger problem

Status
Not open for further replies.
Level 6
Joined
Feb 21, 2008
Messages
205
Hey guys, am back, not that any of you know me. But I joined this site YEARS ago, got sick of modding. But, now am back, and I havent done any triggers in a couple of years. So am tad rusty, anyways, here's my problem. Should be quite simple:

My spell: I have a shredder, who has a fan of knives based spell with no missiles. When he clicks it, he will get the Spiked barricades effect around him (The orc building spikes). When they erupt, every1 in a 200 ish AOE gets damage instantly. That works fine, because its just basiclly a non triggered spell so far, the fan of knives deal this damage.

But the second part is my problem, any1 he touches in a 150 AOE, will start to bleed. The bleed is based off unholy frenzy.

  • Spiked
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Spiked
    • Actions
      • Set Spiked_unit = (Casting unit)
      • Unit - Create 1 Dummy unit for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Spiked buff to (Last created unit)
      • Unit - Order (Last created unit) to Human Priest - Inner Fire Spiked_unit
      • Trigger - Turn on Bleed <gen>
  • Bleed
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 150.00 of (Position of Spiked_unit)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff bleed buff thing Bleeding) Equal to False
            • Then - Actions
              • Unit - Create 1 Dummy unit for (Owner of Spiked_unit) at (Position of (Picked unit)) facing Default building facing degrees
              • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
              • Unit - Add bleed dummy to (Last created unit)
              • Unit - Set level of bleed dummy for (Last created unit) to (Level of Spiked for Spiked_unit)
              • Unit - Order (Last created unit) to Undead Necromancer - Unholy Frenzy (Picked unit)
            • Else - Actions
      • Wait 8.00 seconds
      • Trigger - Turn off (This trigger)
The bleed trigger is initially off. I know I overcomplicate things, and there are serious leaks here, but as said: Am rusty. Aaaaanyways, the problem: What happens is that the game eventually stops because of fps/lag. I do understand that is because I spawn hundreds of dummy units because of the lame written trigger, but I cant remember the exact way to apply a buff that he comes in contact with (Without the massing of dummy units).

Help?

Just to answer your questions before they arrive:
Yes, The buff the units that are hit is the one listed in the trigger.
 
Level 11
Joined
Jan 25, 2009
Messages
572
Here's a small porblem, you need to use a group variable for the unit group that you're going to select like this
  • Spiked
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to Spiked
  • Actions
  • Set Spiked_unit = (Triggering unit)
  • Set Spiked_Loc = (Position of (Spiked_unit))
  • Unit - Create 1 Dummy unit for (Owner of (Spiked_unit)) at (Spiked_Loc) facing Default building facing degrees
  • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
  • Unit - Add Spiked buff to (Last created unit)
  • Unit - Order (Last created unit) to Human Priest - Inner Fire Spiked_unit
  • Trigger - Turn on Bleed <gen>
This trigger is initially off
  • Bleed
  • Events
  • Time - Every 0.20 seconds of game time
  • Conditions
  • Actions
  • Unit Group - Pick every unit in (Spiked_Group) and do (Actions)
  • Loop - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • ((Picked unit) has buff bleed buff thing Bleeding) Equal to False
  • Then - Actions
  • Unit - Create 1 Dummy unit for (Owner of Spiked_unit) at (Position of (Picked unit)) facing Default building facing degrees
  • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
  • Unit - Add bleed dummy to (Last created unit)
  • Unit - Set level of bleed dummy for (Last created unit) to (Level of Spiked for Spiked_unit)
  • Unit - Order (Last created unit) to Undead Necromancer - Unholy Frenzy (Picked unit)
  • Custom script: call DestroyGroup (udg_Spiked_Group)
  • Custom script: call RemoveLocation (udg_Spiked_Loc)
  • Else - Actions
  • Trigger - Turn off (This trigger)
This mby dont work but that's cuz im in school so i cant fix that, i'll do it when i come home :)
 
Level 6
Joined
Feb 21, 2008
Messages
205
I know it leaks, but it totally freezes after a few seconds, that happens usually when you fail at something and spawn 9999 dummy units. Does the location really leak THAT much in so few seconds?
 
Status
Not open for further replies.
Top