OnPlayerEnteredSystem or alternative query

Freeform discussion about anything related to modding Transcendence.
Post Reply
relanat
Militia Captain
Militia Captain
Posts: 941
Joined: Tue Nov 05, 2013 9:56 am

Attached is a mod that finds the selected station and gives a list of the systems that they are in. You can then jump directly to that system and arrive at the first stargate (Ideally you could jump straight to the station but I don't know if that is possible).

It would be a lot better if the station was set as known and had a directional indicator so you could travel straight there. But that ain't happening.

The main problem is getting the station info to the next system.

I thought using <OnPlayerEnteredSystem> would do it. If the station is there then setKnown and have a directional indicator come up using either shpOrder gPlayership 'dock or objSetShowAsDestination.

But nothing I put in <OnPlayerEnteredSystem> is working for some reason.

Anyone got any ideas on how to set the indicator and setKnown the station in the destination system using <OnPlayerEnteredSystem> or some other method?
George uses some sort of mission code to highlight the Korolov station in the Benedict mission I think, but I can't decipher it and it seems a bit of overkill for a simple jump mod.
Attachments
Station Finder Mod.xml
(8.34 KiB) Downloaded 153 times
Stupid code. Do what I want, not what I typed in!
User avatar
AssumedPseudonym
Fleet Officer
Fleet Officer
Posts: 1190
Joined: Thu Aug 29, 2013 5:18 am
Location: On the other side of the screen.

 Try running it from <OnGlobalPlayerEnteredSystem> instead. I’ve had my share of problems with <OnPlayerEnteredSystem>, and most of them were fixed by adding a couple of conditionals to check for nodeIDs and using the global version of the event.
Image

Mod prefixes: 0xA010 (registered) and 0xDCC8 (miscellaneous)

My mods on Xelerus: Click here!

Of all the things I’ve lost in life, I miss my mind the least. (I’m having a lot more fun without it!)
NMS
Militia Captain
Militia Captain
Posts: 569
Joined: Tue Mar 05, 2013 8:26 am

I think <OnPlayerEnteredSystem> only runs if it's on an object that's in the system.

Also, if you haven't already seen it, you should read at least the last paragraph of this post.
relanat
Militia Captain
Militia Captain
Posts: 941
Joined: Tue Nov 05, 2013 9:56 am

As soon as AP suggested <OnGlobalPlayerEnteredSystem> I figured that was what I needed. And it's working too. Thanks.

And thanks, NMS, for that info in the other post. Basic stuff that can't be discovered by experimenting with code.
Stupid code. Do what I want, not what I typed in!
Post Reply