| 10-18-2004, 11:12 PM | #1 |
Hi all, In Warcraft III Worms we have wind as units with a special wind model that are replaced on a random point in the map each 3 seconds (the time of the wind model's animation) for that we have this trigger that runs every x seconds: Code:
function Trig_Wind_Actions takes nothing returns nothing
local unit cloud
set cloud = GroupPickRandomUnit(udg_WindUnitGroup)
call ResetUnitAnimation( cloud )
set udg_tempPoint2 = GetRandomLocInRect(GetPlayableMapRect())
call SetUnitPositionLocFacingBJ( cloud, udg_tempPoint2, udg_varWindDirection )
call RemoveLocation( udg_tempPoint2 )
call GroupRemoveUnitSimple( cloud, udg_WindUnitGroup )
call PolledWait( 3.00 )
if (cloud != null) then
call GroupAddUnitSimple( cloud, udg_WindUnitGroup )
endif
set cloud = null
endfunction |
| 10-18-2004, 11:19 PM | #2 |
you mean a lag delay? cause that would be somewhere else. |
| 10-18-2004, 11:22 PM | #3 |
nah, it isnt really lagging, its weird, I have never seen it before. Everything moves smoothly but it takes like 3 seconds from u clicking the mouse button and your worm reacting (and it isnt a bad host, cuz host himself has delay aswell)... And it is this trigger for sure, when I dont run this trigger, all delay is gone... |
| 10-19-2004, 06:52 AM | #4 |
can you show the GUI equivalent - i cant be bothered sifting through jass |
| 10-19-2004, 07:34 AM | #5 |
Guest | Might it be the `too many units' bug? You might want to change the wind units to being wind doodads, if it is possible... the more units you have, the longer it takes from them to react to a move order. Other abilities are not affected, tho, which is how you can tell that this is the culprit. |
| 10-19-2004, 07:41 AM | #6 |
try making the polled wait 2.99 instead. you kind of end and start it at the exact same time. may do wierd stuff. but ya too many units is a good idea too. |
| 10-19-2004, 11:21 AM | #7 |
Iguess destructibles would work, gonna give it a try... |
| 10-19-2004, 12:04 PM | #8 |
hmm, making it destructibles makes it really "lag", because you cant instantly move a destructible... any other ideas? |
| 10-19-2004, 07:19 PM | #9 |
Guest | Does it still lag if you reduce the number of wind units? What is the purpose of moving them around? You might be able to just hide/unhide them if you don't need too many. Or create then destroy them. Or even... could you make them into an SFX? o.0 Did you say the wind units have a custom model? |
| 10-19-2004, 08:09 PM | #10 | |
Quote:
|
