Please or Register to create posts and topics.

How to protect map (or secret room) against cheaters?

PreviousPage 2 of 4Next

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;

Falsi sumus crusto!

@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 :D If it's builtt up by means of func_brushes and stuff, it can be easily hidden.

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]
ChickenMobile wrote:
Very useful information

Thanks thanks thanks for your help! :D

josepezdj 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!

?????????????????????????????TWP Releases | My Workshop

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.

My YouTube Channel: https://www.youtube.com/user/Camben24
Aperture Science: We do our science asbestos we can!
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.

Dr.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 ;)

Noclip will take you through playerclips like other brushes, but (bug or feature?) trigger_catapults will still fling you as normal.

Falsi sumus crusto!

That's why it's called noclip.

yishbarr wrote:
That's why it's called noclip.

Didnt thought about it. :lol:

PreviousPage 2 of 4Next