| 05-04-2006, 10:02 AM | #2 |
If this is for Tropical tag, where you can have only one ensnarable unit per hero (?), then yes, it should work fine. Why not use the GUI local variable hack instead of an array? I am a little afraid of all the spell events other than starts the effect of an ability, but if it works it works. |
| 05-04-2006, 10:24 AM | #3 |
A unit begins casting can be abused, as it makes the trigger fire before cooldown starts and mana is taken, so fast players can cheat. Use the "A unit starts the effect of an ability" event. |
| 05-04-2006, 11:03 AM | #4 |
My concern with this spell comes from another trigger I had awhile back. I had a trigger similar to this one that would add a sight range decreasing ability and remove it 5 second later. Problem was, it failed to remove it sometimes. So, I need to make sure that won't happen with this one. The difference is that I am using player number owner of triggering unit rather then player number owner of target of ability being cast. And yes, each Naga can only net once every 60 second so I think that won't be a problem.. |
| 05-04-2006, 07:26 PM | #5 |
not MUI, and in the light of using JASS, not flawless, however will it get teh job done, prolly |
| 05-05-2006, 02:38 AM | #6 |
Why do I get the feeling the array size should be 4 instead of 1? |
| 05-05-2006, 02:55 AM | #7 | |
Quote:
Array size does not matter at all. All arrays are 8192 in size. All array size does is, say you have a timer array, setting the size to 4 will automatically create 4 timers for you. That's it. To MUI it, do what Pipedream says for localizing the variable (and also use "starts the effect"). Delete your Ensnare_Unit variable, and instead make a unit variable called TEMP_Unit. Then do this: Trigger: Ensnare |
| 05-05-2006, 03:00 AM | #8 |
try that cept instead of A000 u do ur ensare prevention thingy |
| 05-05-2006, 03:01 AM | #9 |
You can't do that, Immoralis, because 'u' doesn't show up in the variables list. You're also leaking the reference. |
| 05-05-2006, 03:03 AM | #10 |
I figured that out and edited it right as you were replying, anyway how does it leak |
| 05-05-2006, 03:05 AM | #11 |
You need to set all handle derived types to null before returning. That means set u = null. There isn't much point in turning everything to custom script; you may as well just JASS it. |
| 05-05-2006, 03:30 AM | #12 |
It is only necessary to change the value of handle derived types if you intend to deallocate the object at some point. Since this is a permanent hero, it's not strictly necessary, but it would certainly be good style. |
| 05-05-2006, 03:32 AM | #13 | |
Quote:
Well, it's actually cast on a unit, so if that unit were to die sometime after being webbed, and then decay several minutes later, THEN it would leak. Heh. [edit] Oh, right, it's for a tag map. Nevermind then. |
