| 04-24-2007, 08:59 AM | #2 |
every time u do 'center of .....' u create a point, and this point stays in memory -> leak. You should create an array of points that u initialise. Like this : JASS:local integer i = 1 loop exitwhen i > numberOfRegions set udg_centers[i] = GetRectCenter( udg_Region[i] ) endloop |
| 04-24-2007, 11:49 AM | #3 |
Woah, your trigger is kindof confusing, too many matching unit is equal to and number of matching unit and matching unit not equal too. You could use Triggering Unit rather than Matching Unit. What is the point of this (Number of units in (Units within 512.00 of (Center of Region[1]) matching ((((Matching unit) is alive) Equal to True) and (((Unit-type of (Matching unit)) is A structure) Equal to False)))) Greater than or equal to 1 when your trigger wont execute unless (Number of units in (Units in Region[1] matching (((Matching unit) is alive) Equal to True))) Less than or equal to 1 but then again, how big are the regions, is this like a risk game? |
| 04-25-2007, 04:01 AM | #4 |
This is a risk game. Good point I, lol I don't need those conditions twice. The regions are very small, smaller than a normal circle of power. I don't know any JASS unfortunately. does your loop create a variable for each and every region? If so thats hilarious; I've manually created hundreds of variables, adding 1 each time. So as to the main point, which is manually creating each trigger over and over again, is there some jass function thing like the one posted by Slider that will automatically do each trigger? |
| 04-25-2007, 10:52 AM | #5 |
Create a region array and set up an init trigger that adds each region to the array and then you can loop through the array and you could have a trig like, |
| 04-27-2007, 04:04 AM | #6 |
I did something similar before, however when I did the killing unit would transfer to a random region. This is caused by the interger A. Since its not specified, it will send to any region chosen for integer A. Of course, unless I missed something. |
| 06-24-2007, 03:35 AM | #7 |
hmm, it should move to the region... you could try move unit to position of dying / triggering unit... i think that works |
| 06-24-2007, 04:46 AM | #8 |
It sounds like you had used a random integer not an array. |
| 06-24-2007, 08:40 AM | #9 |
To do the same thing that Sliderman does in GUI - Trigger: Centres[] is a point array and Regions is your region array. Whenever you need to do something at the centre of a region, use Centres[]. This will reduce your leaks. |
| 06-25-2007, 12:01 PM | #10 |
He would need to initialise the Regions array first, though. This would be so much easier to do in Jass, you would just initialise a regions array and then your script could auto-generate the triggers needed. Or, with a preprocessor, you could use textmacros... GUI sucks. Really. I can't think of a good way to do this in GUI, the best GUI way might actualy be to create 125 triggers manualy. Disastrous. |
| 06-25-2007, 02:44 PM | #11 |
dont even suggest using 175 triggers.... |
| 06-25-2007, 02:54 PM | #12 |
No, I'm suggesting you use Jass. |
