Jump to content
Sign in to follow this  
Lowe

Play area limitations: help please! :)

Recommended Posts

Right then, I've found this post:

http://forums.bistudio.com/showthread.php?t=54869&highlight=play+area

My question is though, what do I do with this code and where do I put it or activate it? Is it a new file and then on activation I have to run that file through the trigger or what?

Oh - and the on the end, isn't that Vbulletin code?

Cheers! :)

Share this post


Link to post
Share on other sites

I just put a warning trigger (like, BLUFOR PRESENT) with a hint saying "Proceed and die", then a bit further past that one that kills them. :) as detailed in the post you linked. Since that post is all screwed up with HTML, here it is reposted:

{if (condition) then {_X setdammage 1}} foreach thislist;

Condition would be any condition of your chosing. You can use the variable _X in the condition as the unit in question. Here's an example that lets 2 units (named soldier1 and soldier2) pass through unharmed:

{if (_X in [soldier1, soldier2]) then {_X setdammage 1}} foreach thislist;

Or if it's a certain group:

{if (_X in (units group1)) then {_X setdammage 1}} foreach thislist;

Or only 1 specific vehicle:

{if (_X == car1) then {_X setdammage 1}} foreach thislist;

Your condition can really be anything, if you don't know the commands well enough why don't you explain exactly what exceptions you mean so I can give you the proper code.

Share this post


Link to post
Share on other sites
{if(condition)then{_X setdammage 1}} foreach thislist

Condition would be any condition of your chosing. You can use the variable _X in the condition as the unit in question. Here's an example that lets 2 units (named soldier1 and soldier2) pass through unharmed:

{if(_X in [soldier1,soldier2])then{_X setdammage 1}} foreach thislist

Or if it's a certain group:

{if(_X in (units group1))then{_X setdammage 1}} foreach thislist

Or only 1 specific vehicle:

{if(_X == car1)then{_X setdammage 1}} foreach thislist

I fixed broken old forums code tags.

These all go in the on activation field of a trigger.

However this example was for ArmA and while it will work perfectly fine in ArmA 2, I think ArmA 2 already includes an easy to use zone restriction module (which ironically I don't know how to use :p).

Edit: Meh, was beated...

Share this post


Link to post
Share on other sites

Unable to get this working using any of the below codes. The hint displays, so the trigger works fine.

{if (condition) then {_X setPos (getPos location1)}} foreach thislist; hint "test"

{if (condition) then {_X setdammage 1}} foreach thislist; hint "test"

:confused:

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  

×