Dimension System

Hey im trying to create something that i would like to call a uh, dimension system. I need to know if its possible to set it so that only two people can see each toher, but be in the same spot, and not hear the others ora nything. Basically lets say there are two people fighting in a boxingring in same place on same map. Alright, now two other poeple want to fight. You would set group 1’s deminsion to 10, and group 2’s to 11. They wouldnt hear or know each other were there because only the people in the same dimension can see or hear each other. My problem is that i dont know how to make it so a player cant see another player or hear them. Anyone got any ideas?

That’s a cool idea, and definitely possible (though possibly resource consuming), and I feel like it’d be somewhat tricky to implement in order to fully cover up another player’s tracks.

Do you have anything to point me in the right direction

Hooks.

(Eg. Player collision, Drawing, CanHear, Take damage… etc)

It’s a cool idea too though

I had similar idea in the past, but currently it is not possible to make perfect dimension addon. Because you can’t modify C++ weapon tracers trough lua.

Unless you are writing custom gamemode that doesn’t require hl2/sandbox weapons.

It’s possible and I’ve done it before. The wiki is a bit vague when it comes to functions to make things disappear.

These might put you on the right track:
http://wiki.garrysmod.com/page/Entity/SetPreventTransmit (Makes the client totally not see the entity)
http://wiki.garrysmod.com/page/Entity/SetNoDraw (Makes the client not see the entity but still be able to interact with it)
http://wiki.garrysmod.com/page/Entity/SetSolid (Allows you to make unseeable entities also untouchable)
http://wiki.garrysmod.com/page/Entity/SetCustomCollisionCheck (Allows you to selectively control colissions between entities)
http://wiki.garrysmod.com/page/GM/ShouldCollide (Allows you to selectively control colissions between entities)

What about physgun, or hl2 weapons?

That one’s a bit easier to find if you use the glua wiki, like Kevlon also said:

PhysgunPickup only checks if the physgun can pickup an entity or not, it won’t allow to modify the traces to check if there is an entity behind the checked entity. And IIRC you can’t force physgun to pickup custom entity trough lua, so making custom trace won’t work either.

Double Post Double Post

Well so far i have gotten the voice chat and foot steps. Im having issues with keeping them from rendering, and mostly from collision. You can walk through each other, but when youg et to close it does the thing where it pushes them away a little bit. Any ideas?

Do you have collision check both clientside and serverside?

Derp, Edited what i said… No i dont, will try that real quick

EDIT :

Same result , heres what i mean

Same results…

But i can shoot through them. Also any idea about the weapons, or will those only happen with hl2 and phys guns. Or do you have a fix for those to? Or can you point me in the right direction lol? ( Im still browing wiki might find it before you do, who knows )

[editline]16th May 2015[/editline]

Searched and found this.

They dont work :confused: Anyone else got any ideas?

[editline]16th May 2015[/editline]

Gonna try using this to keep the sounds from guns and etc in dimensions.

Overv already made this.

http://forum.facepunch.com/showthread.php?t=899973

In the end he was limited by constraints of the game, such as the inability to hide some kinds of light and effects from other layered views.

Play that worked the only problem is i gotta stop transmiting information about that entity. ( Causing the ffect of the bullet holes created by that enttiy ( the player ) to not show up on said client because the information is not being sent to the client.) Anyone know why my functions now working?


 function updateTransmits()
local players = player.GetAll()
	for i,v in ipairs(players)do
		for index,player in ipairs(players)do
			if(v:GetNWInt("dim")==player:GetNWInt("dim"))then
			player:SetPreventTransmit(v,false)
			else
			player:SetPreventTransmit(v,true)	
			end
		end
	end
end
timer.Create("updateTransmitsTimer",1,0,updateTransmits)

[editline]16th May 2015[/editline]

Meh, i rather make something on my own for a couple reasons. Plan on using it in a gamemode and i need to know how everything works , inside and out. Also for the learning experience. Thanks though, will deffiatnly look at that.

You definitely won’t be able to completely separate the game into dimensions as if it were designed to work that way, but you could probably do just enough separating for a specific gamemode that builds itself around such limitations.

Yeah thats what im going to do, its just this player pushing thing is making anything impossible.

The serverside and clientside collision checking may not be matching up, I’ve had this problem before and ensuring that they did match up is what fixed it I’m pretty sure. Regardless, it is possible to fix that issue.

There are these, but I would recommend using against this on players since players often get stuck in the ceiling.