Jump to content
Sign in to follow this  
Kydoimos

Stop Unit after UnitPlay

Recommended Posts

Hi all - I need some help! Basically, I want to land a helicopter on top of a building, and then have it stay there until a unit enters it. Now, I have recorded a unit's movement and have successfully landed the helicopter on a building. The trouble is, as soon as the recorded movement script is over, the helicopter flies away. I've tried everything I can think of: setFuel, DoStop, disableAI "ANIM"/"MOVE", engineOn false, etc., etc. but I can't get it to stay still! Even when I set the fuel to 0 it manages to take off a few feet and crashes. EnableSimulation is no good because I don't want to stop the rotor blades instantly. Any ideas?

Share this post


Link to post
Share on other sites

I use something like this:

_heli spawn {
	_pos = position _this;
	_dir = direction _this;
	while {!player in _this} do {
		_this setPos _pos;
		_this setDir _dir;
		_this setVelocity [0,0,-1];
		_this forcespeed 0;
		sleep 0.01;
	};
};

Share this post


Link to post
Share on other sites

Hi Kerc, thanks for the response - no joy, though. Helicopter still takes off.

Share this post


Link to post
Share on other sites

With zero fuel it should not even be able to start the engine again, weird. I use this always for vehicles to stay put and it always works.

Share this post


Link to post
Share on other sites

Got it - this flyInHeight 0 worked. Yeah, setFuel 0 sort of worked, but the Helicopter still had enough power to fly away a bit...

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  

×