Modding Help Help I Need And Am Going To Need With Making A Weapon/Tool

Discussion in 'Starbound Modding' started by bconlon, Jul 11, 2017.

  1. bconlon

    bconlon Subatomic Cosmonaut

    (Sorry if the title is a bit too long)

    I am in no way a modding expert. The code I currently have for this tool/weapon is just made from looking at some other weapons so if you are able to, correct anything else wrong.

    Currently I am getting this error: https://pastebin.com/f30wbJ7n, with this code: https://pastebin.com/E9xRdbU4 that I currently have for a tool that acts like a weapon and is supposed to use the rocketspear ability. The error crashes the game.
     
  2. IHart

    IHart Scruffy Nerf-Herder

    At a glance:
    The source of the error is that RocketSpear is a valid class, but RocketSpear:fire is not.
    You need not include "/items/active/weapons/weapon.lua", gun.lua already calls it.
    The Lua for some weapon abilities limits them to primary or alt abilities, some scripting may be required to adapt them.
    Some weapon abilities only work properly for weapons given the gun script and some only for weapons given the melee script. That i can recall calling both does not work well.
    Usually a full log should be shared.
     
  3. bconlon

    bconlon Subatomic Cosmonaut

    So I need to fix that stuff and make a new script to enable the rocketspear ability for primary ability and ranged.

    Also, how do I make it so the gun can be aimed and not always aiming straight?
     
  4. IHart

    IHart Scruffy Nerf-Herder

    For sure it is not doing it now because of the other broken elements. I believe that the combination of gun.lua, a valid ability, and an animation file is all you will need for it to handle as expected.
     

Share This Page