Secret Santa 2024
Original Post
Arm Shotgun -- Updated for 2.7
Credits to Ishi for the original idea.

Version 2.0

After much tinkering with setting force vectors, and ideas popping up in the meantime, I have created a new script. Also, aiming is fixed. You can now aim properly.

This is meant to be a moddable script. It is VERY easy to add new bodyparts that you can shoot and bind them to a key. I will post instructions below.

The stock script comes with 3 shoot-able parts. Both wrists and the right foot.

Q and O for the wrists, and L for the foot.

Note that grabbing before firing will mess it up, and it will grab the forearm and your WHOLE arm will go flying.




Modding

Open up shotgun.lua with your favorite text editor (preferably Notepad or Notepad++) and look for the following lines:

shot3 = {11, 12, 19}
shot = {10, 11, 18} -- table containing joints connected to the bodyparts to be shot for easy modding
shot2 = {6, 9, 16} -- table containing joints that precede the shot parts for aim calculation
keys = {"q", "o", "l"} -- table containing keys to bind to the bodyparts that are shot
shot['number'] = 3

The numbers are the references to joints and bodyparts. Look here for the numbers: http://www.toribash.com/forum/showthread.php?t=9391

Now then.

shot3 = {11, 12, 19}
This code contains BODYPARTS that are the ones launched. 11 and 12 are the hands, 19 is the right foot. Add one to the end if you wish to add a new bodypart.

shot = {10, 11, 18}
This code contains the JOINTS that link the launched bodyparts (wrist joint, ankle joint) If you added something to shot3, you MUST add its counterpart here.

shot2 = {6, 9, 16}
This code contains the JOINTS that are next to the launched bodyparts, that do the aiming. Like, if you add a wrist, this would be the elbow. If you add a foot, this would be the knee. You MUST add it if you add something new.

keys = {"q", "o", "l"}
This part contains the keys that are used to launch the joints. So if you add something new, add the key you want it to fire on here.

shot['number'] = 3
This is simply a way to count the things you added. If you add one thing, add one to the number. If you add two things, add two, etc.



Basic .lua file is attached. Comments/criticism goes here. Have fun. : )
Attached Files
shotgun.lua (1.5 KB, 673 views)
Last edited by Jok; Aug 2, 2007 at 07:50 PM. Reason: New script
DDDDDDDDDDDDDDDDDDDDDDDD

Zomg <3 Jok forever


Heres some replays kthx
Last edited by ishi; Oct 16, 2008 at 02:57 PM.


[T]
#hi


I like this mod. Now anyways...

The two handed version!

q for right hand fire and o for left hand fire.
Attached Files
dual-hand-cannon.lua (958 Bytes, 215 views)
awesome... this is for the dual one.
Attached Files
dualhanddoom.rpl (15.7 KB, 132 views)
dualdoom+randomspin.rpl (21.0 KB, 82 views)
Last edited by Zaarock; Jul 13, 2007 at 08:30 PM.
Previous dual-hand-cannon updated here:

Btw, you should set engage distance before loading script.
Attached Files
dual-hand-cannon2.lua (1.2 KB, 91 views)
Last edited by suomynona; Jul 13, 2007 at 08:54 PM.