sysFindObject

Freeform discussion about anything related to modding Transcendence.
Post Reply
schilcote
Militia Captain
Militia Captain
Posts: 726
Joined: Sat Feb 02, 2008 7:22 pm

This:

Code: Select all

(setq auton (objGetTarget gSource))
	(if (not (eq &scStephinianAuton; (shpGetClass auton)))
		(setq auton (sysFindObject gSource "sFN:20; B:stephinianAuton;"))
		)
Does not work. I need to find the closest &scStephinianAuton; to the playership.
[schilcote] It doesn't have to be good, it just has to not be "wow is that the only thing you could think of" bad
User avatar
SiaFu
Commonwealth Pilot
Commonwealth Pilot
Posts: 88
Joined: Thu Jul 08, 2010 4:10 pm

I'm not that versed in Transcendence scripting functions, but I believe bobby's living Agauptera class ship mod has a functioning ship recognition routine. Search for the text that goes something like "Look, a <insertshipname>."
Maybe you can check his code and then output all StaphinianAuton proximities to a list and get the lowest int from that list?
Image
Mods here & there.Banners thanks to: digdug .
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

Hi schilcote,
alterecco suggested to try a simple:

(sysFindObject gPlayerShip "sN +stephinianAuton")
or
(sysFindObject gPlayerShip "sNB:stephinianAuton")

remember that stephinianAuton attribute is case sensitive, and it should be exactly the same as the attribute on the auton.

I suggested:

(setq autonList (filter (sysFindObject gSource "sFN:20")) tempAuton (eq (objgettype tempAuton) &scStephinianAuton;))

this returns a list of all the friendly Stephinian Autons, so you have to (setq myAuton (item autonList 0)) or (setq myAuton (random autonList))
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

apparently you can also do (thanks to Star Weaver for digging this one up)

Code: Select all

(sysFindObject gPlayerShip "sN +unid:&scStephinianAuton;")
Post Reply