How to properly implement invisible_weapons?

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Post Reply
Solstice_
Posts: 9
Joined: Tue, 30. Oct 18, 06:40
xr

How to properly implement invisible_weapons?

Post by Solstice_ » Sat, 4. Jan 20, 12:52

This might be a dumb question, but do invisible_weapons work in the same way custom turrets do?
I imported invisible_weapon.bod without detach, but when I got in game none of the turrets with invisible_weapons worked, but the ones with my custom turrets did.

Do you have to import invisible_weapon.bod detached with the Laser object, and then export the component and all that? I searched around but never found anything specifically for invisible weapons.

Thanks

User avatar
XenonArchitect7
Posts: 90
Joined: Fri, 5. Jul 19, 07:19

Re: How to properly implement invisible_weapons?

Post by XenonArchitect7 » Wed, 8. Jan 20, 17:48

They are actually simpler than turrets. Just use "ships\props\invisible_weapon" in your ship scene file. There aren't really components you have to worry about, just place them as you would a cameradummy object. In TShips, leave the number of laser parts equal to 1. If you want to have multiple lasers using the same invisible weapon, just add additional weapon entries using the same-indexed invisible_weapon object. Also, they don't have a weapon object associated with them, so you can leave that second field blank. And they can work as turrets in any direction as well as main cockpit forward guns.

User avatar
XenonArchitect7
Posts: 90
Joined: Fri, 5. Jul 19, 07:19

Re: How to properly implement invisible_weapons?

Post by XenonArchitect7 » Wed, 8. Jan 20, 20:07

Here is an example, in both the scene file and in TShips, as seen in X3 Editor 2:
Scene (notepad):
Image
X3 Editor 2 (TShips.txt):
Image

Solstice_
Posts: 9
Joined: Tue, 30. Oct 18, 06:40
xr

Re: How to properly implement invisible_weapons?

Post by Solstice_ » Fri, 10. Jan 20, 08:46

XenonArchitect7 wrote:
Wed, 8. Jan 20, 20:07
Here is an example, in both the scene file and in TShips, as seen in X3 Editor 2:
Scene (notepad):
Image
X3 Editor 2 (TShips.txt):
Image

Thanks I managed to get it to work on a new ship, but oddly enough I did the same thing with another ship before this post and it didn't work. Do invisible weapons not work for Top/Bottom slots?

Also, do you happen to know if you can increase the laser count in Package/Ship Creator like you can in X3 Editor? I'm trying to implement 4-barrelled turrets but only 2 laser entries work and allow for muzzleflashes/projectiles.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”