Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
HaydenBarca

Registered:
Posts: 196
Reply with quote  #1 
I'm trying to make a ship in distress stand still, but when I load the scenario it merrily takes off as if nothing is wrong.  Here's what I have in Start

<!--Curie in Distress-->
<create type="neutral" x="6532.0" y="0.0" z="53815.0" angle="290" name="Curie" raceKeys="Terran friendly" hullKeys="warship Destroyer" sideValue="2" />
<set_object_property property="systemDamageBackShield" value="1.0" name="Curie" />
<set_object_property property="systemDamageFrontShield" value="1.0" name="Curie" />
<set_object_property property="systemDamageBeam" value="1.0" name="Curie" />
<set_object_property property="systemDamageImpulse" value="1.0" name="Curie" />
<set_object_property property="systemDamageTorpedo" value="1.0" name="Curie" />
<set_object_property property="systemDamageTurning" value="1.0" name="Curie" />
<set_object_property property="topSpeed" value="0.0" name="Curie" />
<clear_ai integer="yes" value="0.0" name="Curie" />
<set_ship_text name="Curie" desc="doesn't work" scan_desc="doesn't work" hailtext="Mayday, mayday!  We are without power and drifting through space.  Please send help!" />

I thought that setting its topSpeed to zero and damaging its Impulse would do it, but it's not listening.  Has anyone encountered this before?  It basically sits there for about 15 seconds until it repairs all ship systems, then it takes off as if its top speed is not, in fact, zero.
HaydenBarca

Registered:
Posts: 196
Reply with quote  #2 
So, the plot thickens.  On the server/Main Screen, the Destroyer in distress is shown at its original position (complete with push radius), but on the player screens (Helm, Science, etc.), the ship is moving.  The mission triggers (Distance Between Object) are triggering based on the player view.  WTF?  This is a GMed Module, in case that affects anything.  If I ram it on the server/main screen then it snaps back to the original position on the player side, then begins to take off.

I encountered this same problem during a con game when the ship they were supposed to rescue that was disabled.  In a standard (non-GM) scripted mission the ship stayed put, but when I converted it to a GMed module, there was the disconnect between the server and the players.

Any solutions out there?
HaydenBarca

Registered:
Posts: 196
Reply with quote  #3 
I've come to the conclusion that <set_object_property property="topSpeed"  /> is broken in 2.7.5.

I've instead set up a recurring timer event to re-damage the ship systems every 19 seconds.  This way it doesn't repair itself (all systems repaired in ~25 seconds, I want their DamCom teams!) and then take off, not in distress.  That does the trick, though feels inelegant.
Darrin

Registered:
Posts: 164
Reply with quote  #4 
It's not that setting the top_speed is broken... I think it's just not clear how the AI sets a ship's speed. Even when the brain stack is empty, it's still doing some sort of pathfinding that causes it to change the throttle speed.

I put together a "learn to script" mission that requires the Kobayashi Maru, which is supposed to be disabled, to stay in one place. I got it to stay in one spot using the Point Throttle command.


<create type="neutral" x="50000.0" y="0.0" z="30000.0" angle="180" name="Kobayashi Maru" raceKeys="Terran" hullKeys="Bulk Cargo" sideValue="2" fleetnumber="1" />
<clear_ai name="Kobayashi Maru" />
<add_ai type="POINT_THROTTLE" value1="50000.0" value2="0.0" value3="30000.0" value4="0.0" name="Kobayashi Maru" />
<set_object_property property="topSpeed" value="0.0" name="Kobayashi Maru" />
<set_object_property property="throttle" value="0.0" name="Kobayashi Maru" />
<set_object_property property="steering" value="0.0" name="Kobayashi Maru" />


The other method to keep a ship from moving you've already discovered on your own: disable the impulse/warp, and set an event to keep damaging it every few seconds. Otherwise, the ship will repair itself and try to fly off to wherever.


HaydenBarca

Registered:
Posts: 196
Reply with quote  #5 
Thanks for the alternative, Darrin.  Makes me want to try your method and strip away the various set_object_properties to see what the minimum is.  The clear ai/point throttle might just tell it it's achieved its objective -- kick back  :-) .
Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 2,402
Reply with quote  #6 
Back in the earliest days of scripting I found that setting an AI ship's maximum speed to zero did not work, the AI did something strange and the ship moved anyway. But if I set the maximum speed to 0.000001 the ship moved so slowly that for all practical purposes it was zero. Perhaps that trick still works?

If your script damages an enemy AI ship's engines then a Science scan will read the damage. Sometimes that is exactly what your story wants, other times the ship is stranded for a different reason.



__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
HaydenBarca

Registered:
Posts: 196
Reply with quote  #7 
Thanks, Mike, I'll give that a try.  A little drift from a dead ship makes sense.  I do like the scan showing damage (when the story warrants it), but I'm finding that it also means the ship is very fragile (I had my ship in distress blow up at the tap from a stray Nsect).  I have another scenario where the ship is supposed to stop and wait for docking from the player ship, so the 0.000001 Top Speed makes more sense.
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.