Jump to content

Sign in to follow this  
Theassassinzz

(help) Getting a script to only activate once a Vehicle is on the ground

Recommended Posts

So I have a locked area script that uses UID's to determine who can use said area but I am having the problem where it activates when someone fly's over it.

 

Is there a way for me to get it to only activate when someone lands in the area?

playerList = [
	"00000000000000000"/* Assassin */,
	"00000000000000000"/* Kadaire */,
	"00000000000000000"/* Halvix */,
	"00000000000000000"/* Elikat */,
	"00000000000000000"/* BigSky */,
	"00000000000000000"/* Snakebite */,
	"00000000000000000"/* Grunt */,
	"00000000000000000"/* RageOnJack3D */,
	"00000000000000000"/* God Dammit */
];

_uid = getPlayerUID player;

if (_uid in playerList) then {
    titleText ["Welcome To The Best Place In The Server!", "PLAIN"];   
}; 

if (!(_uid in playerList)) then {
	
	titleText ["This is a Members only area!", "BLACK OUT", 1];
	player setPos (getMarkerPos "locked_area_portal");
	sleep 2;
	titleText ["You will now be teleported!", "BLACK FADED", 2]; 
	sleep 2; 
	titleText ["Enjoy!!", "BLACK IN", 2];
};

 

Share this post


Link to post
Share on other sites

Detecting if unit in flyable vehicle:

private _unitInFlyableVehicle = vehicle _unit isKindOf "Air";

 

Share this post


Link to post
Share on other sites

So just to clarify you only want players in your whitelist to be able to enter the area and only when on foot?

 

Checking if a unit is grounded can be done via istouchinground command.

Alternatively can could just set the trigger height so that its very low and aircraft arent likely to go that low.

Share this post


Link to post
Share on other sites
  On 2/14/2017 at 10:25 PM, Imperator[TFD] said:

So just to clarify you only want players in your whitelist to be able to enter the area and only when on foot?

 

Checking if a unit is grounded can be done via istouchinground command.

Alternatively can could just set the trigger height so that its very low and aircraft arent likely to go that low.

So I'm try to make it so that if someone fly's over the area the script won't activate. But as soon as they get below x height it does

 

Share this post


Link to post
Share on other sites
  On 2/14/2017 at 11:30 PM, Theassassinzz said:

So I'm try to make it so that if someone fly's over the area the script won't activate. But as soon as they get below x height it does

 

 

If the area is just a trigger then you just need to set the height of the trigger to a height that aircraft are not going to fly in.

Try setting the height of the trigger to 2m high.

Share this post


Link to post
Share on other sites
  On 2/14/2017 at 11:30 PM, Theassassinzz said:

So I'm try to make it so that if someone fly's over the area the script won't activate. But as soon as they get below x height it does


you can set the height of the trigger area in editor

  • Like 2

Share this post


Link to post
Share on other sites
  On 2/14/2017 at 11:58 PM, killzone_kid said:


you can set the height of the trigger area in editor

I know that haha. Just was wondering if it could be more efficient to script it in. 

Now I have the problem of it running globally instead of local. Teleports everyone not on the list when ever someone enters it.

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  

×