View Full Version : Collision problem
Ni3ls
7th February 2016, 13:56
Hi all,
I made some blocks that people dont go outside. When the collission of players is enabled (they cant go through each other, the block is working). When its disable, players can also go through this block and it doesnt block anymore.
naarbuiten1()
{
origin=(-1277,-16209,58);
col1 = spawn("script_origin", origin);
col1 setcontents(1);
col1 solid();
}
How to fix it?
IzNoGoD
7th February 2016, 15:12
try setcontents(257)
Ni3ls
8th February 2016, 12:24
Not working :(
thOuMta
8th February 2016, 17:21
collision()
{
while(isAlive(self))
{
self setContents(256);
wait 0.05;
}
}
call on spawnPlayer() :)
Ni3ls
8th February 2016, 18:13
The disablecollission is working Thoumta, but that makes it that players can go to some solid object. This shouldnt be the case.
@izno i used the setcontents(257) in the script above and not on the players. Is this correct?
IzNoGoD
8th February 2016, 19:02
Players should have setcontents(256) maybe 257
Ni3ls
8th February 2016, 19:45
Players should have setcontents(256) maybe 257
I still dont get it.
In main() I add
disableGlobalPlayerCollision();
This works, players can go through each other now. Do I have to add something else?
IzNoGoD
8th February 2016, 20:50
Well, disableglobalplayercollision() is kinda bad as it disables basically ALL collision. Would be nice to have a per-player collision (yes/no) thingy
Ni3ls
8th February 2016, 22:03
But what happens if 1 player has no collision and the other has it? Can they move through each other? And for bullettrace you must set it to 257 right? What happens if they are in each other and u enable collision?
Ni3ls
9th February 2016, 08:41
After using this
collision()
{
while(isAlive(self))
{
self setContents(257);
wait 0.05;
}
}
and 256 instead of 257, i can still walk through that "block"
Ni3ls
15th February 2016, 09:15
Anybody knows another working method? I have to prevent that people enter a window, so a small block is enough
IzNoGoD
15th February 2016, 09:40
spawn a trigger_radius instead of a script_origin.
Ni3ls
15th February 2016, 16:03
Doesnt work either. I have created the trigger_radius and use
trigger setcontents(257);
the trigger doesnt work anymore (tested with
trigger waittill("trigger",player);)
I can still walk through it. Tried with values 1, 256 and 257
Ni3ls
18th February 2016, 11:17
Do you think there is another method from preventing players entering a certain area? I already was thinking of teleports, but this can be misused in the gameplay
IzNoGoD
18th February 2016, 12:05
Ye, it came as an update to cod2 1.0, in the form of killtriggers
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.