[Mod] Throwing [0.13] [throwing]

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

[Mod] Throwing [0.13] [throwing]

by Jeija » Post

Hey!

This mod adds simple bows and arrows to minetest.
There is no good texture for them yet... Send in yours if you want to and I'll add them to my mod.
Crafting Recipes:
Image
Image
Image

And some screenshots...
Image
Image

You can use the code to add your own throwable things...
What about TNT/Grenades/whatever?

I think the scriptapi should have a possibility to get the name of an object, this gave me the possibility to make arrows disappear when they hit a mob. Would be nice if someone added that.

There still seems to be a bug: The bow sometimes disappears when shooting, especially when a game has just started, but this doesn't seem to be a mod issue.

Works from minetest 20111228 and better - you may have to compile this from github!
Download
V 0.1 as .tar.gz
V 0.11 as .tar.gz
V 0.12 as .tar.gz
V 0.13 as .tar.gz

Latest git as .zip
Latest git as .tar.gz

Dependencies: none


Cheers,
Jeija

License: WTFPL
Last edited by Jeija on Sun Jan 27, 2013 19:02, edited 1 time in total.
Redstone for minetest: Mesecons (mesecons.net)

sfan5
Moderator
Posts: 4095
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

+2!! I like it
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
jordan4ibanez
Member
Posts: 1923
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Post

SEE?! i told you it was possible jeija! :D +9001
hello, am program. do language in rust. make computer do. okay i go now.

User avatar
sdzen
Member
Posts: 1170
Joined: Fri Aug 05, 2011 22:33
Location: Paradise (your not allowed)

by sdzen » Post

I ever so slightly altered the textures they might look a bit better
https://www.sugarsync.com/pf/D6068353_8269537_298551

Zen S.D.

The next generation of tranquility!
malheureusement mon français n'est pas bon :<
Owner of the Zelo's
In game name: MuadTralk, spdtainted, sdzen, sd zen, sdzeno

User avatar
Hackeridze
Member
Posts: 310
Joined: Thu Nov 03, 2011 13:35

by Hackeridze » Post

Jeija, you can get strings from RTMMP's version of ROPE mod. RTMMP's ROPE mod depends on RTMMP's FLOWERS mod.
My game: RTMG
GENTOO USER

cosarara97
Member
Posts: 180
Joined: Tue Nov 01, 2011 18:53

by cosarara97 » Post

Good! +5
I've just killed a rat with it xD but it disappeared, so I can't eat it...
Idea: You don't shoot until you release the mouse button, and the velocity depends on how much time have you been pressing it (with a maximum)
:D

User avatar
Hackeridze
Member
Posts: 310
Joined: Thu Nov 03, 2011 13:35

by Hackeridze » Post

Bad realization.
My game: RTMG
GENTOO USER

sfan5
Moderator
Posts: 4095
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

Hackeridze wrote:Bad realization.
It's 75% the best possible realization
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
Hackeridze
Member
Posts: 310
Joined: Thu Nov 03, 2011 13:35

by Hackeridze » Post

sfan5 wrote:
Hackeridze wrote:Bad realization.
It's 75% the best possible realization
Are you idiot?

Code: Select all

local objs = minetest.env:get_objects_inside_radius({x=playerpos.x,y=playerpos.y,z=playerpos.z}, 2)
He look to objects, but if 2 players shooting? Okay, we need a patch:
minetest.env:add_entity() should return objref to added entity. Just simple patch.
My game: RTMG
GENTOO USER

sfan5
Moderator
Posts: 4095
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

Hackeridze wrote:
sfan5 wrote:
Hackeridze wrote:Bad realization.
It's 75% the best possible realization
Are you idiot?
No
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

sapier
Developer
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Post

minetest.env:add_entity() should return objref to added entity. Just simple patch.
I agree with that, would need it in animals mod too

But i don't agree with those insultings, don't we all want to improove minetest? It would be strange if we all had the same opinion how to do that.
DON'T mention coding style!
(c) sapier all rights reserved

User avatar
Hackeridze
Member
Posts: 310
Joined: Thu Nov 03, 2011 13:35

by Hackeridze » Post

sfan5 wrote:
Hackeridze wrote:
sfan5 wrote: It's 75% the best possible realization
Are you idiot?
No
So you just mistaken in suggestion about code-quality?
My game: RTMG
GENTOO USER

sapier
Developer
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Post

Code quality is important, but It doesn't justify calling anybody an idiot.

