| 08-29-2006, 03:34 AM | #2 |
The event : "Unit - A unit Begins casting an ability " Is the devil, it happens before the unit spends mana/cooldown. In fact I am able to exploit it and cast spells for free if they are trigger enhanced and use that event, use Starts the effect of an ability instead |
| 08-29-2006, 03:41 AM | #3 |
I did point out that it can go either way. I doubt 99% of people are going to know enough/think about it. However, I will change it for all intents and purposes. Anything else i should know about? |
| 08-29-2006, 04:38 PM | #4 |
*bump* err sorry mods and admins I'm just a little impatient :p But uhh.. Is there anything this tutorial could improve on? Change? Add/Subtract? |
| 09-10-2006, 06:16 PM | #5 |
Hey, this is pretty good, i like it. And it covers pretty much all there is about the topic, congratulations! *Approved* |
| 09-10-2006, 07:17 PM | #6 |
I'd like to mention that the last method is quite tricky and should be explained more in detail than that. There are some seirous problems and when using the locals in loops or "pick up every unit"'s or "wait for condition" or similar codes which create a separate function, you will end up with LOADS of errors. Even though the method solving this problem is very stupid especially for someone using JASS, here is the thing: 1. Create the local like always 2. Just before the structure using a separate function store the local into a temporary global. 3. Into the structure first thing to do is create the local and give it the value of the temporary global. Voila, problem solved! Edit: Oh, and the fact that the spell is cast only by a single unit on the map, doesn't make it multiinstanceable. It is wrong to say that. It just does NOT REQUIRE to be MUI. ~Daelin |
| 09-10-2006, 08:00 PM | #7 |
Oh yes, I've edited out the wording error you pointed out, Daelin. |
| 09-11-2006, 05:06 AM | #8 | |
Quote:
Can you give me example code to make Locals work in an if/then statement? I am having troubles with it. Particularly, if the CONDITIONS of the if/then statement use the local. |
| 09-11-2006, 06:12 AM | #9 |
Well... it's something like this. Edit: Crap, it doesn't work for condition functions because I simply don't have where to set the local. :( For anything else it would go like this: Trigger: I really doubt it is possible to make looping conditions MUI. Sorries. Edit: Found how to make the "Wait for condition" stuff. It works if doing something like this: Trigger: Replace x with the delay between checking if condition to exit the loop has become true. All trigger's locals work in this loop because it is created in the initial trigger. This way, you can make "Wait for condition" work with the locals in GUI trick. I still need to think about locals in conditions though... ~Daelin |
| 09-13-2006, 12:06 AM | #10 |
yay, approved at last. Haven't been on lately, kinda gave up modding until i can get Warcraft onto my new computer. So is the error Daelin pointed out fixed? I did forget to mention that in If/Then/Else you would have to redeclare the variable. I forgot about that completely. *do'h* I did have problems trying to use locals with If/Then/Else. Thanks for pointingf that out Daelin, I'll add that now. |
| 09-13-2006, 12:08 PM | #11 |
Wulf... I actually explained how the stuff works in some cases. If you have just a pick up every unit you can first initialize the local to a global, then in the pick up just recreate the local and give it the variable of the global. ~Daelin |
| 09-14-2006, 09:11 AM | #12 | |
Acording to this tutorial, the "local variable" method is the best one, right? I had already found the 2nd method by myself but i had the problem that Neutral Hostile units couldn't had the ability becouse they dont have player number. With method 3 that would be solved right? I have 1 question though... I didn't understand very good the last part: Quote:
This means... only 1 ability in the map can have this trick? Or i can apply this to only 1 variable in the whole map?... im confused.... ![]() |
| 09-14-2006, 09:15 AM | #13 | |
Quote:
They do... neutral players are between 13 and 16 in GUI. In JASS players are 0-15. |
| 09-16-2006, 09:17 PM | #14 | |
Quote:
Thank you for reading my tutorial :D. What I mean is, you can only use this trick once per trigger. Probably should clarify on that. Thanks for pointing that out for me. |
