How to protect map (or secret room) against cheaters?
Quote from FelixGriffin on June 27, 2013, 11:01 pmI was thinking simpler. Add this to your trigger: OnStartTouch !self RunScriptCode if(GetPlayer().IsNoclipping()) ::secret.Destroy();
Then place a logic_auto, target your secret stuff, OnMapSpawn secret_stuff RunScriptCode ::secret <- self;
I was thinking simpler. Add this to your trigger: OnStartTouch !self RunScriptCode if(GetPlayer().IsNoclipping()) ::secret.Destroy();
Then place a logic_auto, target your secret stuff, OnMapSpawn secret_stuff RunScriptCode ::secret <- self;

Quote from josepezdj on June 28, 2013, 6:05 am@Chicken: wouldn't it be needed to pass the script through the player so it is executed every [don't remember exactly the number of mimliseconds right now] secs? or would it work just by executing the function at the beginning of the map load via the logic_script / logic_auto?
@Felix: good point.
But guys, I think it's not necessary to kill the player or destroy the secret room, just hide it
If it's builtt up by means of func_brushes and stuff, it can be easily hidden.
@Chicken: wouldn't it be needed to pass the script through the player so it is executed every [don't remember exactly the number of mimliseconds right now] secs? or would it work just by executing the function at the beginning of the map load via the logic_script / logic_auto?
@Felix: good point.
But guys, I think it's not necessary to kill the player or destroy the secret room, just hide it If it's builtt up by means of func_brushes and stuff, it can be easily hidden.

Quote from ChickenMobile on June 28, 2013, 12:08 pmjosepezdj wrote:@Chicken: wouldn't it be needed to pass the script through the player so it is executed every...Grabbing the player first would be essential to the script function (sorry for not including it), however it needs to be a think function otherwise it will not execute the necessary commands once the player has noclipped. Unfortunately there is no event stated within GameEvents.res to listen to for noclipping.
By setting a function inside the script think function it will automatically execute (and continue executing) this command without the need to RunScriptCode from a logic_auto at mapspawn.player.IsNoclipping()
or
GetPlayer().IsNoclipping()@Felix: Yes you probably could have the script inside the level, but an external file is eternally less confusing and you can include quotation marks "" that would otherwise destroy the .vmf.
For a beginner mapper I would avoid scripts altogether as it would only make things more difficult in the long run - external files will need to be added to the .bsp using pakrat afterwards and understanding scripting comes with understanding the outputs of entities.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.
P.S. Sorry if this seems confusing, it is 2am!
Grabbing the player first would be essential to the script function (sorry for not including it), however it needs to be a think function otherwise it will not execute the necessary commands once the player has noclipped. Unfortunately there is no event stated within GameEvents.res to listen to for noclipping.
By setting a function inside the script think function it will automatically execute (and continue executing) this command without the need to RunScriptCode from a logic_auto at mapspawn.
player.IsNoclipping()
or
GetPlayer().IsNoclipping()
@Felix: Yes you probably could have the script inside the level, but an external file is eternally less confusing and you can include quotation marks "" that would otherwise destroy the .vmf.
For a beginner mapper I would avoid scripts altogether as it would only make things more difficult in the long run - external files will need to be added to the .bsp using pakrat afterwards and understanding scripting comes with understanding the outputs of entities.
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.
P.S. Sorry if this seems confusing, it is 2am!
Quote from CamBen on June 29, 2013, 1:12 pmNot 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.
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.
Aperture Science: We do our science asbestos we can!
Quote from Dafflewoctor on June 29, 2013, 7:22 pmCamBen 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.Frankly, I think this is the best idea. I suppose the IsNoClipping script would be an okay solution, but like LP said, I use noclip frequently when I make a mistake and don't want to reload the map again.
Frankly, I think this is the best idea. I suppose the IsNoClipping script would be an okay solution, but like LP said, I use noclip frequently when I make a mistake and don't want to reload the map again.
Quote from Lpfreaky90 on June 29, 2013, 7:58 pmDr.Toaster Waffles wrote:CamBen 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.Frankly, I think this is the best idea. I suppose the IsNoClipping script would be an okay solution, but like LP said, I use noclip frequently when I make a mistake and don't want to reload the map again.
or just make a playerclip func_brush that gets disabled, fire an env_text in their face if they missed a vital step to get in there; be a bit creative
Frankly, I think this is the best idea. I suppose the IsNoClipping script would be an okay solution, but like LP said, I use noclip frequently when I make a mistake and don't want to reload the map again.
or just make a playerclip func_brush that gets disabled, fire an env_text in their face if they missed a vital step to get in there; be a bit creative
Quote from FelixGriffin on June 30, 2013, 10:03 amNoclip will take you through playerclips like other brushes, but (bug or feature?) trigger_catapults will still fling you as normal.
Noclip will take you through playerclips like other brushes, but (bug or feature?) trigger_catapults will still fling you as normal.
