| 10-26-2007, 06:21 PM | #2 |
I think your explanation is pretty clear, except I don't think your tutorial title is especially fitting. Autocast to me is Blizzard's autocast functionality for spells. Your method casts spells on attack. The primary thing you'll have to fix, though, is that you have memory leaks :/. Normally, I think people can be a little overly picky about leaks, but this is an obviously troublesome leak that will eventually cause large problems - you'll want to fix it. To do that in GUI, you can clean them up using global variables and custom script. Somehow I'm still not 100% on what causes leaks (I'm not sure if you're leaking units or just locations), so I think someone more knowledgeable will come by with that. As an example of how to remove the location leak - New Global - TargetLocation (Type Location) Trigger: What you're doing there is cleaning up the code to make up for a mistake in the World Editor. It's complicated, but when you have a function running this often you don't want leaks. |
| 10-26-2007, 06:31 PM | #3 |
Cheers man, i'm don't have any knowledge of leaks at all. Thanks for pointing it out. Btw, the Custom Scripts' a must have? |
| 10-26-2007, 06:43 PM | #4 |
Just the one custom script. Newbies can copy/paste it. |
| 10-26-2007, 06:44 PM | #5 |
I wish they weren't necessary, because I know how confusing they can be when you're not used to looking at them. Unfortunately, Blizzard didn't include any of that kind of clean up for locations in the GUI editor, so you're forced to use custom script. |
| 10-26-2007, 07:11 PM | #6 |
Trigger: Custom Script: set udg_TargetLocation = nullWtf??? No no.....nulling globals isn't necessary, that isn't considered as a leak :) |
| 10-27-2007, 06:34 PM | #7 |
Silvenon is correct - no need for that final custom script line. Oops! |
