PDA

View Full Version : Height Restrictions



williampett
Jun 16 2012, 19:45
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?

RogueTrooper
Jul 29 2012, 07:48
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) > XXX
* activation: 0 cuttext ["THE MAXIMUM ALTITUDE IS 300 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.