• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[GUI] Group System v1.04

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Group System v1.04

This is a system I made for my map.

Description:
This system is a group system, where you can control a bunch of units, only with one leader.
This system is GUI and leakless (I think so, if not, please tell me)

I've only seen a group system in vJass, so I thought, it won't be bad to add one in GUI,
for those, who want it in GUI.

Give credits, if you use this system.
Hope you like it.

If you find andy bugs, please tell me.

v1.00
- uploaded
v1.01
- removed bj from custom scripts
- changed For each (Integer A) to For each (Integer GInteger)
v1.02
- changed Minion circles
- added a new function: Regneration
v1.03
- better documentation
- now units only revive, if the player haven't reached his max food
- some minor fixing
v1.04
-fixed the unit classification condition bug - thanks for mentioning, z00rtaz!


Keywords:
group, system, leader, minion, GUI, trigger, Amigurumi
Contents

Group system v1.04 by Amigurumi (Map)

Reviews
12th Dec 2015 IcemanBo: Too long time as NeedsFix. Rejected. 16 Dec 2011 Bribe: Uses custom value of units while not being an indexing system, so the status is being set to "Needs fix". OrderId2String does not work with loaded games, just use...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long time as NeedsFix. Rejected.

16 Dec 2011
Bribe: Uses custom value of units while not being an indexing system, so the status is being set to "Needs fix".

OrderId2String does not work with loaded games, just use GroupTargetOrderById, and you can just use GetOrderTarget() to return a widget for that command.

The system in general can use work.
 
Custom values are not recommended because it would bug if a person who use this system are using custom values for other matters.
but what should I use instead of this? There aren't many values that can be changed... first I used unit levels, but then I realized, that a hero levels very fast :p. Then I used custom value, and I thougt it it is okay. But if you can say me a good alternative, I'll change that.
Also, avoid use loop index A. It was well known to cause a glitch/bugs, it is recommend to create a integer variable to replace it.
hmm, I thought it only bugs,when there's a wait in the loop. I'll change that.
 
Level 11
Joined
Jul 2, 2008
Messages
601
Well, not always good, sometimes it's difficult to select more than 4 groups, using double-click to get the group of unit type or when picking units by mouse button pressing and square placing. For the second one it works better, but for the first - depends on from which group you'll get the units, it can value from 2 to 6.
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
You can use indexing for the units,,
(I havent really checked the whole code for usability,,
And i do it in JASS now cuz it is easier for me but you should get the point)
JASS:
set udg_GS_Integer = udg_GS_Integer + 1
set udg_GS_Leader[udg_GS_Integer] = <Your Unit Here>
set udg_GS_CustomValue[udg_GS_Integer] = <YourInteger Here> // i thought you had udg_GS_Integer

then you can retrieve the integer through a loop
JASS:
loop
    exitwhen udg_GS_Leader[i] == GetTriggerUnit()
    set i = i + 1
endloop
// Your actions here,, the 'i' is now the 'custom value' you used first

Hope this helps you ;)
 
Well wtf this is just the same system as Eleandor's but lamer and in GUI.

you don't have to use it, if you think it's bad.
I made this for me, and uploaded it, so other people, who can easier modify GUI, can use it.
so if you don't like it, let it be, and don't tell me it's lame. Most of the beginners aren't able to create such a system.
 
Level 13
Joined
Dec 3, 2005
Messages
501
you don't have to use it, if you think it's bad.
I made this for me, and uploaded it, so other people, who can easier modify GUI, can use it.
so if you don't like it, let it be, and don't tell me it's lame. Most of the beginners aren't able to create such a system.

Well I wasn't intentionally being rude but I guess if that's how you'll take the truth.

I think it's a wonderful system and extremely useful :]. The more systems like this the better really.
 
Level 10
Joined
Feb 7, 2005
Messages
409
You're using Custom AND Point values? damn, my map already uses both, I'll dl it and give it a shot since it's what I'm looking for but I'll probably end up coding my own.

You could use Hashtables instead of the custom and point values, and indexing might work but I've never really used it so I don't know.

well good luck on the work, I'm dling it now I'll edit this post with a score after I test it out.

-Teld

3/5 it's nice but for some reason it appears to be lacking, and you use custom values. Also something in the map was leaking but I'm not sure what.
 
Last edited:
You could use Hashtables instead of the custom and point values
I never worked with hashtables before, so I don't know how they work. Don't know if I somedays look up in a tutorial.

Also something in the map was leaking but I'm not sure what.
that may be the creation of the enemy test units. All main triggers should be leak-free.
 
Level 10
Joined
Feb 20, 2008
Messages
448
i need a group system but im not sure if i should use this D: cant u link the vjass u found ? since it,s use custom value D:...... should have been remade in Table o_O

btw there is glitch, when i import it there is a integer glitch, probably blizzard glitch & there is a classification check boolean that is unknown fix it O_O
  • Set GGroup[1] = (Units in (Playable map area) matching ((((Matching unit) is Unknown) Equal to False) and ((Custom value of (Matching unit)) Equal to GInteger)))
 
Last edited:
Level 6
Joined
May 20, 2010
Messages
274
well, i'm thinking of using it as a pet system so i just wanna ask if it works even if one is a hero and the other one is different(pet i mean :D)

im new at this so pls tell me
 
Level 10
Joined
May 28, 2009
Messages
223
When I was testing the map it first worked out just fine, then I though: Let's test with some other point values to see how things work out.
Results
attachment.php

I changed the footman's Point Value from 4 to 2, and then from 4 to 6 in a new downloaded version. Still the same.
What should I do to fix this, or did I do something wrong?
 

Attachments

  • Strange Crash.JPG
    Strange Crash.JPG
    173 KB · Views: 284
Level 10
Joined
May 28, 2009
Messages
223
Well, yeah, but it tells me that there are 190 compile errors. Here it is:
attachment.php


Also I found this in one of the lines in the trigger:
  • Set GGroup[1] = (Units in (Playable map area) matching (((Custom value of (Matching unit)) Equal to (Custom value of (Ordered unit))) and (((Matching unit) is Unknown) Equal to False)))
That ''Uknown'' part I know my World Editor doesn't support.
Think you know what's wrong?
 

Attachments

  • Error window.JPG
    Error window.JPG
    253.7 KB · Views: 270
Level 10
Joined
May 28, 2009
Messages
223
I think I know what occurs the ''bug'' WEU has put all the ''is alive'' ''is dead'' functions into the function: Unit - unit classification check. The ''is dead'' is a stand alone function. Thats why the regular WE puts ''Uknown'' there. I think that anyway x)

*Edit
By the way, I can send you the map so you don't have to do squat but post it, considering you have time problems :)
 
Top