How to protect map (or secret room) against cheaters?
Quote from czolko on June 27, 2013, 6:02 amHi!
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?
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?

Quote from josepezdj on June 27, 2013, 6:17 amThere is a script function for that: IsNoclipping.
I remember Omnicoder used "something" (I don't really know if this was the above script function or other method) for killing the player if he was noclipping for a while in his map Retrospective
There is a script function for that: IsNoclipping.
I remember Omnicoder used "something" (I don't really know if this was the above script function or other method) for killing the player if he was noclipping for a while in his map Retrospective
Quote from Lpfreaky90 on June 27, 2013, 8:48 amI wouldn't do it. Quite often I noclip just so I don't die or similar minor things.
If you want to hide something; hide it in such a way that even when you noclip it wouldn't draw much attention.
I wouldn't do it. Quite often I noclip just so I don't die or similar minor things.
If you want to hide something; hide it in such a way that even when you noclip it wouldn't draw much attention.
Quote from FelixGriffin on June 27, 2013, 11:17 amTrigger_multiple in the secret room that disables everything if the player enters when noclipping and enables it again if they enter without it?
If you really want it to be secure you can spam noclip 0 and sv_cheats 0 through a point_servercommand, but that would get frustrating if a player got stuck and couldn't escape.
Trigger_multiple in the secret room that disables everything if the player enters when noclipping and enables it again if they enter without it?
If you really want it to be secure you can spam noclip 0 and sv_cheats 0 through a point_servercommand, but that would get frustrating if a player got stuck and couldn't escape.

Quote from ChickenMobile on June 27, 2013, 11:22 amMy logic is: how would a player know there is a secret to noclip to?
I think you're being a little too paranoid about this.
My logic is: how would a player know there is a secret to noclip to?
I think you're being a little too paranoid about this.
Quote from User on June 27, 2013, 4:33 pmFelixGriffin wrote:Trigger_multiple in the secret room that disables everything if the player enters when noclipping and enables it again if they enter without it?If you really want it to be secure you can spam noclip 0 and sv_cheats 0 through a point_servercommand, but that would get frustrating if a player got stuck and couldn't escape.
Had the same Idea
I would do this, or [spoiler]My Idea was badly. xD[/spoiler]
If you really want it to be secure you can spam noclip 0 and sv_cheats 0 through a point_servercommand, but that would get frustrating if a player got stuck and couldn't escape.
Had the same Idea I would do this, or
Quote from FelixGriffin on June 27, 2013, 4:34 pmI mean, make the trigger use the script to check if the player is noclipping or not when they touch it.
I mean, make the trigger use the script to check if the player is noclipping or not when they touch it.
Quote from User on June 27, 2013, 4:37 pmFelixGriffin wrote:I mean, make the trigger use the script to check if the player is noclipping or not when they touch it.Hmm i have a question, i dont often use scripts, but how do i use a script with a trigger to check noclip? I mean, how would i get a returnvalue from the script?
Hmm i have a question, i dont often use scripts, but how do i use a script with a trigger to check noclip? I mean, how would i get a returnvalue from the script?

Quote from ChickenMobile on June 27, 2013, 8:16 pmYou can find all the script functions at this page: https://developer.valvesoftware.com/wik ... _Functions
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)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.
You can find all the script functions at this page: https://developer.valvesoftware.com/wik ... _Functions
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.