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

[Solved] How can i delete this tempgroup and location?

Level 18
Joined
Jun 2, 2009
Messages
1,233
Set TempPointBomba[(Player number of (Owner of (Triggering unit)))] = tmp
Set TempGroupBomba[(Player number of (Owner of DamageEventSource))] = (Units within 300.00 of TempPointBomba[(Player number of (Owner of DamageEventSource))])

I do not know what should i type in there

call RemoveLocation (?????????????????????????????)
call DestroyGroup (??????????????????????????????)
 
Level 24
Joined
Feb 27, 2019
Messages
833
Make a copy of the trigger and convert the copy to custom text. Custom text is code and custom scripts require code.

How to convert a trigger to custom text: Trigger editor -> select the trigger to convert -> ? -> Convert to custom text. I forgot what the ? Is but its one of the ones to the left. Per heaps edit?

Find the equivalent of TempPointBomba[(Player number of (Owner of (Triggering unit)))] in the custom text and put that inside the parenthesises of call RemoveLocation()
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,877
Set TempPointBomba[(Player number of (Owner of (Triggering unit)))] = tmp
Set TempGroupBomba[(Player number of (Owner of DamageEventSource))] = (Units within 300.00 of TempPointBomba[(Player number of (Owner of DamageEventSource))])

I do not know what should i type in there

call RemoveLocation (?????????????????????????????)
call DestroyGroup (??????????????????????????????)
Variables make things easier:
  • Set PN1 = (Player number of (Owner of (Triggering unit)))
  • Set PN2 = (Player number of (Owner of DamageEventSource))
  • Set TempPointBomba[PN1] = tmp
  • Set TempGroupBomba[PN2] = (Units within 300.00 of TempPointBomba[PN2])
  • Custom script: call RemoveLocation( udg_TempPointBomb[udg_PN1] )
  • Custom script: call DestroyGroup( TempGroupBomba[udg_PN2] )
Just have to remember to write _udg before the name of your variables in the custom script.
 
Last edited:
Level 18
Joined
Jun 2, 2009
Messages
1,233
@Duckfarter Thank you for your help and @Uncle comes with more practical way as always. Thank you both of you.

  • Bomba at
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Cluster Rockets //
    • Actions
      • Set tmp = (Target point of ability being cast)
      • Set PN1 = (Player number of (Owner of (Triggering unit)))
      • Set PN2 = (Player number of (Owner of DamageEventSource))
      • Set TempPointBomba[PN1] = tmp
      • Set TempGroupBomba[PN2] = (Units within 300.00 of TempPointBomba[PN2])
      • Unit - Create 1 BOMBACI MULAYIM for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing (270.0) degrees
      • Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Cluster Rockets // dummy to (Last created unit)
      • Unit - Order (Last created unit) to Neutral Tinker - Cluster Rockets tmp
      • Set TempPointBomba[(Player number of (Owner of (Triggering unit)))] = tmp
      • Set TempGroupBomba[(Player number of (Owner of DamageEventSource))] = (Units within 300.00 of TempPointBomba[(Player number of (Owner of DamageEventSource))])
      • Custom script: call RemoveLocation(udg_tmp)
  • Bomba dmg
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • (Unit-type of DamageEventSource) Equal to (==) BOMBACI MULAYIM
    • Actions
      • Set TempReal = ((Real((Strength of Heroo[(Player number of (Owner of DamageEventSource))] (Include bonuses)))) x 3.00)
      • Set TempInt = (Integer(TempReal))
      • Unit Group - Pick every unit in TempGroupBomba[(Player number of (Owner of DamageEventSource))] and do (Actions)
        • Loop - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Owner of Heroo[(Player number of (Owner of DamageEventSource))])) Equal to (==) True
              • ((Picked unit) is A structure) Equal to (==) False
              • ((Picked unit) is Mechanical) Equal to (==) False
              • ((Picked unit) is alive) Equal to (==) True
              • ((Picked unit) is Magic Immune) Equal to (==) False
            • Then - Actions
              • -------- This one deals 1 damage --------
              • Set DamageModifierEvent = TempReal
              • -------- And this one deals 180 damage instead of 90 --------
              • Game - Display to (All players) for 3.00 seconds the text: (String(TempInt))
              • -------- TempInt 90 but it takes 180 damage. --------
              • Trigger - Turn off (This trigger)
              • Unit - Cause DamageEventSource to damage (Picked unit), dealing (Real(TempInt)) damage of attack type Spells and damage type Magic
              • Trigger - Turn on (This trigger)
            • Else - Actions
      • Custom script: call RemoveLocation( udg_TempPointBomba[udg_PN1] )
      • Custom script: call DestroyGroup(udg_TempGroupBomba[udg_PN2] )
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,877
Yeah, and this gets rid of both Points:
  • Set tmp = (Target point of ability being cast)
  • Set TempPointBomba[(Player number of (Owner of (Triggering unit)))] = tmp
  • Custom script: call RemoveLocation(udg_tmp)
They're the same exact Location "object", you're removing both of them.

Don't remove it if you plan on keeping track of it over time. Only Remove it before setting it again to avoid the leak.
 
