Modifiable weapons?

Hi, I’m fairly new here. I’m also somewhat new when it comes to scripting (I prefer to work on visuals and audio), but I’m looking to change that.
btw, sorry in advance for the long post, but I want to make sure I explain myself thoroughly.

My idea is for a game that allows you to create your own weapon (within reason). But before I can tackle that, I have to figure out the code for the weapon creation aspect. I’m doing a simplified version for a basic bridge building game first and then expanding on that once I’m comfortable that the script is robust enough to handle more complex things. I’d ask someone else to do it for me, but I’d like to at least have an understanding of the capabilities/limitations of such a script before I ask someone else to do it.

To clarify, the concept is that the player sees a top-down view of a surface where you can drag and drop pieces to create the whole device. In the catapult example, the player would be trying to destroy an enemy fortress by bombardment. In the final script, I’d like the weapon to be able to shoot projectiles. Both scripts would be basing the force and distance of the projectiles on the mechanism that the player has created.

My question is, where do I start? Would it be easier to use the game engine physics to sort it out, or should I calculate the force generated by the components mathematically in the script using variables? (I’m an ex-engineer, so I’m not afraid of a little math :smile:) If anyone’s done something similar before or has any advice, I’d appreciate your input. Thanks!

Have you started a script for the catapult? If you have messed with instantiation before then you can give the instantiated Object velocity that can be adjusted by var’s. Then the path of the object can in the air be played with by the rigidbody mass ect. Just letting the Physics happen gives the best results i think lol. When creating weapons there are many ways to do so depending on the results your looking for. (ie) Create a parent object and make all possible versions of the weapons then through script only render the configuration you want. Or also you could try a instantiate and destroy style creation process where you click on to destroy the object/component you don’t want and drag and drop one you like that is instantiated and made a child of the new weapon your creating. ect Good Luck - Post up some code your working on and i’m sure people will be glad to help.