Members | Sign In
All Forums > Mission Scripting
avatar

Directing objects

posted Jun 22, 2011 15:33:38 by Vorus
Using the "direct" tag, you can obviously point things in certain directions, and with the throttle setting, you can make them get there faster or slower. (And with the topSpeed property, you can even get allied or enemy ships to have "warp" drive for a while.)

But I can't seem to get that to work on the player's ship. I can set its throttle, but giving it a "direct" command does not affect the heading. I am trying to make the player's ship orbit a planet once they get close to a bouy. Right now, I'm not concerned with whether or not the HELM officer can break orbit at any time, just as long as the ship will make the orbit if left alone. Here is my code:

<event>
<if__variable name="orbitPhase1" comparator="!=" value="1"/>

<if_inside_sphere name="USS Gibraltar" centerX="21300" centerY="0" centerZ="52700" radius ="500"/>

<log text="entering orbit\n"/>

<direct name="USS Gibraltar" pointX="20300" pointZ="53700"/>

<log text="adjusting heading\n"/>

<set_object_property name="USS Gibraltar" property="throttle" value="0.5" />

<log text="adusting speed\n"/>

<set_variable name="enteredOrbit" value="1"/>
<set_variable name="orbitPhase1" value="1"/>

</event>

And the ship does in fact throttle down, and the log says that the heading was adjusted, but it wasn't. Now, the only thing that I do notice is that the ship DOES seem to drift after this event is triggered, even when I force the throttle to 0. I can't tell if its drifting to the coordinates I gave it or not, but it's definitely drifting.

Has anyone else tried anything like this with more success?
-----------
Khomerex nal Khesterex

The unofficial Artemis Wiki, your best source for Artemis Information
page   1
2 replies
avatar
Mike_Substelny said Jun 22, 2011 20:41:12
FWIW the orbits of Star Trek ships are pretty special, since they always stay pointed forward. If the ENTERPRISE has an orbital period of 90 minutes, then it also must be slowly rotating every 90 minutes.

Some man-made satellites do this, but not the ones with solar panels. Solar power satellites keep one side facing the sun.

So if you just get the ship to move in a circle (or ellipse) then you have simulated a real (2D) orbit. The constant heading change is a Star Trek thing.
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
ThomRobertson said Jun 22, 2011 21:12:04
on the player's ship. I can set its throttle, but giving it a "direct" command does not affect the heading.


Wow, I never intended for the direct command to work for the player. It doesn't. I'd be amazed at what you guys come up with, except that I knew that you guys would amaze me. :)
Creator of Artemis
Login below to reply: