• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Orbital question

Status
Not open for further replies.
Level 6
Joined
Apr 23, 2011
Messages
182
Hi. I was wondering around if its posible to make this thing with triggers:

I have a 3 units: A) Sun - B) Planet - C) Ship

The planet is moving every 0.03 seconds in a circle around the sun. The moon also around the planet.

I need a C) (like a space ship) to move inside the planet orbit or area. Like to transport-fight something like that. My problem is that if the Planet is moving every second like 50. But i want the transport to move freely (like normal movement No trigger move instant ect) inside the orbit of the planet.

Any thoughts?


PD* the transport is 10% scale of the planet moves around the same 5 per second.
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
I'm not exactly sure what you mean.

Do you want the ship to orbit the sun along with the planet? e.g. if you tell the ship to move to the bottom of the planet, it will move there and stay at the bottom of the planet while the planet is moving.

You can trigger this very easily:
when you move the planet, pick every unit nearby and move them the same amount and direction as the planet.

Instead of "unit - move unit", you can use this custom script:
  • Custom script: call SetUnitX(udg_my_unit, udg_x_position)
  • Custom script: call SetUnitY(udg_my_unit, udg_y_position)
These actions will move the unit without stopping it, so it will continue with its orders.

You will also have to update the unit's move destination relative to the movement.
 
Status
Not open for further replies.
Top