How to protect map (or secret room) against cheaters?
Quote from CamBen on June 30, 2013, 2:56 pmJust though of something else. You could put the Easter egg room at the far edge of the map area, and link it to the main area with a world portal. It will be so far away that no one will be able to see it while no clipping.
Just though of something else. You could put the Easter egg room at the far edge of the map area, and link it to the main area with a world portal. It will be so far away that no one will be able to see it while no clipping.
Aperture Science: We do our science asbestos we can!
Quote from Dafflewoctor on June 30, 2013, 9:35 pmMaybe you could do what the above said, but make a trigger_hurt around the room, so if anyone DOES try to noclip to it, they will get killed.
And for even more precaution, you could connect the trigger to a point_clientcommand that issues "godmode 0" and if they have godmode enabled, then when they enter the trigger, they will first have their godmode disabled and then they will be killed.Personally I think it's not that much of a problem, because chances are the player won't even know about a secret when they play your map.
Maybe you could do what the above said, but make a trigger_hurt around the room, so if anyone DOES try to noclip to it, they will get killed.
And for even more precaution, you could connect the trigger to a point_clientcommand that issues "godmode 0" and if they have godmode enabled, then when they enter the trigger, they will first have their godmode disabled and then they will be killed.
Personally I think it's not that much of a problem, because chances are the player won't even know about a secret when they play your map.
Quote from portal2tenacious on July 1, 2013, 10:38 amCamBen wrote:Not knowing much about scripts myself, i would place a trigger catapult in the room which expels them back into the void if they have not tripped the various triggers and activated the puzzle elements required before you can enter the room.Maybe the same thing but with a trigger_teleport
Maybe the same thing but with a trigger_teleport

