OnPlayerEnteredSystem or alternative query

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

OnPlayerEnteredSystem or alternative query

Post by relanat » Wed Feb 08, 2017 3:10 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 5 times

User avatar
AssumedPseudonym
Militia Captain
Militia Captain
Posts: 904
Joined: Thu Aug 29, 2013 5:18 am
Location: On the other side of the screen.

Re: OnPlayerEnteredSystem or alternative query

Post by AssumedPseudonym » Wed Feb 08, 2017 2:02 pm

 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

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 Commander
Militia Commander
Posts: 348
Joined: Tue Mar 05, 2013 8:26 am

Re: OnPlayerEnteredSystem or alternative query

Post by NMS » Thu Feb 09, 2017 4:37 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 Commander
Militia Commander
Posts: 329
Joined: Tue Nov 05, 2013 9:56 am

Re: OnPlayerEnteredSystem or alternative query

Post by relanat » Fri Feb 10, 2017 10:25 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.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests