| 05-16-2007, 05:52 PM | #1 |
ok, im having a problem here. I need a unit that is unselectable, but still to be picked when using GroupEnumInRange. I do still by adding locust, then adding chaos to transfer in into another unit. Problem is, my unit then suddenly is collidable by other units, meaning they cant move trough certain passages. SetUnitPathing doesnt have any effect on the other units, only itself so thats a no-go. Ideas? (flying is out of the question too, since they diverge) |
| 05-16-2007, 06:04 PM | #2 |
Why not add each of said units to a global group when the unit is created? Then, you could make a custom function that took units from that group and compared how close they were to the center of the point to enum from. |
| 05-16-2007, 06:11 PM | #3 |
most probably too slow, but if all other options fail it might be my only option. |
| 05-16-2007, 06:28 PM | #4 |
Adding the Ghost ability might work. Shades have some version of it. |
| 05-16-2007, 06:33 PM | #5 |
the ghost ability makes them invisible (if it even does the job), not possible :s, ghost (visible) doesnt work (only reduces the collision to 1). |
| 05-16-2007, 06:38 PM | #6 |
Unfortunately I don't have access to WC3/WE at this minute, otherwise I'd test this instead of posting it, but does ghost have any fadetime related stuff? -1 to never fade potential or something. |
| 05-16-2007, 06:38 PM | #7 |
1) register take damage event for units 2) use damage area native 3) group damaged units 1) add items to dummy inventory 2) link items to there owners 3) use items in rect check 1) make dummy units with NO model file eg _.mdx == not selectable by player 2) link an other unit with needed FX to dummy 3) dummy will be detectable by GroupEnumInRange FX unit not |
| 05-16-2007, 07:00 PM | #8 |
No blue, no fadepoints. Landmine does have it, but im having trouble with it. Thanks, smart thinking there. If my current idea fails (land mine ability) then ill definatly try one of yours. 3rd will not work because no model has no fx attachment point. and im pretty sure you can still drag select it. Edit: land mine works like a charm, just have to use a 0.00 timer to make chaos take it effects before adding land mine to it :( Edit2: it seems that chaos has a delay in getting to work, are all morphing abilities like this? what exactly is this delay? Edit3: simply adding the landmine ability to the morphed unit as permanent ability does the trick (thx blu) |
| 05-16-2007, 10:40 PM | #9 |
Would my idea really be that slow? Something akin to this: JASS:funcntion GroupEnumUnitsInRangeWithDummies takes group g, real x, real y, real radius, boolexpr filter returns nothing local group g2 = CreateGroup() local unit u local real x2 local real y2 call GroupEnumUnitsInRange(g, x, y, radius, filter) call GroupAddGroup(udg_MyUnitGroup, g2) loop set u = FirstOfGroup(g2) set x2 = GetUnitX(u) set y2 = GetUnitY(u) if SquareRoot((x2-x)*(x2-x)+(y2-y)*(y2-y)) < radius then call GroupAddUnit(g, u) endif call GroupRemoveUnit(g2, u) endloop call DestroyGroup(g2) set g2 = null set u = null endfunction |
| 05-17-2007, 08:54 AM | #10 |
u cannot use tat jass, cus u cant get EnumUnitInRange for locust units |
| 05-17-2007, 10:51 AM | #11 |
no model units complete invisible if no shadow and cannot be drag selected. |
| 05-17-2007, 10:57 AM | #12 |
yes, you are right about that. You still cant attach fx tho. but its np, landmine ability does the job very well. |
| 05-17-2007, 05:35 PM | #13 |
MaD[Lion], are you retarded? That doesn't enum for dummy units... it loops through a group that contains all the dummy units and checks the distance between them and the target X/Y. |
| 05-17-2007, 06:10 PM | #14 |
It's viability depends on how many units you have. It would generally not be a good idea, as it's speed can go south pretty quickly if you get a decent number of locust units and you need to do it fairly often. |
| 05-18-2007, 04:58 AM | #15 |
Yeah, I recently realized that that was probably what he was going to be using it for, ><. |