As well as I assume we do have different opinions on what is code quality too ;-)
DON'T mention coding style!
(c) sapier all rights reserved

User avatar
Hackeridze
Member
Posts: 310
Joined: Thu Nov 03, 2011 13:35

by Hackeridze » Post

Who I call an idiot?
My game: RTMG
GENTOO USER

sapier
Developer
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Post

Are you idiot?
I appologize if I did translate it wrong but in my country asking this question is almost exactly the same as calling.
DON'T mention coding style!
(c) sapier all rights reserved

Tsumiman
New member
Posts: 5
Joined: Fri Dec 30, 2011 12:54

by Tsumiman » Post

So you just mistaken in suggestion about code-quality?
And how does code-quality associated with calling sombody an idiot? And, it's really looks like good realisation, without modification of actual C++ code.
Who I call an idiot?
Are you idiot?
Вот из-за таких мудрецов как ты, русских и считают упоротыми бананами 95% иностранцев.

Sorry for my bad English and Russian, lol.

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Post

If you don't like the mod, Hackeridze, just ignore it!
It was, as sfan said, the 75% best possible solution without changing the minetest c++ source.
I don't want to have any dependencies for my mods, that's why I didn't use any other mods or create a custom minetest version...
RTMMMP's things can be added when creating a mod-pack.
Okay, we need a patch:
minetest.env:add_entity() should return objref to added entity.
I agree
And as I already said, there should also be a way to get the name of an object when you have the objref.
@sdzen: Gonna implement your textures. Thx!!
Redstone for minetest: Mesecons (mesecons.net)

User avatar
Hackeridze
Member
Posts: 310
Joined: Thu Nov 03, 2011 13:35

by Hackeridze » Post

sapier wrote:
Are you idiot?
I appologize if I did translate it wrong but in my country asking this question is almost exactly the same as calling.
People in your country are wrong.
sapier wrote:If you don't like the mod, Hackeridze, just ignore it!
Im just find bad code and say it for you, so now you know how to fix your mistakes.
sapier wrote:It was, as sfan said, the 75% best possible solution without changing the minetest c++ source.
He said:
sfan5 wrote:It's 75% the best possible realization
sapier wrote:RTMMMP's things can be added when creating a mod-pack.
It will added then minetest.env:add_entity() will return objref of added entity.

Tsumiman, тебя никто не спрашивал. Я же не говорю, кем считаю их?
Tsumiman wrote:And how does code-quality associated with calling sombody an idiot?
Because we can forgive idiot's mistakes.
My game: RTMG
GENTOO USER

sapier
Developer
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Post

Because we can forgive idiot's mistakes.
<ironic> Yes, I think we can do that</ironic>
DON'T mention coding style!
(c) sapier all rights reserved

User avatar
Hackeridze
Member
Posts: 310
Joined: Thu Nov 03, 2011 13:35

by Hackeridze » Post

sapier wrote:
Because we can forgive idiot's mistakes.
<ironic> Yes, I think we can do that</ironic>
/facepalm
My game: RTMG
GENTOO USER

Tsumiman
New member
Posts: 5
Joined: Fri Dec 30, 2011 12:54

by Tsumiman » Post

It's 75% the best possible realization
"possible realization" means realization without changing C++ code, that's quite obviously. If minetest.env:add_entity() behavior would be changed, then there will be better realization.

Also, I should admit, that asking if somebody is an idiot only shows that you are a moron, who don't know how to lead a discussion. In any language and country.
Last edited by Tsumiman on Sun Jan 01, 2012 21:16, edited 1 time in total.

sapier
Developer
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Post

But this discussion is a little bit off-topic, without changes to minetest a really good solution is impossible so we should ask celeron to add at least the return value to add_entity
DON'T mention coding style!
(c) sapier all rights reserved

sfan5
Moderator
Posts: 4095
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

sapier wrote:As well as I assume we do have different opinions on what is code quality too ;-)
Right
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Post

But this discussion is a little bit off-topic
Right, let's do something productive:
I added sdzen's textures and changed the code a little... but no new features.
The Download link is in the first post in this topic above.
Redstone for minetest: Mesecons (mesecons.net)

Tsumiman
New member
Posts: 5
Joined: Fri Dec 30, 2011 12:54

by Tsumiman » Post

Line 81, obj:getpos().y==self.object:getpos().y is checked two times. Seems quite strange. Maybe is should be z-coordinate check in third line?

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests