Disabled drop, Possible ?

User avatar
Chiantos
Member
 
Posts: 364
Joined: Sun Jan 15, 2017 09:04
Location: Earth
GitHub: MrChiantos
IRC: mrchiantos
In-game: mrchiantos

Disabled drop, Possible ?

by Chiantos » Sun Jul 01, 2018 09:18

Hello,

For a SubGame, i search the solution for disabled drop item for players in Map.

Can i disabled drop with a mod or What is function (drop) in engine or minetest_game ?

I have disabled in inventory, i search for disabled in touchscreen button menu or keyboard.

Thanks for Help, mrchiantos.
 

hajo
Member
 
Posts: 596
Joined: Thu Oct 13, 2016 10:45
Location: DE

Re: Disabled drop, Possible ?

by hajo » Sun Jul 01, 2018 10:07

Chiantos wrote:disabled drop item for players

Why, what is the actual problem ?

Things will still drop when you dig something while the inventory is full.
 

User avatar
Chiantos
Member
 
Posts: 364
Joined: Sun Jan 15, 2017 09:04
Location: Earth
GitHub: MrChiantos
IRC: mrchiantos
In-game: mrchiantos

Re: Disabled drop, Possible ?

by Chiantos » Sun Jul 01, 2018 10:36

English Translate :
I only use the inventory bar for 8 block colors, the rest of the inventory is disabled.

The subgame will be when creative, my problem is that the players can not throw the 8 blocks they get initially and therefore I need to disable the possibility of throwing them that it is by the use of the mouse, keyboard or touchscreen. To be able to obtain a fixed and locked inventory. The goal would be that the player can not modify his inventory or the throw.

Fr :J'utilise uniquement la barre d'inventaire pour 8 couleurs de bloc, le reste de l'inventaire est desactivé. Le subgame ne sera quand creatif, mon probleme serait donc que les joueurs ne puissent pas jeter les 8 blocs qu'ils obtiennent iniatialement et donc j'aurais besoin de desactiver la possibilité de les jeter que ça soit par l'usage de la souris, du clavier ou du touchscreen. Pour pouvoir obtenir un inventaire fixe et verrouillé. Le but serait que le joueur ne puisse pas modifié son inventaire ou le jeter.

Thanks for Help.
 

User avatar
AspireMint
Member
 
Posts: 331
Joined: Mon Jul 09, 2012 12:59
Location: Stuck at spawn
GitHub: AspireMint
IRC: AspireMint
In-game: AspireMint

Re: Disabled drop, Possible ?

by AspireMint » Sun Jul 01, 2018 10:52

add this into your code:
Code: Select all
function minetest.item_drop(itemstack, dropper, pos)
   return itemstack
end

it should work :-)
 

User avatar
Chiantos
Member
 
Posts: 364
Joined: Sun Jan 15, 2017 09:04
Location: Earth
GitHub: MrChiantos
IRC: mrchiantos
In-game: mrchiantos
 


Return to General Discussion



Who is online

Users browsing this forum: No registered users and 2 guests