I have a unit that is a sun. The sun spawns a planet every X seconds. I want the planets to move in an orbit around the sun... Around and around... In a smooth manner...
Is that even possible to make? If so, any ideas how to make it?
I am aware the planets do appear a bit unstable and shaky far away from the sun. The reason for this is likely due to internal fixed point error in the polar offset maths. For short distances they seem stable enough.
In my map, players can create stars with an ability. Each star spawns six planets around itself. (Buff at the star with persistent effect with offset to determine where the planers are created.) The stars explode in supernovas after a few minutes.
I see that you use a fixed star in the middle of the map as a part of your trigger.
Would it be possible to modify your trigger to make the planets spawned by a star ONLY circle around that star, no matter how many stars there are in the game?
If one has a reasonable number of stars existing at a time, eg at most 60 or 160, then that is easy. Otherwise one has to use data tables which are considerably slower than the records used.
Being able to create stars is a late-game thing in my map. Most games, there will be no stars in the game. When there are, players will have only a few at the same time. After a few minutes, a star will blow up in a supernova, destroying the nearby planets. (And thus cancelling the trigger..?)
Is there a risk that if two stars are created close to each other, planets spawned by the first star start orbiting the other star?
I would suggest making each star its own trigger thread. A local array keeps track of the planets that orbit it. Movement is done using a while loop with a wait at the end of its action block. The loop terminates when the star dies, possibly killing all planets in the process. This means each star gets a dedicated trigger thread so it becomes quite scaleable as far as data management goes.
I have a unit that is a sun. The sun spawns a planet every X seconds. I want the planets to move in an orbit around the sun... Around and around... In a smooth manner...
Is that even possible to make? If so, any ideas how to make it?
Circular or ecliptical?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Circular would be preferable
Seems like the reply you posted yesterday has disappeared from this thread, Doctor :O
Is there anything in the editor I can look at as a reference? I can't think of anything that works like this..
I intend to make the planets be units. But I have no idea how to set them in motion so they follow a specific path... O_o
Been playing around with constantly adding issue move order in front of the planets with a persistent offset, but that does not really work..
Odd because they did not wind up in the spam bin. That is quite worrying.
You can use two Apply Force effects at right angles to each other, use Rotate type Kinetics or use a Launch Missile effect with a finely tuned mover.
Cant think of any good example maps off the top of my head.
https://www.sc2mapster.com/forums/development/miscellaneous-development/175769-shameless-ability-show-off-traffic?page=2 shows a tornado made using kinetics.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
I made this back long ago for someone... I guess he probably does not mind having it shared 6 years later, and if he does I will remove it.
Drop Box link may be removed in distant future.
https://www.dropbox.com/s/04s8jkblvlnr7hp/IG Orbit Demo.SC2Map?dl=0
I am aware the planets do appear a bit unstable and shaky far away from the sun. The reason for this is likely due to internal fixed point error in the polar offset maths. For short distances they seem stable enough.
Wow, thanks a lot!
In my map, players can create stars with an ability. Each star spawns six planets around itself. (Buff at the star with persistent effect with offset to determine where the planers are created.) The stars explode in supernovas after a few minutes.
I see that you use a fixed star in the middle of the map as a part of your trigger.
Would it be possible to modify your trigger to make the planets spawned by a star ONLY circle around that star, no matter how many stars there are in the game?
If one has a reasonable number of stars existing at a time, eg at most 60 or 160, then that is easy. Otherwise one has to use data tables which are considerably slower than the records used.
Great!
Being able to create stars is a late-game thing in my map. Most games, there will be no stars in the game. When there are, players will have only a few at the same time. After a few minutes, a star will blow up in a supernova, destroying the nearby planets. (And thus cancelling the trigger..?)
Is there a risk that if two stars are created close to each other, planets spawned by the first star start orbiting the other star?
One could have a trigger per star yes. Also if one keeps the data separate then there is no risk of them orbiting other stars.
Hmm... I can not figure out how to setup the trigger so it affects each star, meaning that the planets circle around the star that created the planets
Any advice?
I would suggest making each star its own trigger thread. A local array keeps track of the planets that orbit it. Movement is done using a while loop with a wait at the end of its action block. The loop terminates when the star dies, possibly killing all planets in the process. This means each star gets a dedicated trigger thread so it becomes quite scaleable as far as data management goes.