| 07-25-2007, 04:42 PM | #2 |
I think your second Pick Every Unit actions should be embedded in the first. As it is now, the second loop will only use the last group as defined by the first loop, it won't use each group as it is created. |
| 07-25-2007, 04:50 PM | #3 | |
Quote:
|
| 07-25-2007, 04:56 PM | #4 |
> bad, dont embed Pick Every Unit, that will cause some stuff not to work as planned sometimes, but if you really feel like it, then try it yourself. Why would that happen? It certainly looks like that's what the code needs. |
| 07-25-2007, 05:07 PM | #6 |
You need to destroy the second unit group inside the first unit group loop. Otherwise you only get rid of the last leak. On an unrelated note, does anyone know why I can only post once every 10 minutes? |
| 07-25-2007, 05:18 PM | #8 |
still lags bad |
| 07-25-2007, 05:19 PM | #9 |
I would destroy the group right after it's used, not before it is declared. Also, I don't think that every .01 seconds is any different from .03 seconds. I think the game only allows a minimum of something like .027 second intervals. If you still get lag, you might try increasing the interval. Lastly, there's no need for the Do Nothing action. What's it going to do if you don't put it there? :P |
| 07-25-2007, 07:35 PM | #10 |
@EvilMapCreator Please don't double post, there is an edit key. Also do not bump your post unless it is more than two days old. Site policy. @Ghan 04 You can't post more than 1/10 minutes to prevent spamming. How many 'Water' units are there? Chances are that the lag is caused by the 'pick every unit in unit group' command going through an incredible amount of units. If you only need to control one 'Water' unit, then as soon as you create it, set it to a variable and use the same commands (using (last created unit) to identify it), completely bypassing the 'pick every unit' command. I'm confused why you would set the 'Water' units to a unit group if you only have one. For the command Trigger: Set UnitGroup[2] = (Units within 120.00 of (Position of (Picked unit)) matching (((Matching unit) Not equal to (Picked unit)) and (((Matching unit) is alive) Equal to True)It seems like you are trying to make the damage affect only enemies. Trigger: (((Owner of (Picked unit)) is an ally of (Owner of Units[1])) Equal to False) or ((Owner of Units[1]) Not equal to (Owner of (Picked unit)))As Ghan 04 said, the biggest lag factor is increasing the periodic time. There is a certain point where people simply cannot notice the difference between moving 2 feet every 0.01 seconds and 10 feet every 0.1 seconds. Try and find the highest interval that still gives a good effect. Finally, yeah. Remove the 'do nothing' it is pointless. |
| 07-25-2007, 07:39 PM | #11 |
> You can't post more than 1/10 minutes to prevent spamming. Does that ever get lifted as I become more active? Yep. I agree. You can limit the unit group to the units you want when it is defined, with no need of an If/Then/Else function. That should help your lag. |
| 07-25-2007, 08:24 PM | #12 | |
Quote:
Do not use nested Group Loops! They will get fucked up when you refer to "picked unit" (in JASS: GetEnumUnit()) inside the second loop because the game won't know which picked unit to refer to. However, if you do what you've done, evilmapcreater, and set the first Picked Unit to a variable before starting the loop, you should be fine. |
| 07-25-2007, 08:28 PM | #13 |
> They will get fucked up when you refer to "picked unit" > However, if you do what you've done, evilmapcreater, and set the first Picked Unit to a variable before starting the loop, you should be fine. That's basically what I thought. I think it refers to the most recent picked unit, so if you want to use the other one, you have to store it. > It's only for the first month after you join. Hmph. What? Am I a spammer? Not like I'm new to WC3 or anything.... (I'm a mod on TH) |
| 07-25-2007, 08:34 PM | #14 |
No, it's not singling you out; the post delay is active on all new members unless Vexorian or Tim. disables it for some amount of time. It's to prevent massive spam attacks from people who register new accounts. |
| 07-26-2007, 05:35 AM | #15 |
Try .04 instead of .01 it may not seem like alot, but it cuts the amount of calculations the computer has to do every second by 4 times. |
