Jump to content
Sign in to follow this  
reaptor

How to make so that only pilots can fly?

Recommended Posts

Is there anyway to enforce the use pilots to driving the choppers?

Like in the WGL Bastige mission, when the choppers crashed when non-pilots than pilots tried to drive them, but non-pilots still could be in cargo.

I´ve searched the forum, but couldn´t find an answer.

Share this post


Link to post
Share on other sites

Use a GetIn Event Handler to check the type of unit that has got in as the pilot and take the appropriate action eg setFuel 0 or some such?

Share this post


Link to post
Share on other sites

Yep,

for example I use something like this in BECH:

init field of helicopter

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this addEventHandler["engine",{_this exec{custom\forcePilot.sqs};}];

forcepilot.sqs

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

_d=driver _c

?!local _d||!(_this select 1):exit

?(typeof driver _c)in["SoldierEPilot","SoldierWPilot","WGL_SoldierEPilot","WGL_SoldierWPilot","SoldierEPilotHG","SoldierWPilotHG"]:exit

_d groupchat"I am not a pilot, don't want to damage the aircraft."

_d action["engine off",_c]

unassignVehicle _d

_d action["eject",_c]

Feel free to use it all if you want...

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  

×