alexboy 11 Posted December 27, 2012 So im trying to move the car by calling the script in from a Trigger script code _unit = _this select 0; num = 1; While (num <= 10) do { num = num + 1; _unit setPos [ (getPos _unit select 0) + num, getPos _unit select 1, getPos _unit select 2]; Sleep 3; hint Format["Dist > %1",num]; }; when i activate the trigger it only moves it one space and stop ? i want it to look like its moving till num hits 10, like when the trigger is activated the car moves 1, 2 ,3 ,4 ,5 .... till it hits 10 spaces away from where it is, not just jump to the 10th space. if that makes sense Share this post Link to post Share on other sites
jw custom 56 Posted December 27, 2012 While (num <= 10) do { should be While {num <= 10} do { Share this post Link to post Share on other sites
alexboy 11 Posted December 27, 2012 (edited) it still doesnt work? it only moves back 2 spaces then stops ? Thanks for quick reply Code: _unit = _this select 0; If (!local _unit) exitWith{}; num = 1; While {num <= 10} do { _unit setPos [ (getPos _unit select 0) - num, getPos _unit select 1, getPos _unit select 2]; Sleep 2; hint Format["Dist > %1",num]; num = num + 1; }; Edited December 27, 2012 by alexboy Share this post Link to post Share on other sites
jw custom 56 Posted December 27, 2012 It works fine for me. http://www.filedropper.com/moveitutes Share this post Link to post Share on other sites
alexboy 11 Posted December 27, 2012 wtf... my codes just a rebel i guess, i tried your mission out and it worked like a charm, ill see if i can take the .sqf and see what was different. thanks for your quick responses ---------- Post added at 16:18 ---------- Previous post was at 16:10 ---------- ok i found my problem, it wasnt the scripting it was the way i called it in the trigger [hmv_1_1] exec "move-vehicle.sqf"; rather then nul = [hmv_1_1] execVM 'move-vehicle.sqf'; but thanks for everything Jw Custom, and thanks for quick responses Share this post Link to post Share on other sites
jw custom 56 Posted December 27, 2012 btw use -showScriptErrors in your game shortcut target line to catch script errors :) Share this post Link to post Share on other sites