objHasItem
- Betelgeuse
- 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!
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
Well not within AI but you can make a timed event for that ship that checks if the player ship has that something.Kamikaze wrote:Can it be used for an AI ship to detect if you have something?
Crying is not a proper retort!
-
- 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.
Thanks.
I never said I was sane.
I said I was perfectly insane.
I said I was perfectly insane.
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
then you want
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.
Code: Select all
(if (objGetItems gplayership "* +Illegal;")
True
Nil
)
Crying is not a proper retort!