Jump to content
Sign in to follow this  
williampett

Height Restrictions

Recommended Posts

Hi, I am trying to make a mission on Take on Helicopters using the mission editor, and for part of it, I would like to set a height restriction for the player flying a helicopter, stopping them from flying too high. How do I set height restrictions for the player as they travel through various way points in a helicopter?

Share this post


Link to post
Share on other sites

1. You could destroy the player or his aircraft. Place a trigger with

* zero a axis and zero b axis
* repeated
* condition: ((position (vehicle player)) select 2) > XXX
* activation: (vehicle player) setdamage 1;

2. You can push down the aircraft when it exceeds a certain height. Place a trigger with

* zero a axis and zero b axis
* repeated
* condition: ((position (vehicle player)) select 2) > XXX
* activation: (vehicle player) setpos [(position (vehicle player)) select 0, (position (vehicle player)) select 1, (position (vehicle player)) select 2)-20];

Replace XXX by your custom height.

You may also want to include a warning hint that shows up before the altitude limit is reached:

* zero a axis and zero b axis
* repeated
* condition: ((position (vehicle player)) select 2) > [color="#FF0000"]XXX[/color]
* activation: 0 cuttext ["THE MAXIMUM ALTITUDE IS [color="#FF0000"]300[/color] METRES","plain down",0];

XXX might be "limit - 100" or "limit - 50" or whatever you think to be useful.

Remind, when you fly over a mountain, your current altitude raises instantly to a much higher value from one second to the other when you have passed the mountain.

Edited by RogueTrooper

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  

×