gopgop 1 Posted March 18, 2013 I'm a novice at scripting and I tried doing what the title says this is what I came up with: Whats wrong with it? if (alive Heli1) then { task1 = player createSimpleTask ["Get into the KA-60"]; task1 setTaskState "Assigned"; player setCurrentTask task1; _wp = (group group1) addWaypoint [position player, 1]; [_wp, 1] setWPPos (position Heli1); [_wp, 1] setWaypointType "GETIN"; (group group1) setCurrentWaypoint [_wp, 1]; hint "|||||| MISSION ||||||\n Get into the KA-60"; _time = 0; while(_time < 30) do { [_wp, 1] setWPPos (position Heli1); hint format["|||||| MISSION ||||||\n Get into the KA-60\n %1 : 30 seconds left",_time]; if (player in Heli1) then { hint "|||||| MISSION ||||||\n Completed Good job!"; }; _time = _time + 1; sleep 1; }; if (!(player in Heli1)) then { hint "|||||| MISSION ||||||\nFailed. Good luck next time!"; }; }; Thanks for the help! Share this post Link to post Share on other sites
conroy 13 Posted March 18, 2013 'while' conditions require curly brackets try: if (alive Heli1) then { hint "|||||| MISSION ||||||\n Get into the KA-60"; _time = 0; while{_time < 30} do { hintSilent format["|||||| MISSION ||||||\n Get into the KA-60\n %1 : 30 seconds left",_time]; if (player in Heli1) exitWith{ hint "|||||| MISSION ||||||\n Completed Good job!"; }; _time = _time + 1; sleep 1; }; if (!(player in Heli1)) then { hint "|||||| MISSION ||||||\nFailed. Good luck next time!"; }; }; The first hint wont be visible though like this without a short sleep before the while loop. Share this post Link to post Share on other sites