=Odin= 0 Posted February 3, 2008 G'day I have a mission where I have to capture enemy Vehicles in order to add them to my own Base via a spawn trigger, this works great, but I cannot seem to get them to Respawn upon their demise, I am useing this script Vehicle Respawn by {nBs}-Myke-{CO}; Quote[/b] ]?! (local server): exit_vehicle = _this select 0 _delay = _this select 1 _pos = _this select 2 _dir = _this select 3 ; defining possible vehicle positions _driver = _vehicle emptypositions "driver" _gunner = _vehicle emptypositions "gunner" _commander = _vehicle emptypositions "Commander" _crew = _vehicle emptypositions "Cargo" ? (_pos == 0): _startpos = getpos _vehicle ? (_dir == 361): _startdir = getdir _vehicle #waiting ; waiting for Vehicle is disabled @ !(canmove _vehicle) &! (canfire _vehicle) ; checking if vehicle still is manned @ (isnull driver _vehicle) && (isnull gunner _vehicle) && (isnull commander _vehicle) ~_delay ? (canmove _vehicle) && (canfire _vehicle): goto "waiting" _new = typeof _vehicle deletevehicle _vehicle _newveh = _new createvehicle _startpos _newveh setpos _startpos _newveh setdir _startdir [_newveh, _delay, _pos, _dir] exec "vehi_respawn.sqs" exit and have this as a simple spawn script activated by a trigger Quote[/b] ]_veh = "HMMWV50" createVehicleLocal getMarkerPos "hm50" seeing as I cant add this line to the Hummer via editor Quote[/b] ][this, 60, 0, 180] exec "vehi_respawn.sqs" I tried to put it in the spawn script like this Quote[/b] ]_veh = "HMMWV50" createVehicleLocal getMarkerPos "hm50"nil = [this, 60, 0, 180] exec "vehi_respawn.sqs" Hummer spawns, but once dead, it wont respawn, any ideas on how I can fix this? Also when I do it this way it throws this Error Quote[/b] ]'_dir = _this |#|select 3'Error Zero divisor But the veh_respawn script works fine doing it the normal way by adding the line to actual veh via editor Thanx Share this post Link to post Share on other sites
lebson506th 0 Posted February 3, 2008 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_veh = "HMMWV50" createVehicleLocal getMarkerPos "hm50" nil = [_veh, 60, 0, 180] exec "vehi_respawn.sqs" Share this post Link to post Share on other sites
=Odin= 0 Posted February 4, 2008 Thx Lebson this fixed the error, but the Hummer wont respawn after it is destroyed, any suggestions on this problem? I have a marker called hm50 and a logic called server. Or is there somthing else i need to add to this script you think to get it working? Thx Edit; Solved I had the script exec the vehi_respawn.sqs from the wrong folder, DOH! Share this post Link to post Share on other sites