Jump to content
Sign in to follow this  
celery

Script to prevent prone-camping

Recommended Posts

After a long time of research I figured a way to prevent players from camping prone in maps where such a thing is frowned upon (deathmatches, extreme CQB). It works by detecting a button used for going prone and then gives a blinding white effect with an excuse for such a feature (hot sand, germ-o-phobia, etc.) and the effect subsides when you get up. It won't bother crippled people because you need to press a button to activate it.

I use the script like below, crucial parts in fat. It's a respawn script that is activated in init.sqs. The start delay is there to allow the finddisplay command to be recognized.

-----

<span style='font-size:7.1pt;line-height:100%'>~0.5

;Init stuff for anti-proning

standarray = (actionKeys "Crouch" + actionKeys "Stand" + actionKeys "MoveUp")

pronearray = (actionKeys "Prone" + actionKeys "MoveDown")

reloadarray = actionKeys "ReloadMagazine"

finddisplay(46) displayseteventhandler ["Keydown","if ((_this select 1) in pronearray) then {prone=1};if ((_this select 1) in standarray) then {prone=0};if ((_this select 1) in reloadarray) then {standtimer=-15}"]

;/Init stuff for anti-proning

#start

removeallweapons player

player setcaptive true

player addRating -1000000

player setdammage 0

prone=0

;Weapon load script

_magloop=0

#magloop

player addmagazine mag

_magloop=(_magloop+1)

?_magloop>=6 and (gun=="PK" or gun=="M249" or gun=="M240"):goto "magdone"

?_magloop>=12:goto "magdone"

goto "magloop"

#magdone

player addweapon gun

player selectweapon gun

;/Weapon load script

?cutscene!=1:titlecut ["", "black in", 1]

;Condition checker

#check

standarray = (actionKeys "Crouch" + actionKeys "Stand" + actionKeys "MoveUp")

pronearray = (actionKeys "Prone" + actionKeys "MoveDown")

reloadarray = actionKeys "ReloadMagazine"

pronetimer=0

standtimer=0

?!alive player:goto "dead"

?prone==1:goto "blind"

~0.01

goto "check"

#dead

prone=0

@alive player

goto "start"

#blind

?(pronetimer>=20):titlecut ["Aargh! The sand is burning my belly!!!", "white in", 1]

?!alive player : goto "dead"

?(prone==0 and standtimer>=45):goto "check"

prone=1

pronetimer=(pronetimer+1)

standtimer=(standtimer+1)

~0.05

goto "blind"

;/Condition checker</span>

-----

The first map this will be used in is DM Tequila MCY Edition and test games show that it's excellent in keeping the game interesting for everyone (without the script 50% of players press prone right after they spawn).

Of course this method is not flawless because the blinding effect stays on if you get up quickly, but luckily it's fixed by pressing "stance up" again and players will learn not to go prone. The delay is there to avoid cheating by pressing an up key before the prone animation is complete. There are also some loopholes but rarely someone would bother to seek them. That's why a command for getting the stance status of a unit would be sweet. However, all loopholes can be avoided by just killing the camper instead of softer punishments, but that's up to the map makers!

As a bonus, below is a method to prevent proning altogether even for wounded individuals (takes away the crippled status):

Add after ~0.01 in the #check block: ?!canstand player : goto "legs"

Add after any script block:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#legs

_dammo = (damage player)

?_dammo > 0.9 : goto "check"

player setdammage 0

player setdammage _dammo

goto "check"

Discuss! smile_o.gif

Share this post


Link to post
Share on other sites

Just a note, you really should use more local variables, and use local variables wherever you can. You don't want any similarly named global variables interfering with your script.

Share this post


Link to post
Share on other sites

why do u even bother to play armed assault if u dont allow them to lay down?

Share this post


Link to post
Share on other sites

I agree...  Why stop people from going prone?   Doesn't make sense.   Since when is going prone an exploit? Sure wouldn't want to be using an MG on any server with that script.

Share this post


Link to post
Share on other sites

Didn´t know that getting you to a prone position is assumed camping...

Anyway, let´s have natural selection. I guess there are not much people who will have fun playing a map with that script as it simply takes away a crucial method of fighting and concealment.

This is not meant to be a rant, but I really see little sense in removing game features for the sake of forcing people into something.

Arma is about freedom of choice. Limit the choice and you limit the game and the fun.

Share this post


Link to post
Share on other sites

Fair enough, just increase the time it takes to take effect. Someone lying prone for 10+ mins is pushing it.

Share this post


Link to post
Share on other sites

this script is just as evil as servers forcing you to only use first person view :P i just love looking at the soldier models and vehicle models from the outside and forcing me to use first person view makes me sad and this script is almost the same to push away some of the freedom of choice you have.

Share this post


Link to post
Share on other sites

Look, I clearly stated in parentheses that it's for the more intense (deathmatches, extreme CQB) maps and that (without the script 50% of players press prone right after they spawn) in Tequila. In some maps going prone and staying put can be really disruptive for the rest of the people and beats the idea of the map, like Tequila which is so far the first and only one using the script.

It's not like it will be in every map you ever play, and don't even dream that it's going to be in coop maps.

Share this post


Link to post
Share on other sites
Arma is about freedom of choice.

yeah exactly.

Freedom of choice to create every kind of map you like!!!

Share this post


Link to post
Share on other sites
Just a note, you really should use more local variables, and use local variables wherever you can. You don't want any similarly named global variables interfering with your script.

Thanks for the tip, but finddisplay requires that all associated variables are global. Also prone, pronetimer and pronearray aren't the first names someone would come up with for something else. wink_o.gif

Share this post


Link to post
Share on other sites

great idea, great job

of course I like to lie down and camp, but I understand why you did that script. Its a nice option for mapmakers smile_o.gif

Share this post


Link to post
Share on other sites

I've played CTF missions and I never noticed players going prone to be a problem. It was actually nice to have a fight in an alley with sandbags, you and your enemy could crawl behind the sandbags towards each other, until getting scared to death being face-to-face. Your script makes such cover objects useless as you can't hide anymore, like you could in real life.

Well it's an idea but I hope it doesn't spread too much. Maybe it fits into some mission types but I wouldn't like to see it in a CTF I am playing. In CTF you are not getting anywhere in the mission if you are prone all the time, so that kind of already does the work you are trying to do with the script.

Share this post


Link to post
Share on other sites
Guest
Just a note, you really should use more local variables, and use local variables wherever you can. You don't want any similarly named global variables interfering with your script.

Thanks for the tip, but finddisplay requires that all associated variables are global. Also prone, pronetimer and pronearray aren't the first names someone would come up with for something else.  wink_o.gif

Just go to OFPEC to claim your own tag.

That way you could make it

CLY_prone

CLY_pronetimer

CLY_pronearray

(CEL is already taken by someone)

Or whatever tag you want (and if its not taken already).

Tagging your glabals like that will make sure no other script will have same global and so cause errors.

Anf if that happens the others should adjust their script, not you! smile_o.gif

Just a tip, no critic. Do with it whatever you want. wink_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×