[Mod] Simple Shooter [0.5.3] [shooter]

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by stu » Post

BrunoMine wrote:I realized a change in the code
crossbow.lua

Code: Select all

76	-	self:stop(object:getpos())

76	+	local luaentity = object:get_luaentity()
77	+	if luaentity == nil or luaentity.mob_name == nil then
78	+		self:stop(object:getpos())
79	+	else
80	+		self.object:remove()
81	+	end
Oh, I have not yet tried this with CME but I think I understand what you mean.
This code should do exactly the same thing but is slightly more robust.

Code: Select all

local luaentity = object:get_luaentity() or {}
if luaentity.mob_name then
	self.object:remove()
else
	self:stop(object:getpos())
end
Note that with your code, if luaentity did happen to be nil then it would still try to check if luaentity.mob_name is nil and you will recieve an error saying that you tried to index luaentity, a nil value.

I will try out CME myself when I get a chance and see if I can come up with a cleaner solution.

User avatar
BrunoMine
Member
Posts: 1082
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine
Location: SP-Brasil
Contact:

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by BrunoMine » Post

Hey. Must be why you create as good mod. Thanks!

User avatar
benrob0329
Member
Posts: 1341
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03
Location: Michigan
Contact:

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by benrob0329 » Post

@Stu, do you plan to ad things like long/recurve bows, paintball, and airsoft?

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by stu » Post

benrob0329 wrote:@Stu, do you plan to ad things like long/recurve bows, paintball, and airsoft?
I am not sure I can make other bows different enough to be really worthwhile, paintball is an interesting idea but there is already a mod for that.

User avatar
Glorfindel
Member
Posts: 137
Joined: Tue Jul 07, 2015 20:05
GitHub: the1glorfindel
IRC: Glorfindel DoomWeaver
In-game: Glorfindel

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by Glorfindel » Post

Long bows could be more powerful, but take longer to load perhaps?

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by stu » Post

Glorfindel wrote:Long bows could be more powerful, but take longer to load perhaps?
Historically, I believe it was the other way around but hey, if someone can provide me with a fitting and license compatible texture then I will consider adding a long bow.

User avatar
Glorfindel
Member
Posts: 137
Joined: Tue Jul 07, 2015 20:05
GitHub: the1glorfindel
IRC: Glorfindel DoomWeaver
In-game: Glorfindel

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by Glorfindel » Post

stu wrote:
Glorfindel wrote:Long bows could be more powerful, but take longer to load perhaps?
Historically, I believe it was the other way around but hey, if someone can provide me with a fitting and license compatible texture then I will consider adding a long bow.
Ugh, yes. I said it backwards.
I'll see if I can make a decent texture.

Soudon
Member
Posts: 167
Joined: Wed Apr 08, 2015 17:14
In-game: Soudon

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by Soudon » Post

I've added onto this mod just by adding so far two new guns and a firing sound for each. They are a MP5 (holo scope, just for looks) and a barret .50Cal. images are below.

Image

Image

I do plan on adding more weapons I have a bunch of different ones to add currently you must get them via the console but I will be adding a crafting recipe for them later on.

Ok added three more first a G18, Second an ACR ACOG, and a HAMR Red Dot. Next I will start working on crafting recipes.

Image

Image

Image

Soudon
Member
Posts: 167
Joined: Wed Apr 08, 2015 17:14
In-game: Soudon

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by Soudon » Post

Ok first recipe I set up is the ACR ACOG and I will add each one to this post as I finish them.
Spoiler
Image
ACR ACOG - This Uses steel ingots and glass

Image
Barret 50 Cal - This uses Steel ingots, Mese Crystals, Glass, and a Stick

Image
G18 - This Uses Bronze Ingots
Last edited by Soudon on Fri Jun 03, 2016 17:31, edited 2 times in total.

User avatar
Glorfindel
Member
Posts: 137
Joined: Tue Jul 07, 2015 20:05
GitHub: the1glorfindel
IRC: Glorfindel DoomWeaver
In-game: Glorfindel

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by Glorfindel » Post

it would be awesome to have a gun that is a regular rifle, but also shoots grenades on right-click

Soudon
Member
Posts: 167
Joined: Wed Apr 08, 2015 17:14
In-game: Soudon

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by Soudon » Post

I agree and if I was any good with coding I would add that in. I'm just copying code from this and pasting it then changing the values to suit the new weapons I'm adding.

