What do I need for the last argument in objIsDeviceEnabled?

Freeform discussion about anything related to modding Transcendence.
Post Reply
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

So I have this item
And I need to check if it is on. I am trying to use objIsDeviceEnabled on line 83, but I can't get it to work :/
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

objGetItems returns a list of items (even if there is only one item in the list).

You probably need to do something like:

... (item (objGetItems gPlayerShip "*I +RPCAutopilot;") 0) ...
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Ok, I used (item (objGetItems gPlayerShip "*I +RPCAutopilot;") 0), but the dockscreen is saying I have insufficient arguments. Can I use ObjGetItems in a dockscreen?
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

I changed line 83 to:

Code: Select all

	(not (objIsDeviceEnabled gPlayership (item (objGetItems gPlayerShip "*I +RPCAutopilot;") 0)))
and it seemed to work. No errors. Are you sure you have your parens in the right place? What line gives the error?
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Yeah, I had that as well.
I double checked, and it only works if the Autolooter is on.
If I turn it off, if gives me this for some reason:
hmmm.png
hmmm.png (248.85 KiB) Viewed 4085 times
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

when i found the post my first question was " why not go for "Is Installed"?
the act of enabled is simply a device installed, which means it is enabled, and if it were disabled the ship would tell you as soon as that event is obvious ( such as after or during an attack, or ionization or reactor output can not handle it.).
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

RPC wrote:Yeah, I had that as well.
I double checked, and it only works if the Autolooter is on.
If I turn it off, if gives me this for some reason:
Very strange! Can you post your mod--I can put the debugger on it.
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Here is the full mod:
RPC's UtilityItemsPack V1.a.zip
(5.08 KiB) Downloaded 158 times
Hopefully the debugger will figure this out :D
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Line 406:

(not (objIsDeviceEnabled gPlayership ))

Looks like you're missing some arguments.
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

D:
Ok, that was my bad. Thanks for the help George. (It works now )
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

RPC wrote:D:
Ok, that was my bad. Thanks for the help George. (It works now )
No problem! It looks like a very cool mod!
Post Reply