Switchable omni/non-omni weapon View Mod
New weapon ! proof of concept code for switching an omnidirectional turret on and off!
It's a omnidirectional turbolaser cannon, when you use it, the omnidirectional turret will be deactivated and the weapon is connected to an extra capacitor (more damage)

UPDATED, now the weapon retain the enhancements during the switch !
UPDATED AGAIN: Corrected the bug found by bluesaberist.
ANOTHER UPDATE: Patched the code as suggested by darkjoker. Thanks !
Now the weapon is switched correctly when enhanced.
AGAIN UPDATE: If weapon is damaged, it won't switch. Thanks to Oddbob for the idea/code.
UPDATE: Now the weapon uses Atarlost's switching script so it works in 0.99c.
Categories Developers Vault, Weapon
Author digdug
Rating 1   0
Added (Last modified) 02.01.2008 (21.06.2009)
Game Version 0.99c
Filesize 1.45 KB
Downloads 1322
Download Download
bluesaberist 25.01.2008 03:57

Hey, this mod is great. But I found that I liked it better when I made it shoot two shots, instead of one powerful one, when it's not omni. You should maybe try that for a version two.

digdug 28.01.2008 01:10

Thanks for the feedback bluesaberist.

If you already did it, upload it on xelerus :)

bluesaberist 08.02.2008 22:13

I found a bug. When I had the weapon installed, it functions as three weapons that are switchable between. When I had it unistalled, it only removed one of them. So I have two "ghost weapons" that I can use, niether of which take up a weapon slot or are removeable. One each of omni and non-omni.

I'll up load the double shooting version soon, but the only difference is the damage and adding confuration "dual" (or making a whole new config.)

darkjoker 12.04.2008 13:23

May I suggest using the following code instead for weapon removal? It seems the current version cannot work well with enhanced weapons.

; Remove previous weapon

(shpRemoveDevice gSource theitem)

(objRemoveItem gSource (itmSetEnhanced (itmCreate (itmGetUNID theitem) 1) store) 1)

digdug 24.07.2008 00:27

AGAIN UPDATE: Now the weapon won't switch if damaged (in order to prevent the player from repairing it by switching)

digdug 12.01.2009 23:16

NOTE to me: switching code do not work in 0.99 correctly. Needs to be updated.

digdug 02.06.2009 15:14

UPDATED! Now the weapon uses Atarlost's switching script so it works in 0.99c.

You must be logged in to post comments!