objHasItem

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Question does objHasItem return true if all you have is an enhanced version of the item?
Crying is not a proper retort!
Kamikaze
Commonwealth Pilot
Commonwealth Pilot
Posts: 78
Joined: Mon Apr 23, 2007 4:41 am
Location: Canton, MI/Redford, MI (Home/School)

Can it be used for an AI ship to detect if you have something?

:D

As I don't know, I may as well ask a question of my own.

~Kyle
I never said I was sane.

I said I was perfectly insane.
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Kamikaze wrote:Can it be used for an AI ship to detect if you have something?
Well not within AI but you can make a timed event for that ship that checks if the player ship has that something.
Crying is not a proper retort!
Kamikaze
Commonwealth Pilot
Commonwealth Pilot
Posts: 78
Joined: Mon Apr 23, 2007 4:41 am
Location: Canton, MI/Redford, MI (Home/School)

Yes.. I'm thinking about St. K's 'Gate Guardians' (coming in) that check for illegal items and attack if they find any (regardless if you have a Smuggler's Hold or not)

Thanks.
I never said I was sane.

I said I was perfectly insane.
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

then you want

Code: Select all

(if (objGetItems gplayership "* +Illegal;")
     True
     Nil
)
Replace True with the function you want to run if the player has illegal items and Nil with what you want to happen if the player has no illegal items.
Crying is not a proper retort!
Kamikaze
Commonwealth Pilot
Commonwealth Pilot
Posts: 78
Joined: Mon Apr 23, 2007 4:41 am
Location: Canton, MI/Redford, MI (Home/School)

Thanks!
I never said I was sane.

I said I was perfectly insane.
Post Reply