tsd16 10 Posted July 10, 2010 (edited) in the below script, it doesnt seem to break out of the while loop here any ideas to why? (the helo will go all the way to the ground, but wont pop back up, it sits there, so the loop isnt exitting when the _height is less than 10. EDIT: I think i know what the issue is, it only has the initial height, I need to some how dynamically keep getting that variable. EDIT: never mind, was way overzealous in posting for help this thread can be locked removed deleted. getting _height = (position _vehicle) select 2; at the end of each loop fixes it. _group = _this select 0; _vehicle = _this select 1; _height = (position _vehicle) select 2; while { _height > 10 } do { _vehicle setVelocity [0,0,-5]; } Edited July 10, 2010 by tsd16 Share this post Link to post Share on other sites
shuko 59 Posted July 10, 2010 You are no setting the height inside the loop, so it's value doesn't change. _group = _this select 0; _vehicle = _this select 1; while { ((position _vehicle) select 2) > 10 } do { _vehicle setVelocity [0,0,-5]; } Share this post Link to post Share on other sites