| 06-24-2007, 05:16 AM | #1 |
Yeah, I posted this in another topic... http://www.wc3campaigns.net/showthre...194#post943194 #1
I think I might make a map using this system, but I was just curious how to fix the leaks... They all have the same leak, so I'll just post one up.Trigger: Would the solution to this be... Trigger: Move DeLeaked
![]() Conditions
![]() ![]() (Unit-type of (Casting unit)) Equal to Melee Command Tower
![]() ![]() (Ability being cast) Equal to Move (Neutral Hostile)
#2
Now here's one that REALLY bothers me, because I can't find any real way of de-leaking it without having to completely alter the foundations of it (which I don't want to do.I want to make it so that units can be continuously added into the group. Trigger: Select
![]() Conditions
![]() ![]() (Unit-type of (Casting unit)) Equal to Melee Command Tower
![]() ![]() (Ability being cast) Equal to Select
![]() Actions
![]() ![]() Unit Group - Pick every unit in (Units within 300.00 of (Target point of ability being cast)) and do (Actions)
![]() ![]() ![]() Loop - Actions
![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
So... my questions are... - #1 Have I solved the leak? - #2 How the hell do I solve the leak? |
| 06-24-2007, 07:11 AM | #2 |
In the first trigger, you've still got a point leak. You'll want to do this: Trigger: As to your second trigger, you're leaking a group and a point; to fix it, simply add these lines before the "Pick every unit..." line: Trigger: ![]() Set TempPoint = (Target point of ability being cast)![]() Custom script: set bj_wantDestroyGroup = trueTrigger: Custom script: call RemoveLocation(udg_TempPoint) |
| 06-24-2007, 07:46 AM | #3 | ||
Quote:
I was aware of the point leak, just was too lazy to repair it at the time. Quote:
So... I didn't have an actual leak? It was just a point leak? Or is my Pick All Units and Add To Group thing bleeding all over the place? |
| 06-24-2007, 07:50 AM | #4 |
There was a group leak in the second one, that's all besides the point leaks. In the second trigger, you should again change all instances of "casting unit" to "Triggering Unit". |
| 06-24-2007, 08:12 AM | #5 |
Why am I using Triggering Unit? And... how do I fix said Group Leak in #2? |
| 06-24-2007, 08:29 AM | #6 |
You fix the group leak by adding the line (Custom script: set bj_wantDestroyGroup = true) right before the Group loop. As for why you should use "Triggering Unit", it's because "Casting Unit" really is just an extension of "Triggering Unit", and eventually just returns the same thing. Additionally, Triggering Unit carries through waits and stuff while Casting Unit does not. |
| 06-24-2007, 08:34 AM | #7 |
Um... I don't mean to be retarded/obscure... but could you show me an example of the CS usage? |
| 06-24-2007, 09:10 AM | #8 |
By using that custom script, you're telling the game that the next group to be created will be destroyed when it's finished looping for all of its units. |
| 06-24-2007, 09:45 AM | #9 |
Now I might REALLY sound dumb, but is that a boolean-variable comparison? |
| 06-24-2007, 10:39 AM | #10 |
Custom script action. You have to type it in yourself. |
| 06-24-2007, 10:59 AM | #11 |
Are you looking for a kind of mass move system? I.e. one unit sets a destination location, and a defined group of other units - group size 1 to several hundred - moves to that location. If that's what you're looking for, I could help you out with a pretty good "mass move system". Pm me, or dunno, shout-aloud... |
| 06-25-2007, 05:46 AM | #12 |
I'm very happy with my mass-move system, thank you very much, I don't need somebody else dashing my hopes. Anyway, I don't think that will completely satisfy what I want. That destroys the group after it's use, right? In that case, it means that the groups must be reselected over and over again. |
| 06-25-2007, 06:16 AM | #13 |
No. It only destroys the created group. This part: "Unit Group - Pick every unit in (Units within 300.00 of (Target point of ability being cast)) and do (Actions)" |
| 06-25-2007, 06:22 AM | #14 |
I see... thanks for un-leaking my system! +Rep |
| 06-25-2007, 03:11 PM | #15 |
I got a mass move system that makes them move in formation of 9 units, but I dont need them any more you want it? |
