I'm currently having trouble with (typGetDataField (itmCreate (ObjGetData gPlayership "someData") 1) 'speed) as Trans keeps saying "integer expected".
Here's all of the code:
Code: Select all
<!-- OmniSlot-->
<ItemType UNID="&itOmniSlot;"
name= "OmniSlot"
level= "3"
value= "1500"
mass= "4000"
frequency= "notrandom"
modifiers= "MajorItem; Mayfly Industries; NotForSale;"
description= "This item can be installed to take up one weapon slot. [U]se and pick a weapon from your cargo hold, and it will be mounted on the OmniSlot, making the weapon omnidirectional."
useScreen= "&dsOmniSlot;"
useKey= "O"
useInstalledOnly= "true"
>
<Image imageID="&rsItems1;" imageX="288" imageY="0" imageWidth="96" imageHeight="96"/>
<Weapon
type= "particles"
count= "1d4+4"
configuration= "wall"
damage= "plasma:50; WMD5"
fireRate= "20"
missileSpeed= "20-40"
lifetime= "0"
powerUse= "6000"
LinkedFire= "always"
particleCount= "5d6"
particleEmitTime="5-12"
particleSpreadWidth="25"
particleSpreadAngle="0"
sound= "&snMissileLauncher;"
>
<Effect>
<Shape
directional= "true"
scaleLength= "16"
scaleWidth= "6"
scaleLengthInc= "3"
color= "0xff, 0xfd, 0xad"
opacity= "64"
>
<Point x="0" y="0"/>
<Point x="-5" y="29"/>
<Point x="-10" y="44"/>
<Point x="-20" y="50"/>
<Point x="-30" y="47"/>
<Point x="-40" y="44"/>
<Point x="-100" y="0"/>
<Point x="-40" y="-44"/>
<Point x="-30" y="-47"/>
<Point x="-20" y="-50"/>
<Point x="-10" y="-44"/>
<Point x="-5" y="-29"/>
</Shape>
</Effect>
</Weapon>
<Events>
<OnFireWeapon>
;issues: drawing reactor power
(sysCreateWeaponFire (itmCreate (ObjGetData gPlayership "OmniWep") 1) gSource (ObjGetPos gSource) 0 (typGetDataField (itmCreate (ObjGetData gPlayership "OmniWep") 1) 'speed) nil)
)
</OnFireWeapon>
</Events>
</Itemtype>
<DockScreen UNID="&dsOmniSlot;"
name= "Ship's Interior"
type= "customPicker"
backgroundID= "&rsItemListScreen;"
>
<List>
(block Nil
;(objEnumItems obj criteria itemVar exp)
(setq listEntries (list))
;
(enum (objGetItems gPlayership "*cw ~l") w (lnkAppend listEntries (list
(itmGetName w 1)
;nil
(itmGetImageDesc w)
"" ; or something else
;(dbglog(objGetID w))
(itmGetUNID w)
)))
listentries
)
</List>
<Panes>
<Default>
<OnPaneInit>
(scrSetDesc gScreen(cat "Choose the weapon to make omnidirectional."))
</OnPaneInit>
<Actions>
<Action name="1. Mount" key="1">
(block Nil
(ObjSetData gPlayership "OmniWep" (item (scrGetListEntry gScreen) 3))
(dbglog (ObjGetData gPlayership "OmniWep"))
(scrExitScreen gScreen)
)
</Action>
<Action name="Cancel" cancel="1" key="C">
<Exit/>
</Action>
</Actions>
</Default>
</Panes>
</DockScreen>