How to make players not go through each other?
- Warrior_4_Christ
- Member
- Posts: 30
- Joined: Thu Oct 27, 2016 18:16
- GitHub: Warrior-4-Christ
- In-game: Warrior_4_Christ
- Location: Palm Bay, FL U.S.
- Contact:
How to make players not go through each other?
Hey guys! I was playing Minetest, and I found it really annoying that I can go right through other players. I am hosting a server and most of my players don't like this. Is there a minetest.conf setting or something that I can use? Or do I have to use a mod?
For God so loved the world that He gave his only begotten Son, that whosoever believeth in Him should not perish, but have everlasting life. -- John 3:16 KJV
____
| [] []|
| _>/
____
| [] []|
| _>/
- maikerumine
- Member
- Posts: 1420
- Joined: Mon Aug 04, 2014 14:27
- GitHub: maikerumine
- In-game: maikerumine
Re: How to make players not go through each other?
YES!!!Shadow_The_Hedgehog wrote:Hey guys! I was playing Minetest, and I found it really annoying that I can go right through other players. I am hosting a server and most of my players don't like this. Is there a minetest.conf setting or something that I can use? Or do I have to use a mod?
in your games folder:
E.G. minetest_game/mods/default/player.lua
Add this line:
physical = true,
below the line:
mesh = model_name,
Code: Select all
-- Called when a player's appearance needs to be updated
function default.player_set_model(player, model_name)
local name = player:get_player_name()
local model = models[model_name]
if model then
if player_model[name] == model_name then
return
end
player:set_properties({
mesh = model_name,
physical = true,
textures = player_textures[name] or model.textures,
visual = "mesh",
visual_size = model.visual_size or {x=1, y=1},
})
default.player_set_animation(player, "stand")
else
player:set_properties({
textures = { "player.png", "player_back.png", },
visual = "upright_sprite",
})
end
player_model[name] = model_name
end
- Attachments
-
- screenshot_20170801_155614.png (495.73 KiB) Viewed 859 times
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959
- christoferlevich
- Member
- Posts: 325
- Joined: Thu Dec 01, 2016 23:44
- GitHub: ChristoferL
- Location: Athol, Massachusetts
Re: How to make players not go through each other?
Is there a reason that this isn't the default in minetest already?
everything can be a learning experience...
- Warrior_4_Christ
- Member
- Posts: 30
- Joined: Thu Oct 27, 2016 18:16
- GitHub: Warrior-4-Christ
- In-game: Warrior_4_Christ
- Location: Palm Bay, FL U.S.
- Contact:
Re: How to make players not go through each other?
Wow thanks man! That worked perfectly!maikerumine wrote: Add this line:
physical = true,
below the line:
mesh = model_name,
For God so loved the world that He gave his only begotten Son, that whosoever believeth in Him should not perish, but have everlasting life. -- John 3:16 KJV
____
| [] []|
| _>/
____
| [] []|
| _>/
- Calinou
- Moderator
- Posts: 3169
- Joined: Mon Aug 01, 2011 14:26
- GitHub: Calinou
- IRC: Calinou
- In-game: Calinou
- Location: Troyes, France
- Contact:
Re: How to make players not go through each other?
On non-PvP servers, player collision can be problematic since a single player would be able to block small, narrow tunnels for everyone else.christoferlevich wrote:Is there a reason that this isn't the default in minetest already?
- Beerholder
- Member
- Posts: 199
- Joined: Wed Aug 03, 2016 20:23
- GitHub: evrooije
- In-game: Beerholder
Re: How to make players not go through each other?
Should be configurable in the minetest.conf I'd say ... Easier to find than the Lua code :) I'll see if I can make a PR
- sorcerykid
- Member
- Posts: 1847
- Joined: Fri Aug 26, 2016 15:36
- GitHub: sorcerykid
- In-game: Nemo
- Location: Illinois, USA
Re: How to make players not go through each other?
This would cause a lot of problems on servers that have a static spawnpoint, as a bottleneck would be inevitable.. In theory, it would even be possible for a few players to team up and completely blockade spawn. And that is very bad.
- Warrior_4_Christ
- Member
- Posts: 30
- Joined: Thu Oct 27, 2016 18:16
- GitHub: Warrior-4-Christ
- In-game: Warrior_4_Christ
- Location: Palm Bay, FL U.S.
- Contact:
Re: How to make players not go through each other?
The admin could always kick or ban them if they do that. They could also use he teleport command for moderation.sorcerykid wrote:This would cause a lot of problems on servers that have a static spawnpoint, as a bottleneck would be inevitable.. In theory, it would even be possible for a few players to team up and completely blockade spawn. And that is very bad.
For God so loved the world that He gave his only begotten Son, that whosoever believeth in Him should not perish, but have everlasting life. -- John 3:16 KJV
____
| [] []|
| _>/
____
| [] []|
| _>/
- Beerholder
- Member
- Posts: 199
- Joined: Wed Aug 03, 2016 20:23
- GitHub: evrooije
- In-game: Beerholder
Re: How to make players not go through each other?
Well you can also just do a set_properties( { physical = false } ) when in a say a 100 block range of spawn?
- Warrior_4_Christ
- Member
- Posts: 30
- Joined: Thu Oct 27, 2016 18:16
- GitHub: Warrior-4-Christ
- In-game: Warrior_4_Christ
- Location: Palm Bay, FL U.S.
- Contact:
Re: How to make players not go through each other?
Really? Wow I didn't know you could do that. I'm not very good at modding.Beerholder wrote:Well you can also just do a set_properties( { physical = false } ) when in a say a 100 block range of spawn?
For God so loved the world that He gave his only begotten Son, that whosoever believeth in Him should not perish, but have everlasting life. -- John 3:16 KJV
____
| [] []|
| _>/
____
| [] []|
| _>/
- Andrey01
- Member
- Posts: 2579
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Re: How to make players not go through each other?
I wonder developers did not take a care about it. Maybe for don`t hinder other players thus?
- Warrior_4_Christ
- Member
- Posts: 30
- Joined: Thu Oct 27, 2016 18:16
- GitHub: Warrior-4-Christ
- In-game: Warrior_4_Christ
- Location: Palm Bay, FL U.S.
- Contact:
Re: How to make players not go through each other?
I'm sorry I don't understand what that means. It sounds like English is not your first language. If you could post in your language then I could translate. :)Andrey01 wrote:I wonder developers did not take a care about it. Maybe for don`t hinder other players thus?
For God so loved the world that He gave his only begotten Son, that whosoever believeth in Him should not perish, but have everlasting life. -- John 3:16 KJV
____
| [] []|
| _>/
____
| [] []|
| _>/
Re: How to make players not go through each other?
Code: Select all
for p in players
while p:get_hp() > 0
p:set_properties({physical=true})
else
p:set_properties({physical=false})
...
if p:getpos() == anyotherplayersomehow:getpos() then
telefrag()
end
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: How to make players not go through each other?
let's say, around 5 players could do a "human prison" it needs to be coupled with entity pushing to avoid that!sorcerykid wrote:This would cause a lot of problems on servers that have a static spawnpoint, as a bottleneck would be inevitable.. In theory, it would even be possible for a few players to team up and completely blockade spawn. And that is very bad.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
- Andrey01
- Member
- Posts: 2579
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Re: How to make players not go through each other?
Edit: I wonder developers didn`t take a care about it. Maybe not to hinder players to go them if some of them hinder?Shadow_The_Hedgehog wrote:I'm sorry I don't understand what that means. It sounds like English is not your first language. If you could post in your language then I could translate. :)Andrey01 wrote:I wonder developers did not take a care about it. Maybe for don`t hinder other players thus?
I hope do you understand my sentence now?
- Warrior_4_Christ
- Member
- Posts: 30
- Joined: Thu Oct 27, 2016 18:16
- GitHub: Warrior-4-Christ
- In-game: Warrior_4_Christ
- Location: Palm Bay, FL U.S.
- Contact:
Re: How to make players not go through each other?
Теперь я понимаю. Я видел, что вы из России, поэтому я перевел то, что вы сказали на русский, а затем вернулся на английский язык.Andrey01 wrote: Edit: I wonder developers didn`t take a care about it. Maybe not to hinder players to go them if some of them hinder?
I hope do you understand my sentence now?
For God so loved the world that He gave his only begotten Son, that whosoever believeth in Him should not perish, but have everlasting life. -- John 3:16 KJV
____
| [] []|
| _>/
____
| [] []|
| _>/
- Andrey01
- Member
- Posts: 2579
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Re: How to make players not go through each other?
Hmm... that you translated on Russian with helping Google translator it looks like a little no correct. I could translate your text from English to Russian. Just i sometimes can talk no correct.Shadow_The_Hedgehog wrote:Теперь я понимаю. Я видел, что вы из России, поэтому я перевел то, что вы сказали на русский, а затем вернулся на английский язык.Andrey01 wrote: Edit: I wonder developers didn`t take a care about it. Maybe not to hinder players to go them if some of them hinder?
I hope do you understand my sentence now?
Who is online
Users browsing this forum: No registered users and 25 guests