Destroying a unit group

Saiza

New Member
Reaction score
10
yo.

I got a problem, when I pee it realy hurts and I get dizzy

lol :)

nah, this is the problem; I got this action
Set GroupvarUnits = (Units within 400.00 of (Position of (Dying unit)))
And then some long unit group action, but then when I want to remove it by a custom script I do ''Custom script: call DestroyGroup(udg_GroupvarUnits)
'' but I get error *ARGH* :) how do I remove a unit group variable? >=o
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
What error did you get?

You custom script seems to be correct though..
 

Saiza

New Member
Reaction score
10
It says that something is wrong with my custom script blabla Helping me will be rewarded with REP =D

Bjerrum, dont wory... at the moment I feel a little anger aginst you but with time it will hopefully fade away :)

ehhh now it says that my playergroup is fucked up to :eek: Custom script: call DestroyGroup(udg_Groupvar)
(A playergroup variable it is)
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
Let me guess, you inserted "Custom script:" to the function call, too?

So, it looks like "Custom script: Custom script: call DestroyGroup(GroupvarUnits)" when directly copy&pasted from the editor?


You know, that's bad...
 

Sooda

Diversity enchants
Reaction score
318
> something is wrong with my custom script blabla

We could solve your problem if you would type out error message. Wild guess, you don' t have variable named "udg_GroupvarUnits" ?
 

Arkan

Nobody rides for free
Reaction score
92
make 2 variables:
Unit-Group variable called TempG
Point variable called TempP

then

Code:
set TempP = Position of Triggering Unit
set TempG = Units within 400.00 of TempP
loop
....
endloop
custom script: call RemoveLocation(udg_TempP)
custom script: call DestroyGroup(udg_TempG)
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
So i asked, what error did the WorldEditor gave you?
 

Leazy

You can change this now in User CP.
Reaction score
50
The wild guess is correct. :>

My variable name is GroupvarUnits, but I heard that you should have _udg before : o

Aight, this is what the error says;
Line 90: Invalid argument type (force)
Line 93: Expected a code statement (force)

call DestroyGroup(udg_Groupvar) is marked
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
"DestroyForce" is for destroying forces aka player groups, "DestroyGroup" is for destroying groups aka unit groups!
 

Sooda

Diversity enchants
Reaction score
318
> My variable name is GroupvarUnits

> call DestroyGroup(udg_Groupvar) is marked

Well conclusion:
Code:
custom script: call DestroyGroup(udg_Groupvar[b]Units[/B])
If you are using default Blizzard World Editor then errors showed could be one or some lines before/ after actual line displayed with presumable error.
Are you just trying to add custom script to your GUI trigger or are you working with JASS trigger ? So far messages show that it wants variable what is meant for player group. Somewhere you want to destroy player group with unit group destroying function or unit group with player group destroying function.
 

Leazy

You can change this now in User CP.
Reaction score
50
Thanks!

Thanks, Andrew. That cleared up my Playergroup problem, but the unitgroup problem remains. Here is my trigger:

Code:
Execute
    Events
        Unit - A unit Is attacked
    Conditions
        (Unit-type of (Attacking unit)) Equal to Assasin
        ((Attacking unit) has buff Execute) Equal to True
        (Integer((Percentage life of (Attacked unit)))) Less than or equal to 15
    Actions
        Set INTEGER = (Random integer number between 1 and 5)        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Random integer number between 1 and 5) Equal to 3
            Then - Actions
                Unit - Pause (Attacked unit)
                Unit - Pause (Attacking unit)
                Set Groupvar = (Player group((Owner of (Attacking unit))))
                Cinematic - Disable user control for Groupvar
                Animation - Play (Attacking unit)'s slam animation
                Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (Life of (Attacked unit)) damage of attack type Chaos and damage type Force
                Wait 0.40 seconds
                Unit - Unpause (Attacking unit)
                Set Groupvar = (Player group((Owner of (Attacking unit))))
                Cinematic - Enable user control for Groupvar
                Custom script:   call DestroyGroup(udg_Groupvar)
            Else - Actions
                Do nothing

Is it maybe so that when I use
Code:
Set Groupvar = (Player group((Owner of (Attacking unit))))
the second time it messes up evverything? Well, I need some kind of solution like that, becouse there is more triggers that uses that variable and with the wait of 0.40 seconds maybe another of those triggers occurs wich would fuck up the whole thing, becouse it could be removed before it should since it's removed after 0.40 seconds in this trigger :eek: If this is the thing that fucks up, could anyone help me with another solution, like a if/then/else variable that checks if that variable is being used in another trigger or something?

Edit

> Andrewgosu, +rep is added

> Well, when I already started a tread I could aswell just ask another question to eas my mind, I got a spell where if a unit with that spell is in 400 range of the dying unit he'll get the Fan of Knives ability and he uses it, but then, if he have a spellbook open, would it cancel the spellbook? If so, is there a way to cast spellbook with GUI or Jass, either way that works would be great :D A custom lines that orders casting unit to cast spellbook, + rep if you know how to =D
 

Leazy

You can change this now in User CP.
Reaction score
50
Aha! Sweet, Aceheart you always got the answear :>

So, would my trigger be leak free now?

Edit: Rep added, Ace :D
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
You set Groupvar twice, but remove it only once.
I'm not sure "Attacking unit" makes it past a wait.
This trigger can not run more than once.

"Do nothing" isn't needed, it isn't doing anything anyway.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top