However, there was a time it failed to open fire ..
Recently I noticed it again and set myself to give it back it's BFG ..only to learn that it HAS ONE !
the problem is that the station's weapon is depending on the Random generation of items to supply it with Ammo......add a player thirsty for ammo and you have a supply/demand problem.
Originally I did this :
Code: Select all
<Devices>
<Device deviceID="&itAkan30Cannon;" omnidirectional="true">
<Items>
<Item count="5000" item="&itAkan30CannonShell;"/>
</Items>
</Device>
</Devices>
however, thinking harder on it : I decided that THIS might be a better option because the station will not be in competition with the player for Ammo nor dependent on random generations: ((**** don't know if it actually works ))
Code: Select all
<Devices>
<Device deviceID="&itAkan30Cannon;" omnidirectional="true"/>
</Devices>
<Events>
<Reload>
(block (theBFG)
(setq theBFG (item (objGetItems gSource "wI") 0))
(if theBFG
; Tell the Akan to reload itself
(and (not (objGetItems gSource "m +Akan;")))
(objAddItem gSource (itmCreate &itAkan30CannonShell;(random 20 60))
)
)
(if (not (objGetData gSource "Destroyed"))
(sysAddObjRecurringTimerEvent 90 gSource "Reload"))
)
</Reload>
</Events>
Code: Select all
<!-- Akan 30 Cannon Shell -->
<ItemType UNID="&itAkan30CannonShell;"
name= "Akan 30 cannon shell cartridge"
attributes= "commonwealth, Akan, consumable, missile, rasiermesser"
level= "4"
frequency= "common"
numberAppearing= "10d40"
value= "20"
mass= "10"
description= "This shell cartridge is used by the Akan 30 cannon."
>
<Image imageID="&rsItemsRasiermesser3;" imageX="192" imageY="96" imageWidth="96" imageHeight="96"/>
</ItemType>