HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Movement

10-22-2007, 10:04 AM#1
The Elite
Ok, i tried to type out a good sentence describing this so ill just ask this.
This is my code:
Collapse JASS:
      loop
        exitwhen loophigh == looplow
        set newloc = PolarProjectionBJ(newloc, 20, angle)
        call SetUnitPositionLoc(dummy, newloc)
        set looplow = looplow+1
        call TriggerSleepAction(0.30)
      endloop
What should the highlighted area be?. The unit should move 100 distance. It's probably pretty obvious but it's late here and im in need of sleep.
10-22-2007, 10:35 AM#2
Blackroot
Quote:
Originally Posted by The_Elite
Ok, i tried to type out a good sentence describing this so ill just ask this.
This is my code:
Collapse JASS:
      loop
        exitwhen loophigh == looplow
        set newloc = PolarProjectionBJ(newloc, 20, angle)
        call SetUnitPositionLoc(dummy, newloc)
        set looplow = looplow+1
        call TriggerSleepAction(0.30)
      endloop
What should the highlighted area be?. The unit should move 100 distance. It's probably pretty obvious but it's late here and im in need of sleep.

I'm really not sure what the question is. 100 distance over what period of time . Also you are leaking locations with PolarProjectionBJ. You need to call RemoveLocation(newloc) after you use SetUnitPositionLoc.
10-22-2007, 02:29 PM#3
MaD[Lion]
this is a terrible way to do it, since triggersleepaction is hell not accurate.
u will get a laggy result. Use periodic event or timer is better.
i recommend periodic event
10-22-2007, 05:32 PM#4
Toadcop
Quote:
this is a terrible way to do it, since triggersleepaction is hell not accurate.
it's cause avoid desyncing... (so it must sync between players) to get exact results. otherwise it may cause ALOT of troubles...