Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Assassin714 on November 30, 2021, 07:13:07 pm

Title: Cloaking Device
Post by: Assassin714 on November 30, 2021, 07:13:07 pm
Are there any mods that do something like this? As in, a ship that can literally become invisible (not just undetectable to sensors, but to the naked eye as well)? I'm also interested in the ability for the player to toggle it on or off.

The ship would still have a collision box so it could be hit by random fire, but nothing can target it.

Also another option would be a phase cloak, where the ship becomes intangible as well.
Title: Re: Cloaking Device
Post by: DefCynodont119 on November 30, 2021, 07:19:23 pm
Yep! it's been done before in fact, there should be a script for it somewhere, hmm.
Title: Re: Cloaking Device
Post by: Darius on November 30, 2021, 07:28:47 pm
I use Axem's cloaking script for exactly this, which on the player can be triggered by a keypress, can be activated spontaneously in combat by AI, and also triggered by sexp.

https://www.hard-light.net/forums/index.php?topic=94909.0

Video of the script in action:

Title: Re: Cloaking Device
Post by: Asteroth on November 30, 2021, 07:38:42 pm
To put it more simply also, if you'd like to play with the individual parts, the SEXP ship-effect used with "Cloak/Decloak" (this is an animated effect which requires some extra table stuff but if you're using the MVPs you already have it) is what makes a ship visually invisible, the "stealth" flag is typically used for making ships untargetable, and the "no collisions" flag makes the ship intangible (including to other ships, which may not be desired, doing this to weapons only is possible but more complicated). Axem's script does the first two (as well as a lot of other things too), but does not make a ship intangible.
Title: Re: Cloaking Device
Post by: Assassin714 on November 30, 2021, 09:09:45 pm
I suppose it's also possible to make it so certain ships can't fire while cloaked and others can?

Title: Re: Cloaking Device
Post by: Asteroth on November 30, 2021, 09:43:09 pm
The lock/unlock-primary/secondary-weapon SEXPs control whether a ship can fire. It looks like Axem's script allows ships to fire but it will disable their cloak.