Quote from ChickenMobile on July 1, 2013, 11:51 amportal2tenacious wrote:Maybe the same thing but with a trigger_teleportChickenMobile wrote:Also I still don't see why the need for the over-protectiveness and complexity of the 'secret exploration prevention'. Personally I would just have a trigger_teleport enabled that would teleport the player to the start until the player walks through a certain place first.
Quote from DaMaGepy on July 5, 2013, 5:44 amczolko wrote:Hi!I'm making my second map to Portal 2. This time I want to put in there some secret rooms, but I'm affraid the cheaters will destroy whole surprise, so how can I protect the map against them? I thought about some kind of cheat detection. For instance when player will activite the cheat (noclip) the secrets will be removed from the map. I have no idea how to make such a thing, maby someone have a better or simpler idea?
I just read your post, and without reading other"s, here what I should do if I want them to noclip-find the secrets:
- Full dark room, and lights only turn o when the player enter the area from the intended direction (hole, hatch etc.- Triggers around the area (noclip still activates triggers), and the only hole in the trigger frame where its not activates is the intended entrance. Triggers can delete all object, remove secret triggers (announcements etc), and u can place a huge room-sized door outside the walls of the secret room that moves in and fills the entire room (blocks the player and maybe view). IF the wall where the huge block idles is a big solid (so the func_door's origin is inside the solid) it will not leak. Activating the outer trigger array can also display a "cheater!" message and blocks/close every other element on the map or can even disconnect the player with a delay or clientcommand "reload" the map after some second.
- It can be the above's opposite, the room is filled with a huge brush by default that moves out when you enter the areaq normally (ofc the func_door's default position is outside, for correct light calculation at compile)
- A worldportal (linked_portal_door) to a very far place in hammer (near the edge) so the player cant see it with noclip. Also this worldportal only activates when approached normally. Combined with the first light-turnon idea, if the point is to not find the area and the entrance to it with noclip, and not the access part.
- the above idea plus the trigger surrounding idea (where if the player finds the very far hidden area) with teleport trigger that sends the player back to the original map area after noclipflying for ages
I'm making my second map to Portal 2. This time I want to put in there some secret rooms, but I'm affraid the cheaters will destroy whole surprise, so how can I protect the map against them? I thought about some kind of cheat detection. For instance when player will activite the cheat (noclip) the secrets will be removed from the map. I have no idea how to make such a thing, maby someone have a better or simpler idea?
I just read your post, and without reading other"s, here what I should do if I want them to noclip-find the secrets:
- Full dark room, and lights only turn o when the player enter the area from the intended direction (hole, hatch etc.
- Triggers around the area (noclip still activates triggers), and the only hole in the trigger frame where its not activates is the intended entrance. Triggers can delete all object, remove secret triggers (announcements etc), and u can place a huge room-sized door outside the walls of the secret room that moves in and fills the entire room (blocks the player and maybe view). IF the wall where the huge block idles is a big solid (so the func_door's origin is inside the solid) it will not leak. Activating the outer trigger array can also display a "cheater!" message and blocks/close every other element on the map or can even disconnect the player with a delay or clientcommand "reload" the map after some second.
- It can be the above's opposite, the room is filled with a huge brush by default that moves out when you enter the areaq normally (ofc the func_door's default position is outside, for correct light calculation at compile)
- A worldportal (linked_portal_door) to a very far place in hammer (near the edge) so the player cant see it with noclip. Also this worldportal only activates when approached normally. Combined with the first light-turnon idea, if the point is to not find the area and the entrance to it with noclip, and not the access part.
- the above idea plus the trigger surrounding idea (where if the player finds the very far hidden area) with teleport trigger that sends the player back to the original map area after noclipflying for ages
Quote from zagaomaster on July 11, 2013, 9:56 amChickenMobile wrote:You can find all the script functions at this page: https://developer.valvesoftware.com/wik ... _FunctionsThe one you are looking for is IsNoclipping.
To use it in a VScript you will need to use a think function from a logic_script (a function that constantly executes and is defined inside the think function variable in the logic_script)portal.jpgTo use a script you need to create a text file within scripts/vscripts/*customsubdirectory* and rename the extension to .nut then reference it within the logic_script you made. By clicking the manage button in the logic_script properties you can browse to the exact file you want to add, or even add multiple scripts for the one logic_script.
You can use the code below as a reference to make it work.
- Code: Select all
//think function used to check if the player is noclipping
function think(){
//The IsNoclipping function will either return true or false.
//If it is true it will execute the function dothis()
if(IsNoclipping()){
dothis();
}
}function dothis(){
//execute commands here. e.g. EntFire("relayname", "Trigger", "", 0);
}I suggest that you also have some sort of logic to disable the command you want to execute once the player has noclipped, otherwise it will constantly execute when they are.
this work in mode co-op or just singleplayer ?
The one you are looking for is IsNoclipping.
To use it in a VScript you will need to use a think function from a logic_script (a function that constantly executes and is defined inside the think function variable in the logic_script)
To use a script you need to create a text file within scripts/vscripts/*customsubdirectory* and rename the extension to .nut then reference it within the logic_script you made. By clicking the manage button in the logic_script properties you can browse to the exact file you want to add, or even add multiple scripts for the one logic_script.
You can use the code below as a reference to make it work.
- Code: Select all
//think function used to check if the player is noclipping
function think(){
//The IsNoclipping function will either return true or false.
//If it is true it will execute the function dothis()
if(IsNoclipping()){
dothis();
}
}function dothis(){
//execute commands here. e.g. EntFire("relayname", "Trigger", "", 0);
}
I suggest that you also have some sort of logic to disable the command you want to execute once the player has noclipped, otherwise it will constantly execute when they are.
this work in mode co-op or just singleplayer ?

Quote from ChickenMobile on July 11, 2013, 11:22 pmBoth: if you reference the player you want.
Both: if you reference the player you want.
Quote from pr94 on January 4, 2014, 12:06 pmChickenMobile wrote:
- Code: Select all
//think function used to check if the player is noclipping
function think(){
//The IsNoclipping function will either return true or false.
//If it is true it will execute the function dothis()
if(IsNoclipping()){
dothis();
}
}function dothis(){
//execute commands here. e.g. EntFire("relayname", "Trigger", "", 0);
}I tried to make a noclip prevention script once, but it did not work with simple IsNoclipping(). So I looked it on Valve Dev site, which class has this function. After a few minutes of testing, the right solution seems to be player.IsNoclipping()
- Code: Select all
function think(){
if(player.IsNoclipping()){
dothis();
}
}
function dothis(){
//Command execution
}It works in single player, however I haven't tested it in multiplayer yet.
I'm against this this whole thing, but someone asked me if I could make his map noclip-proof. My solution was to check the player if he/she is in noclip, then fire a clientcommand that turns off noclip.
- Code: Select all
//think function used to check if the player is noclipping
function think(){
//The IsNoclipping function will either return true or false.
//If it is true it will execute the function dothis()
if(IsNoclipping()){
dothis();
}
}function dothis(){
//execute commands here. e.g. EntFire("relayname", "Trigger", "", 0);
}
I tried to make a noclip prevention script once, but it did not work with simple IsNoclipping(). So I looked it on Valve Dev site, which class has this function. After a few minutes of testing, the right solution seems to be player.IsNoclipping()
- Code: Select all
function think(){
if(player.IsNoclipping()){
dothis();
}
}
function dothis(){
//Command execution
}
It works in single player, however I haven't tested it in multiplayer yet.
I'm against this this whole thing, but someone asked me if I could make his map noclip-proof. My solution was to check the player if he/she is in noclip, then fire a clientcommand that turns off noclip.
Quote from Arachnaphob on January 4, 2014, 1:40 pmWhat about a trigger_teleport?
What about a trigger_teleport?
Musical website Moddb
Quote from User on January 4, 2014, 2:39 pmhmm you could just enter " ent_fire trigger_teleport kill". (Also when it would kill all teleports)
hmm you could just enter " ent_fire trigger_teleport kill". (Also when it would kill all teleports)