First the gate effect is triggered when the virtual ship enters the new system. As a result it appears as if the gate effect occurs twice for the player ship.
Secondly it is necessary to order the virtual ship to hold, otherwise it will leave the (new) system immediately after entering.
Code: Select all
<ShipClass UNID="&msTest;" virtual="true">
<Events>
<OnCreate>
(block Nil
(dbgOutput (cat "Creating vs " gSource))
(sysAddObjRecurringTimerEvent 30 gSource "SayHello")
(shpOrder gSource 'hold)
)
</OnCreate>
<SayHello>
(plyMessage gplayer (cat "Hello from " gSource))
</SayHello>
<OnPlayerLeftSystem>
'followPlayer
</OnPlayerLeftSystem>
</Events>
</ShipClass>