| 05-14-2007, 04:08 AM | #1 |
I though of a way to get units in range that has locust and belongs to a group. This is for collision detection on locust units. But i dont know how slow this is. -If i pick all units in a group -remove locust -hide/unhide -GetUnitInRange -do collision detections -add locust will this be possible in theory? |
| 05-14-2007, 09:43 AM | #2 |
create rect and detect units in rect |
| 05-14-2007, 10:16 AM | #3 |
Locust units don't have collision as far as I know... but that's probably innate knowledge at this stage... |
| 05-14-2007, 10:24 AM | #4 |
The problem with rects is that they're always square or rectangle, which means you can't use it to detect 'Units in Range' because some will be left out. |
| 05-14-2007, 11:06 AM | #5 |
im not asking for an alternate solution, im asking for if my theory works (in theory). Creating rect or whatsoever is really slow for collision detection system. |
| 05-14-2007, 01:09 PM | #6 | |
Quote:
in theory your "solution" should work yes, but I dont think it will be nearly fast enough, but its worth a try. |
| 05-14-2007, 09:37 PM | #7 |
Sry for off topic but...What does people mean by "not fast"? |
| 05-14-2007, 11:06 PM | #8 |
not fast == slow fast != slow fast is good slow is bad Usually you don't notice the speed of functions and natives. When you make a system that does a lot of calculations every time-step (about 0.035 for visual systems), the speed of functions becomes noticeable. Increasing speed is then a most, as systems that are "not fast" and not optimized will lag. |
| 05-15-2007, 05:39 AM | #9 |
my system do calculation every 0.03 ;) |
| 05-15-2007, 09:34 AM | #10 | ||
Quote:
!!! a + you must call for group ! the for group intialization is fucking slow ! (i think they use some rocket alg to call custom functions cause for group 1 unit is slower than to do this manualy but if you have a bunch of unit's (100) for group is faster than to loop throuht !!!) so i don't know... i would say this solution sucks ! + i am got a 100% better solution ! =) USE VEX TRICK TO MAKE UNITS UNSELECTABLE BUT I MAKES UNITS TARGETABLE + GroupEnumUnitsInRange works very well ! + (don't forget to add Invurnablility) but it's you disicion... Quote:
|
| 05-15-2007, 11:00 AM | #11 |
why would i do for group -.- |
| 05-15-2007, 02:44 PM | #12 | |
because for group is freakin awsome, thats why. is for group still slower if you you firstofgroup loop and want to keep the units? like, have 2 groups, delete units from 1, add them to the other and use the other group the next run trough? Quote:
which would be? |
| 05-15-2007, 08:03 PM | #13 | |
Quote:
UnitAddAbility(u,'some chaos transform spell') UnitAddAbility(u,'Aloc') and if you got alot unit's in group ForGroup is faster than a loop ! |
| 05-15-2007, 08:05 PM | #14 |
noone is talking about alot of units here. |
| 05-15-2007, 08:19 PM | #15 |
100 are alot =) |
