I am trying to use itmIsInstalled in some code, but the Xelerus page for it says that the item is the itemStruct. Is it the same as the UNID? An example is:
(itmIsInstalled (itmCreate &itSolarReactorFlywheel; 1))
It keeps evaluating as Nil, when I clearly have it installed on my ship
What am I missing?
How to use itmIsInstalled
-
- Fleet Admiral
- Posts: 2876
- Joined: Thu Feb 03, 2011 5:21 am
- Location: Hmm... I'm confused. Anybody have a starmap to the Core?
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
![Image](http://res.mostlynothing.info/ircs.png)
![Image](https://dl.dropbox.com/u/23352181/MoTM%20current.gif)
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.
Get on Discord for mod help and general chat
![Image](http://res.mostlynothing.info/ircs.png)
![Image](https://dl.dropbox.com/u/23352181/MoTM%20current.gif)
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.
If I understand itmCreate properly it creates a new item on the spot, but doesn't do anything with it or put it anywhere without some other code. This newly created item is certainly not installed.
What you need to do is pass it the itemStruct of your device. things that may work:
1. use it inside the event or invoke on your item, and call gItem instead of itmCreate.
2. use objEnumItems to compare unids of devices installed on a ship.
3. use attributes to check if the ship has a device with x attribute.
What you need to do is pass it the itemStruct of your device. things that may work:
1. use it inside the event or invoke on your item, and call gItem instead of itmCreate.
2. use objEnumItems to compare unids of devices installed on a ship.
3. use attributes to check if the ship has a device with x attribute.