According to the wiki the <OnPlayerEnteredSystem> event will have the variable aGateObj set to the gate that was entered.
Is this actually the case? If it is, then aGateObj will be invalid as the gate is in the previous system.
<OnPlayerEnteredSystem>
-
- Militia Lieutenant
- Posts: 104
- Joined: Thu Apr 07, 2011 9:05 pm
My mods on github: https://github.com/gcabbage/TranscendenceMods
I believe aGateObj would be the gate you exit from (enter the current system)
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
-
- Militia Lieutenant
- Posts: 104
- Joined: Thu Apr 07, 2011 9:05 pm
That is what I assumed at first, but aGateObj is not the exit gate and does not appear to be a valid objref. But I'm not sure what the scope is for the a* variables. Do they behave like function arguments, or are they just global variables which the engine sets before calling the event - i.e. was aGateObj set previously for calling OnPlayerLeftSystem events?
To get the exit gate I had to use:
To get the exit gate I had to use:
Code: Select all
(sysFindObject gPlayerShip (cat "NG:" aDestEntryPoint))
My mods on github: https://github.com/gcabbage/TranscendenceMods