Jump to content
Sign in to follow this  
pebcak

Play Area Boundary Exceptions

Recommended Posts

I have a play area boundary around a MP map I'm working on that first gives a warning not to leave the play area, then kills the player off if they continue.  I have the following in the trigger that does the killing:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_X setDamage 1} forEach thislist;

What I hope to learn from someone here is how to make certain vehicles and/or units exceptions to the above kill script, i.e., being allowed to pass through the killzone unharmed.  Can this be done?

I'm new to scripting, so please be gentle. help.gif

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{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:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{if(_X in [soldier1,soldier2])then{_X setdammage 1}} foreach thislist

Or if it's a certain group:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{if(_X in (units group1))then{_X setdammage 1}} foreach thislist

Or only 1 specific vehicle:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{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

KyleSarnik,

That's superb stuff. Cheers. When I get five munites I'll give that a try. Many thanks!

biggrin_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  

×