I've searched through the threads but still didn't find some proper and quick answer to that one.
Orbit I want to make a moon (unit) orbit around another unit, except the planet is a doodad so I would like to make the unit orbit around the position of the doodad. What triggers should I use for some simple system? The orbiting would be very slow to be more realistic, probably 1 revolution per game-time hour (Faster). SOLVED
Spin Since I have to use a Sphere model for moon, the one with grey chess texture, I want it to spin on its Z axis slowly, like Planet View and others you will see the planets spinning slowly.
The GAx3 Mod is a whole Mod and I dont want to import other Mods just for that. Can anyone use the .Galaxy script within that mode and show me how to use it in a library or in any way, other than adding it as a Mod? I just need the Spin triggers NOT SOLVED
If you want to go for a triggered solution you should take a look at the "Point with polar offset" function and also at the "move unit instantly" action.
Make sure to set blend to true to make it look good.
Here is an example:
Local Variables
rotating unit = Banana [26.93, 23.87] <Unit>
rotation center = Point 001 <Point>
current angle = (Angle from (Position of rotating unit) to rotation center) <Real>
rotation dist = (Distance between (Position of rotating unit) and rotation center) <Real>
Conditions
Actions
General - Repeat (Actions) forever
Actions
Unit - Move rotating unit instantly to (rotation center offset by rotation dist towards current angle degrees) (Blend)
Variable - Modify current angle: + 1.0
General - If (Conditions) then do (Actions) else do (Actions)
If
current angle >= 360.0
Then
Variable - Modify current angle: - 360.0
Else
General - Wait 0.0 Game Time seconds
Thanks, works! I modified the variable to change +0.1 for very slow rotation. But for some strange reason, maybe because cliff height and what should be below is way off (my map is just space background no terrain), the moons do some very eccentric orbiting completely irregular, but on a new map with terrain it works fine, on my map though, this problem occurs.
Because my mad, the doodad is large and the Position XY I set seems to go off the map bounds, so the planets wipe the corners of the maps but now when I gave a proper X Y, all is fine, thanks.
Waiting for a way to use the galaxy script without using the whole Mod. Would be nice if one knew how to make a sphere spinning, or if one edited it to add such animation. The SphereUnnamed with chess texture.
You could periodically change the actor facing for the moon. This would be best done in the data editor, I think. I'll have to dig up my triggers from Xeno Crisis to see what I did for planet rotation.
I made a planetarum mod. its available among my files and also on the EU server. It uses records and is fairly generic. The one here on Mapster is an earlier version. The one on EU is more updated. I used the sphere model for a sun (added some shine to it) and the planet models as planets... :) Send me a pm or something if you want more info.
I have a working orbiting system above. For planets I use the Planet views (not planet icons). When I have to make some custom moon, I textture select by id and just use the sphere model.So I just need a trigger or any way to make a unit spinning, including if you have that sphere with spinning animation, I said above I dont want to use whole Mods for this..
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I've searched through the threads but still didn't find some proper and quick answer to that one.
Orbit I want to make a moon (unit) orbit around another unit, except the planet is a doodad so I would like to make the unit orbit around the position of the doodad. What triggers should I use for some simple system? The orbiting would be very slow to be more realistic, probably 1 revolution per game-time hour (Faster). SOLVED
Spin Since I have to use a Sphere model for moon, the one with grey chess texture, I want it to spin on its Z axis slowly, like Planet View and others you will see the planets spinning slowly.
The GAx3 Mod is a whole Mod and I dont want to import other Mods just for that. Can anyone use the .Galaxy script within that mode and show me how to use it in a library or in any way, other than adding it as a Mod? I just need the Spin triggers NOT SOLVED
If you want to go for a triggered solution you should take a look at the "Point with polar offset" function and also at the "move unit instantly" action.
Make sure to set blend to true to make it look good.
Here is an example:
Local Variables
rotating unit = Banana [26.93, 23.87] <Unit>
rotation center = Point 001 <Point>
current angle = (Angle from (Position of rotating unit) to rotation center) <Real>
rotation dist = (Distance between (Position of rotating unit) and rotation center) <Real>
Conditions
Actions
General - Repeat (Actions) forever
Actions
Unit - Move rotating unit instantly to (rotation center offset by rotation dist towards current angle degrees) (Blend)
Variable - Modify current angle: + 1.0
General - If (Conditions) then do (Actions) else do (Actions)
If
current angle >= 360.0
Then
Variable - Modify current angle: - 360.0
Else
General - Wait 0.0 Game Time seconds
@Mille25: Go
Thanks, works! I modified the variable to change +0.1 for very slow rotation. But for some strange reason, maybe because cliff height and what should be below is way off (my map is just space background no terrain), the moons do some very eccentric orbiting completely irregular, but on a new map with terrain it works fine, on my map though, this problem occurs.
Try turning the ignore terrain height state on for your moons. Im not exactly sure what the problem is though.
Because my mad, the doodad is large and the Position XY I set seems to go off the map bounds, so the planets wipe the corners of the maps but now when I gave a proper X Y, all is fine, thanks.
@Eimtr: Go
Waiting for a way to use the galaxy script without using the whole Mod. Would be nice if one knew how to make a sphere spinning, or if one edited it to add such animation. The SphereUnnamed with chess texture.
@Eimtr: Go
You could periodically change the actor facing for the moon. This would be best done in the data editor, I think. I'll have to dig up my triggers from Xeno Crisis to see what I did for planet rotation.
I made a planetarum mod. its available among my files and also on the EU server. It uses records and is fairly generic. The one here on Mapster is an earlier version. The one on EU is more updated. I used the sphere model for a sun (added some shine to it) and the planet models as planets... :) Send me a pm or something if you want more info.
I have a working orbiting system above. For planets I use the Planet views (not planet icons). When I have to make some custom moon, I textture select by id and just use the sphere model.So I just need a trigger or any way to make a unit spinning, including if you have that sphere with spinning animation, I said above I dont want to use whole Mods for this..