Last edited:
Level 18
Joined
Jun 2, 2009
Messages
1,233
@Uncle @HerlySQR

  • Bomba at
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) El bombasi //
    • Actions
      • Set tmp = (Target point of ability being cast)
      • Set PN1 = (Player number of (Owner of (Triggering unit)))
      • Set PN2 = (Player number of (Owner of DamageEventSource))
      • Set TempPointBomba[PN1] = tmp
      • Set TempGroupBomba[PN2] = (Units within 300.00 of TempPointBomba[PN2])
      • Unit - Create 1 BOMBACI MULAYIM for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing (270.0) degrees
      • Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
      • Unit - Add El bombasi // dummy to (Last created unit)
      • Unit - Order (Last created unit) to Neutral Tinker - Cluster Rockets tmp
  • Bomba dmg
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • (Unit-type of DamageEventSource) Equal to (==) BOMBACI MULAYIM
    • Actions
      • Set TempReal = ((Real((Strength of Heroo[(Player number of (Owner of DamageEventSource))] (Include bonuses)))) x 3.00)
      • Set TempInt = (Integer(TempReal))
      • Unit Group - Pick every unit in TempGroupBomba[(Player number of (Owner of DamageEventSource))] and do (Actions)
        • Loop - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Owner of Heroo[(Player number of (Owner of DamageEventSource))])) Equal to (==) True
              • ((Picked unit) is A structure) Equal to (==) False
              • ((Picked unit) is Mechanical) Equal to (==) False
              • ((Picked unit) is alive) Equal to (==) True
              • ((Picked unit) is Magic Immune) Equal to (==) False
            • Then - Actions
              • Unit - Set life of Heroo[(Player number of (Owner of DamageEventSource))] to ((Life of Heroo[(Player number of (Owner of DamageEventSource))]) - (Real(TempInt)))
              • Game - Display to (All players) for 3.00 seconds the text: (String(TempInt))
              • Trigger - Turn off (This trigger)
              • Unit - Cause Heroo[(Player number of (Owner of DamageEventSource))] to damage (Picked unit), dealing (Real(TempInt)) damage of attack type Spells and damage type Magic
              • Trigger - Turn on (This trigger)
            • Else - Actions
      • Custom script: call RemoveLocation( udg_TempPointBomba[udg_PN1] )
      • Custom script: call DestroyGroup(udg_TempGroupBomba[udg_PN2] )
Unit - Set life of Heroo[(Player number of (Owner of DamageEventSource))] to ((Life of Heroo[(Player number of (Owner of DamageEventSource))]) - (Real(TempInt)))

It can decrease current life by 90 but still enemy takes 2x damage.
I can easily fix by setting it 1.5x instead of 3.0x. Solved. But still i wonder why it not works.

Gameplay constants are default.
Unit is rifleman with no ability.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,877
It can decrease current life by 90 but still enemy takes 2x damage.
I can easily fix by setting it 1.5x instead of 3.0x. Solved. But still i wonder why it not works.

Gameplay constants are default.
Unit is rifleman with no ability.
You don't even need to track the Point/Group over time here. Just do something like this:
  • Bomba at
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) El bombasi //
    • Actions
      • Set tmp = (Target point of ability being cast)
      • Set tmp2 = (Position of (Triggering unit))
      • Unit - Create 1 BOMBACI MULAYIM for (Owner of (Triggering unit)) at tmp2 facing Default building facing (270.0) degrees
      • Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
      • Unit - Add El bombasi // dummy to (Last created unit)
      • Unit - Order (Last created unit) to Neutral Tinker - Cluster Rockets tmp
      • Custom script: call RemoveLocation( udg_tmp )
      • Custom script: call RemoveLocation( udg_tmp2 )
  • Bomba dmg
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (Unit-type of DamageEventSource) Equal to (==) BOMBACI MULAYIM
    • Actions
      • Set TempReal = ((Real((Strength of Heroo[(Player number of (Owner of DamageEventSource))] (Include bonuses)))) x 3.00)
      • Unit - Set life of Heroo[(Player number of (Owner of DamageEventSource))] to ((Life of Heroo[(Player number of (Owner of DamageEventSource))]) - TempReal)
      • Unit - Cause Heroo[(Player number of (Owner of DamageEventSource))] to damage DamageEventTarget, dealing TempReal damage of attack type Spells and damage type Magic
A proper Dummy unit:
1) Copy and paste the Locust.
2) Set Model = None, Shadow = None, Attacks Enabled = None, Movement Type = None, Speed Base = 0.
 
Last edited:
Level 18
Joined
Jun 2, 2009
Messages
1,233
I am using the same dummy unit in my every map but nothing happend just like this before. But this time this is secondary dummy have the EXACT the same except of dummy name.
But let me tell you what is the new in my career. First time i have used Cluster Rockets. Maybe the ability have bugs. But no more problem. I will set half the integer. But yes, your new solution is far easier than mine because i want to detect only one thing. Projectile hits the target and "owner of the projectile" Tonight i will try your new solution too and i will "update" my message for the let you know.
 
Top