| 09-08-2006, 05:28 PM | #2 |
Trigger: Set HookDummy[0] = (Last created unit)Also, Do Nothing does nothing but take up processing time. |
| 09-08-2006, 05:28 PM | #3 |
Your hook dummy units are overwriting each other in the array at the moment. Perhaps try (in your first trigger) setting HookInteger[Player number of owner of casting unit] = ((Player number of owner of casting unit) - 1) * 100 + 1. (And change the condition in the second trigger to If HookInteger[HookLoopInteger] modulo 100 >= 42 or >= 2 for the different cases) You would also need to set the first one (the one you currently set to 0 in the array) to be at the HookInteger[Player number of owner of casting unit] - 1 in the HookDummy array. |
| 09-08-2006, 06:32 PM | #5 |
I've added some lesser but effective optimizations Trigger: Meat Hook![]() Actions![]() ![]() Custom script: local location udg_TempPoint![]() ![]() Custom script: local location udg_TargPoint![]() ![]() set TempPoint = Position of (Triggering unit)![]() ![]() set TargPoint = (Target point of ability being cast)![]() ![]() Unit Group - Remove all units from HookDummies[(Player number of (Owner of (Triggering unit)))]![]() ![]() Unit Group - Add (Triggering unit) to HookDummies[(Player number of (Owner of (Triggering unit)))]![]() ![]() Set HookAngle[(Player number of (Owner of (Triggering unit)))] = (Angle from TempPoint) to TargPoint)![]() ![]() Unit - Add a 0.10 second Generic expiration timer to (Last created unit)![]() ![]() Set HookCaster[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)![]() ![]() Set HookInteger[(Player number of (Owner of (Triggering unit)))] = 1![]() ![]() Set HookExpanding[(Player number of (Owner of (Triggering unit)))] = True![]() ![]() Unit - Create 1 Dummy Chain for (Owner of (Triggering unit)) at (TempPoint) facing HookAngle[(Player number of (Owner of (Triggering unit)))] degrees![]() ![]() Custom Script: call RemoveLocation(udg_TempPoint)![]() ![]() Custom Script: call RemoveLocation(udg_TargPoint)![]() ![]() Custom script: set udg_TempPoint = null![]() ![]() Custom script: set udg_TargPoint = nullI suggest to check this tutorials to convert triggers to JASS. Check here and here |
| 09-08-2006, 09:10 PM | #6 |
Last time i was around the "local global... exploit?" only worked with one global. |
| 09-08-2006, 09:14 PM | #7 |
It does. Also, no point using the local trick where there is no wait, as you can just use a temporary global. Speed difference probably favours globals, as well, though there is basically no difference. |
| 09-09-2006, 08:37 AM | #8 | |
Quote:
It may take up processing time, but the spell currently runs lag-free at my laptop (its 6 years old). However, its just some old stuff i got used too. Ill remove it. And i will try using TideHunters trigger first... EDIT: The minimap ping was just a check to see if my locations was right during multiinstance testing Reconfigured the triggers, using TideHunters ones. Now testing Works excactly as my own triggers, only possible difference is less processing capacity use. Fucks up once two ore more players cast it at same time... Then a lot of stuff comes from the map center... Dont work onless only one cast it at same time. Current plan is to check Moyacks tips and convert the stuff into JASS. |
| 09-09-2006, 08:45 AM | #9 |
TideHunter didn't do anything about the MUI of the spell. The version he posted has the same problem I described above. |
| 09-09-2006, 09:17 AM | #10 |
Yeah, lol, i saw that... But excactly WHERE shall i input your math? Might you copy my trigger text, input your math and show me excact where? Now i even discovered ONLY player 1 can cast it too, lol... Else the hook casts from the map center. Didnt see that cause i placed my multiinstance tester at map center. |
| 09-09-2006, 09:38 AM | #11 |
I did tell you where. Your triggers are too long for me to modify the bits easily (seeing as I can't just c+p into WE). You also learn a lot more if you fix stuff yourself, which is why other people shouldn't just make your triggers and fix everything for you. Helping you find mistakes is fine, rewriting your triggers to fix your mistakes so that you end up learning nothing is not. |
| 09-09-2006, 12:47 PM | #12 |
My post just removed your location leaks. The MUI part i could not find, blu has the answers! rawr. |
| 09-09-2006, 08:12 PM | #13 |
Now im testing your modulo stuff, hopefully works, but its easier if you write it as a trigger, instead of that stuff it is currently written as: evrything spread over two or three lines, making it difficult to see wats seperated and whats not. Anyways, i think i put it together right, so im testing now. |
| 09-09-2006, 09:59 PM | #15 |
Ok, you mostly just got some of your bracketing wrong now (which is why I hate GUI, the arithmatic is so messy to use). Trigger: Set HookDummy[((Player number of (Owner of (Triggering unit))) - 1)] = (Last created unit)Trigger: Set HookDummy[(HookInteger[(Player number of (Owner of (Triggering unit)))] - 1)] = (Last created unit)Trigger: HookInteger[(HookLoopInteger mod 100)] Greater than or equal to 42Trigger: (HookInteger[HookLoopInteger] mod 100) Greater than or equal to 42I'm attaching the version I modified to fix those, so you can see the changes more easily (and I did test it and it worked fine, including with two casting simultaneously; I even had them hook each other at the same time :P). |
