- Joined
- Jul 1, 2009
- Messages
- 1,147
SOLVED
I'm trying to create a trigger that has a planet orbit a star.
I don't even know where to start.
The math seems simple enough, but I can't figure out how to get a trigger to do it.
There is no function to set a variable to angle between two points, or distance between two points.
Anyone know what to do?
Edit:
I'm trying to create a trigger that has a planet orbit a star.
I don't even know where to start.
The math seems simple enough, but I can't figure out how to get a trigger to do it.
There is no function to set a variable to angle between two points, or distance between two points.
Anyone know what to do?
Edit:
-
Planet Rotate
-
Events
- Timer - Every 0.01 seconds of Game Time
- Local Variables
- Conditions
-
Actions
-
Unit Group - Pick each unit in Planets and do (Actions)
-
Actions
- Unit - Move (Picked unit) instantly to ((Position of (Closest unit to (Position of (Picked unit)) in Stars)) offset by (Distance between (Position of (Closest unit to (Position of (Picked unit)) in Stars)) and (Position of (Picked unit))) towards ((Angle from (Position of (Closest unit to (Position of (Picked unit)) in Stars)) to (Position of (Picked unit))) + 0.1) degrees) (Blend)
-
Actions
-
Unit Group - Pick each unit in Moons and do (Actions)
-
Actions
- Unit - Move (Picked unit) instantly to ((Position of (Closest unit to (Position of (Picked unit)) in Planets)) offset by 1.5 towards (-1 * Planet Angle) degrees) (Blend)
-
Actions
-
Unit Group - Pick each unit in Structures and do (Actions)
-
Actions
- Unit - Move (Picked unit) instantly to ((Position of (Closest unit to (Position of (Picked unit)) in Planets)) offset by 1.4 towards (-1 * (Planet Angle + 180)) degrees) (Blend)
-
Actions
-
Unit Group - Pick each unit in Planets and do (Actions)
-
Events
Last edited: