| 07-17-2007, 07:44 PM | #1 |
Wow I don't know why this didn't work...sucks ass that it didn't too because I did this like 250 times...Heres the jist of the trigger. I just wanted to assign unit groups through variables, thinking that if I did it would make the rest of my triggerring easier. Anyone know why the trigs I use the variables in don't work? Im pretty sure it has nothing to do with the triggs I use the variables in, but if the trig below seems fine then I'll post the triggs I used the groups in. Trigger: Untitled Trigger 001
![]() Conditions
|
| 07-17-2007, 07:49 PM | #2 |
I don't see a problem there unless in your other trigger you're clearing your unit groups. please post the triggs you used the groups in. |
| 07-17-2007, 10:44 PM | #3 |
should probably be Trigger: Untitled Trigger 001
![]() Conditions
|
| 07-17-2007, 10:47 PM | #4 |
erm, Territory and defense tower are apparently units, and TerritorySet seems to be an array of unit groups. |
| 07-17-2007, 10:50 PM | #5 |
hmm.. it seems so. Try a debug messege to see if the variables are actually working, IE: Pick Every Unit In TerritorySet[X] and Create Minimap ping at location at (picked unit). |
| 07-18-2007, 04:52 AM | #6 |
You have to go to variables (ctrl + b) and click on your variable for array. Then change it to the value of 128. So the array would have the capacity to hold 128 groups. |
| 07-18-2007, 07:19 AM | #7 |
and if it's an array of 128, it goes from 0-127 not 1-128. |
| 07-18-2007, 07:51 AM | #8 |
wait wait what? I already tried a "debug trigger" by for each integer a from 1-128 remove units in unit group territory set a. didn't work. i'm not quite sure what gamesmasher is saying/ and what i do understand i dont understand what that would do. |
| 07-18-2007, 08:31 AM | #9 |
GamesSmasher is telling you to increase the array limit in the Variable module. Since the group has to be created, you need to tell the game to create them, before you can add units to them. You can either do this by increasing the array limit, or using a bit of custom script: Trigger: ![]() Custom Script: set udg_TerritorySet[1] = CreateGroup()
![]() Custom Script: set udg_TerritorySet[2] = CreateGroup()
![]() Custom Script: set udg_TerritorySet[3] = CreateGroup() |
| 07-18-2007, 09:26 AM | #10 |
I think this can be done in Variable manager when you set default value to empty group. |
| 07-20-2007, 06:56 AM | #11 |
Sorry for late response, my great and very reliable internet service was working well once again. /sarcasm off. Ok so doing what Gamesmasher said should fix the problem I'm having? |
| 07-20-2007, 07:14 AM | #12 |
Is the TerritorySet a Unit Group Array? Sorry, trying to clarify a few things. |
| 07-21-2007, 05:46 AM | #13 |
Yeah, it is. There will be 128 of them |
| 07-21-2007, 08:12 AM | #14 |
You're adding units to group variables which points to groups that aren't even created. Do what Ammorth said, initialize them with set <your variable name> = CreateGroup() |
| 07-21-2007, 10:38 AM | #15 |
You don't need to initialize them with custom script. Do what Gamesmasher said. Horses for courses people. |