On another note the mod firearms has right click to bring up a scope all it does is change the hud the most of it is blacked out and then you have your crosshair (no actual zoom) I just can't figure out how to incorporate that into this cause it would be great with the 50 cal I added.

User avatar
Glorfindel
Member
Posts: 137
Joined: Tue Jul 07, 2015 20:05
GitHub: the1glorfindel
IRC: Glorfindel DoomWeaver
In-game: Glorfindel

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by Glorfindel » Post

it used to zoom in, but an update broke the hacky method used ;)

the firearms mod is rather broken right now, and the author of it recommended this mod instead as he doesn't have time to fix it right now

Soudon
Member
Posts: 167
Joined: Wed Apr 08, 2015 17:14
In-game: Soudon

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by Soudon » Post

If you want to give what I added a shot here, sorry new to github I think I have it properly uploaded now.

https://github.com/Soudon/Shooter/archive/master.zip

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by stu » Post

Soudon wrote:If you want to give what I added a shot here, sorry new to github I think I have it properly uploaded now.

https://github.com/Soudon/Shooter/archive/master.zip
You would be much better off making a proper fork rather than just cloning the repo. That way you will be able to track bugfixes and new features while being able to share your own improvements, the new weapons look really good.

Soudon
Member
Posts: 167
Joined: Wed Apr 08, 2015 17:14
In-game: Soudon

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by Soudon » Post

I was planning on a fork I just don't know how to do it. Like I said I'm new to github.

And thank you

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by stu » Post

Soudon wrote:I was planning on a fork I just don't know how to do it. Like I said I'm new to github.

And thank you
Assuming you a logged in, simply go to my repo and click the 'fork' button near the top right corner.
Last edited by stu on Fri Jun 03, 2016 21:26, edited 1 time in total.

Soudon
Member
Posts: 167
Joined: Wed Apr 08, 2015 17:14
In-game: Soudon

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by Soudon » Post


User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by stu » Post

Soudon wrote:I think this is right.

https://github.com/Soudon/shooter/archive/master.zip
Perfect, thanks :)

User avatar
euroclydon
New member
Posts: 5
Joined: Fri Jun 10, 2016 18:28

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by euroclydon » Post

Hello stu. I enjoy this mod.

I've figured out every weapon except the gun turret. I can't figure out how to get it to fire. I put an ammo pack in its inventory, attached my self via right click, I can turn it around, up and down, but it won't shoot. What am I doing wrong?

Thanks.

User avatar
benrob0329
Member
Posts: 1341
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03
Location: Michigan
Contact:

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by benrob0329 » Post

You load it with TNT and hold shift + press space to shoot.

User avatar
euroclydon
New member
Posts: 5
Joined: Fri Jun 10, 2016 18:28

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by euroclydon » Post

benrob0329 wrote:You load it with TNT and hold shift + press space to shoot.
Thanks, I'll give it a shot. (Pun intended!)

User avatar
TheReaperKing
Member
Posts: 531
Joined: Sun Nov 22, 2015 21:36
Contact:

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by TheReaperKing » Post

I've been messing around with this but with no luck so far, but, do you have any tips on how I'd be able to make an automatic gun, and specifically I'd like to make a chaingun :)
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by stu » Post

TheReaperKing wrote:I've been messing around with this but with no luck so far, but, do you have any tips on how I'd be able to make an automatic gun, and specifically I'd like to make a chaingun :)
The best I can suggest, if you want to use the (undocumented) gun api, is that you look at the semi-automatic machine gun implementation. Since there is no way to detect continuous mouse click then a fully automatic weapon is not possible, at least for 'click' operation.

This does, however, give me an idea to revamp the somewhat redundant turret. Continuous fire might be possible with keyboard control.

User avatar
TheReaperKing
Member
Posts: 531
Joined: Sun Nov 22, 2015 21:36
Contact:

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by TheReaperKing » Post

In the MT-Firearms mod he does have an automatic machine gun and also a shotgun with spread. The problem is though that you can't hit anything, and I think it is a problem with bullet.lua where the "damage" is called. I know a different mod but still it seems like he made it possible somehow and maybe there is code in there that could be insightful. And on my end I'll be trying myself but I'm a noobbb but at least learning little by little :)
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids

User avatar
injinji
Member
Posts: 11
Joined: Sun Dec 24, 2017 05:14
In-game: GamerGirlSandy

Re: [Mod] Simple Shooter [0.5.3] [shooter]

by injinji » Post

found a bug, if you place a torch on grass and then shoot the grass with a rifle, the torch will float until you break it with your hand.

Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests