Can player hold 3d object? (ex:holding gun)

Kevin Tee
Member
 
Posts: 55
Joined: Wed Jul 22, 2015 04:00

Can player hold 3d object? (ex:holding gun)

by Kevin Tee » Sat Mar 26, 2016 19:49

I am modelling 3d guns for minetest. I want to know if player can actually hold it or not? Like other fps games.

If the player can, can recoil and flash be add? Thanks.
 

User avatar
MineYoshi
Member
 
Posts: 4267
Joined: Wed Jul 08, 2015 13:20
GitHub: MineYosh
IRC: MineYoshi
In-game: Kirby_Retro

Re: Can player hold 3d object? (ex:holding gun)

by MineYoshi » Mon Mar 28, 2016 19:44

i don't know you can search in the mods api manual, or in rubenwardy modding book...

Sincerely i don't know it!
People talk about freedom of speech, so i'll say that God exists.
Open your eyes!! See The big unicorn conspiracy.!! :D The government has been lying to us about unicorns!!
"I've learned there are three things you don't discuss with people: religion, politics and the Great Pumpkin" - Linus Van Pelt
I'm the Officially 1st ABJist in the world ( ͡° ͜ʖ ͡°)
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Can player hold 3d object? (ex:holding gun)

by azekill_DIABLO » Thu Mar 31, 2016 09:44

it may be possible by hacking 3dwieldview

but it will be laggy.....
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
benrob0329
Member
 
Posts: 1192
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
In-game: benrob03

Re: Can player hold 3d object? (ex:holding gun)

by benrob0329 » Thu Mar 31, 2016 15:33

3D armor includes a modified player model that shows the wielded item.
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Can player hold 3d object? (ex:holding gun)

by azekill_DIABLO » Thu Mar 31, 2016 16:18

i was talking of the other mod by stu......

edit: it's the same thing....
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
D00Med
Member
 
Posts: 712
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med

Re: Can player hold 3d object? (ex:holding gun)

by D00Med » Wed Apr 06, 2016 22:42

I found a way to do it, but it's not very good for guns because the model moves as if digging.
Just make a node with "mesh" drawtype, and make it shoot with "on_use"
I hope that explanation is clear enough.
Look! I have a signature :]
My subgame: https://forum.minetest.net/viewtopic.php?f=15&t=14051#p207242
dmobs2 is coming...
 

User avatar
AiTechEye
Member
 
Posts: 409
Joined: Fri May 29, 2015 21:14

Re: Can player hold 3d object? (ex:holding gun)

by AiTechEye » Sat Apr 09, 2016 08:06

It's possible with nodes, i made it in the gravitygun mod... nodes have the on_use and on_place functions like tools / items.

https://forum.minetest.net/viewtopic.php?f=9&t=14056


Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_node("gravitygun:gun2", {
   description = "Gravitygun",
   range = 10,
   stack_max = 1,
   inventory_image = "gravitygun_gun2.png",
   tiles = {"tiles"},
   groups = {dig_immediate = 3},
   paramtype = "light",
   sunlight_propagates = true,
   drawtype="mesh",
   mesh="gravitygun_gun.obj",
   on_use = function(itemstack, user, pointed_thing)
      return itemstack
   end,
   on_place = function(itemstack, user, pointed_thing)
      return itemstack
   end,
})




Image
Alive AI Mine/Build AI NPC
Gravitygun HL2
Portalgun Portal
Marssurvive Survive on mars
Bows bows + arrows
SoundCloud (Music)
SoundCloud (Classic)
YouTube
 

User avatar
MineYoshi
Member
 
Posts: 4267
Joined: Wed Jul 08, 2015 13:20
GitHub: MineYosh
IRC: MineYoshi
In-game: Kirby_Retro

Re: Can player hold 3d object? (ex:holding gun)

by MineYoshi » Sat Apr 09, 2016 17:34

UjEdwin wrote:It's possible with nodes, i made it in the gravitygun mod... nodes have the on_use and on_place functions like tools / items.

https://forum.minetest.net/viewtopic.php?f=9&t=14056


Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_node("gravitygun:gun2", {
   description = "Gravitygun",
   range = 10,
   stack_max = 1,
   inventory_image = "gravitygun_gun2.png",
   tiles = {"tiles"},
   groups = {dig_immediate = 3},
   paramtype = "light",
   sunlight_propagates = true,
   drawtype="mesh",
   mesh="gravitygun_gun.obj",
   on_use = function(itemstack, user, pointed_thing)
      return itemstack
   end,
   on_place = function(itemstack, user, pointed_thing)
      return itemstack
   end,
})




Image



that's a good thing and a good mod, but i think Kevin Tee is talking about "tools" or "craft_items" then i can suggest something, add a mesh instead texture...
People talk about freedom of speech, so i'll say that God exists.
Open your eyes!! See The big unicorn conspiracy.!! :D The government has been lying to us about unicorns!!
"I've learned there are three things you don't discuss with people: religion, politics and the Great Pumpkin" - Linus Van Pelt
I'm the Officially 1st ABJist in the world ( ͡° ͜ʖ ͡°)
 

User avatar
AiTechEye
Member
 
Posts: 409
Joined: Fri May 29, 2015 21:14

Re: Can player hold 3d object? (ex:holding gun)

by AiTechEye » Sun Apr 10, 2016 12:29

1:
I am modelling 3d guns for minetest. I want to know if player can actually hold it or not?


He is talking about models not craft items or tools
If you do a text search on the page, you will find the word "tool" first on my post, and craft / items on your under :P

2: you can use nodes as tools, tools / craft items cant use models so why not use the nodes? the problem will be solved in a simple way.

add "stack_max = 1" to make it work like a tool (can only wear 1 in a slot)

and this to make it unplaceable

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
   on_place=function(itemstack, user, pointed_thing)
      return itemstack
   end,
Alive AI Mine/Build AI NPC
Gravitygun HL2
Portalgun Portal
Marssurvive Survive on mars
Bows bows + arrows
SoundCloud (Music)
SoundCloud (Classic)
YouTube
 

User avatar
stu
Member
 
Posts: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

Re: Can player hold 3d object? (ex:holding gun)

by stu » Sun Apr 10, 2016 14:19

UjEdwin wrote:you can use nodes as tools, tools / craft items cant use models so why not use the nodes?

In a lot of cases this is true, however, nodes do not wear out like tool items do. It would be nice if tool and craft items could also support meshes.
 

User avatar
MineYoshi
Member
 
Posts: 4267
Joined: Wed Jul 08, 2015 13:20
GitHub: MineYosh
IRC: MineYoshi
In-game: Kirby_Retro

Re: Can player hold 3d object? (ex:holding gun)

by MineYoshi » Sun Apr 10, 2016 19:34

stu wrote:
UjEdwin wrote:you can use nodes as tools, tools / craft items cant use models so why not use the nodes?

In a lot of cases this is true, however, nodes do not wear out like tool items do. It would be nice if tool and craft items could also support meshes.

i think that can be a good feature for the 0.4.15, anyways is better wait, by now the only way is using nodes...
People talk about freedom of speech, so i'll say that God exists.
Open your eyes!! See The big unicorn conspiracy.!! :D The government has been lying to us about unicorns!!
"I've learned there are three things you don't discuss with people: religion, politics and the Great Pumpkin" - Linus Van Pelt
I'm the Officially 1st ABJist in the world ( ͡° ͜ʖ ͡°)
 


Return to Minetest General

Who is online

Users browsing this forum: No registered users and 14 guests

cron