Why doesn't this change the entity's selection box size?

User avatar
Piezo_
Member
 
Posts: 219
Joined: Fri Jul 20, 2018 21:36
Location: (x,y,z)
GitHub: is proprietary I use NotABug
In-game: Piezo_ or TheRealPiezo_

Why doesn't this change the entity's selection box size?

by Piezo_ » Sun Jan 06, 2019 20:10

So, I've tried adding this to the "drops" mod to disable the outline around items, because they're useless now that I've already disabled the old pickup system by removing the item's on_punch code.

minetest.registered_entities["__builtin:item"].selectionbox = {0.0,0.0,0.0,0.0,0.0,0.0}
This is in init.lua's global scope, before any other code runs.

I've tried several variants of this, including using 'collisionbox', but it just doesn't work.
I haven't tried re-registering __builtin:item with my own definition, but I would rather not if there's a better way.
while (true) { suffer(); }
 

User avatar
Napiophelios
Member
 
Posts: 982
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi
 

User avatar
Piezo_
Member
 
Posts: 219
Joined: Fri Jul 20, 2018 21:36
Location: (x,y,z)
GitHub: is proprietary I use NotABug
In-game: Piezo_ or TheRealPiezo_

Re: Why doesn't this change the entity's selection box size?

by Piezo_ » Sun Jan 06, 2019 21:16

Napiophelios wrote:have you tried:
Code: Select all
#    Show entity selection boxes
#    type: bool
# show_entity_selectionbox = true

Is this a global setting, or an entity property?
EDIT: Seems it's a setting. Well, this doesn't solve the problem, but it's very helpful nonetheless, so I've added it to my minetest.conf.
while (true) { suffer(); }
 

User avatar
AiTechEye
Member
 
Posts: 745
Joined: Fri May 29, 2015 21:14
Location: Unknown
GitHub: AiTechEye

Re: Why doesn't this change the entity's selection box size?

by AiTechEye » Tue Jan 08, 2019 12:45

try
Code: Select all
minetest.after(0.1, function()
   minetest.registered_entities["__builtin:item"].on_activate2=minetest.registered_entities["__builtin:item"].on_activate
   minetest.registered_entities["__builtin:item"].on_activate=function(self, staticdata,time)
      minetest.registered_entities["__builtin:item"].on_activate2(self, staticdata,time)
         minetest.after(0, function(self)
            if self and self.object then
               self.object:set_properties({
                  collisionbox={0,0,0,0,0,0},
               })
            end
         end,self)
      return self
   end
end)
 


Return to Problems



Who is online

Users browsing this forum: Google [Bot], MSN [Bot] and 1 guest