| 04-01-2008, 03:05 AM | #2 |
Whats happening? You have to tell us more than "this doesn't work". |
| 04-01-2008, 03:07 AM | #3 |
o well its sopposed to be an orbiting trigger that makes the planet orbit the sun GASP WHO WOULD TIHNG A PLANET ORBITS A SUN well when i try and test it the planet just goes poof and disappears |
| 04-01-2008, 10:04 AM | #4 |
please use the [GUI ] wraps when posting code, it makes it a lot easier to understand |
| 04-02-2008, 01:12 AM | #5 |
does that help? |
| 04-02-2008, 06:57 AM | #6 | |
Quote:
|
| 04-02-2008, 07:05 AM | #7 |
Is the movement speed of the 'Planet near sun' zero? Try pasting this in your map header: JASS:function MovePlanet takes unit sun, unit planet returns nothing local real x = GetUnitX(sun) local real y = GetUnitY(sun) local real xd = GetUnitX(planet)-x local real yd = GetUnitY(planet)-y local real d = SquareRoot(xd*xd+yd*yd) local real a = Atan2(yd, xd)+0.05236 call SetUnitX(planet, x+Cos(a)*d) call SetUnitY(planet, y+Sin(a)*d) endfunction Trigger: Custom script: call MovePlanet(sun value, planet value) |
| 04-02-2008, 08:57 AM | #8 |
I dont see why u dont just use a variables and do it like: |
| 04-04-2008, 12:09 PM | #9 |
i did that on my map http://www.epicwar.com/maps/48394/ Example: Trigger: ![]() event - Every 0.4 seconds
![]() actions
![]() set r_Circle = Angle between Sun_unit and Planet_Unit + 1.00
![]() Unit - Move Planet_Unit instantly to (position of(Sun_Unit) offset by 300 towards r_Circle degrees) |
