ANGRY_FARMER 10 Posted August 14, 2016 hi all !for my domination mission i need some vehicles respawn, and i noticed something is very wrong there.i mean...i set up everything "correctly"...i mean..at server start, it works on dedicated server , but after some time, (...hours, sometimes a day) everything about respawns got screwed up !things like vehicles respawning higher in the air than theyr starting positions (helos with engine on and flying, VTOLS too), some vehicles does not respawn at all, and some dont exec the expression code i gave them (like one that attach a taru pod to a taru).with 20 seconds respawn seems to work (the vehicle respawn, with al lthe other bugs, but at least respawn), with 1200 secs respawn seems to NOT work at all (do not respawn at all). with numbers in between seems to works "sometimes" .sometimes things get "teleported" to extreme SW corner of the map, and never returns. mah!i really cant get whats wrong, considering everything works perfectly fine right after a server start.any help will be appreciated! thanks ! Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted August 14, 2016 post/link to script Share this post Link to post Share on other sites
ANGRY_FARMER 10 Posted August 14, 2016 no script guys ! its the default vehicle_respawn module !! Share this post Link to post Share on other sites
davidoss 552 Posted August 14, 2016 Expression? Anyway if you use many vehicle respawn modules its can leads to something like that. Use one module for more vehicles. Best usage (IMHO) is have one for land vehicles and one for air vehicles (for each sides). But we are guessing here, you give us nothing to consider at. Share this post Link to post Share on other sites
ANGRY_FARMER 10 Posted August 14, 2016 sorry for the lack of info, i'm not sure of what is useful and what not!i link you the mission, its whithout scripts because scripts are just for domination, so useless for this purpose.http://www.filedropper.com/mission_22anyway its more or less what i did....i made a "fast" respawn for common vehicles and a "slow" respawn for more powerful vehicles (like war helos, warplanes, tanks ecc..)i had to use a respawn for every vehicle with arsenal, becasue i didnt found a way to re-add arsenal to a respawning vehicle except by using respawn module expression field.thanks for your help ! Share this post Link to post Share on other sites
ANGRY_FARMER 10 Posted August 15, 2016 another little question...how do the "forced respawn" work ?i need to force respawn under certain conditions...but seems to not work just by syncing the respawn module to a trigger (and activating the trigger).thanks ! Share this post Link to post Share on other sites
nebulazerz 18 Posted August 15, 2016 this is a script i wrote for myself when i found i didnt like the way the vehicles work in the editor. Just change the location that it spawns and the vehicle to whatever you want. You could even randomize the spawn points if you want by adding a local variable and the random command with different markers. The vehicle will respawn in 10 seconds after it dies, change the sleep amount to change how long. if (isServer) then { disableSerialization; private["_position","_direction","_nearestTargets","_scanArea"]; //Create Marker createMarker ["LSVB2",[3132.202,13601.272]]; "LSVB2" setMarkerType "Empty"; "LSVB2" setMarkerSize [2, 2]; //Check if the marker has any cars near it _position = getMarkerPos "LSVB2"; _scanArea = 5; _direction = 45; _nearestTargets = nearestObjects[_position,["landVehicle","Air","Ship"],12] select 0; //if the marker has no cars near it then spawn the new car with nothing in inventory if (!isNil "_nearestTargets") then { sleep 20; }else{ while{true} do{ _veh = createVehicle ["B_T_LSV_01_unarmed_F", _position, [], 0, "NONE"]; _veh setVariable ["BIS_enableRandomization", false]; _veh setDir _direction; clearWeaponCargoGlobal _veh; clearMagazineCargoGlobal _veh; clearItemCargoGlobal _veh; _veh setVehicleVarName "BluLSV2"; BluLSV2 = _veh; //[BluLSV2] call neb_fnc_addBounty; waitUntil {!alive BluLSV2}; sleep 10; }; }; }; Share this post Link to post Share on other sites
ANGRY_FARMER 10 Posted August 15, 2016 awesome!thanks man !anyway i was searching for a simpler solution, especially performance-wise, and i menaged to activate the respawn module with a trigger....(by syncing the trigger to the respawn module) ,the problem is that even if the trigger is repetable, the module dont get activated again ! (and i need it to be activated multiple times).any idea why / how make it activable multiple times ?thanks ! Share this post Link to post Share on other sites
schmoking 17 Posted August 16, 2016 not exactly sure if this is what youre looking for. but davidoss helped me with vehicle respawn, but the respawn module stopped working pretty fast. so i used his scripts with Iceman77 respawn script instead, now it seems to work great... it lets me set addaction to respawned vehicle. dont know if it will work for what u need tho... anyways if its anything u can use here is my mission. http://www.mediafire.com/download/aix63edciw62caw/GUNSHIP_Airport.Stratis.rar Share this post Link to post Share on other sites
donelsarjo 60 Posted August 16, 2016 another little question...how do the "forced respawn" work ? i need to force respawn under certain conditions...but seems to not work just by syncing the respawn module to a trigger (and activating the trigger). thanks ! "force respawn" means that the vehicle gets deleted right after the the mission starts and respawns immediately. There is one reason to use it: There is a possibility to add a code run on respawn. This code will only run if the object in fact respawns (yes, that sounds obvious), but at mission start the code is not run if "force respawn" is not selected, because it was only created and did not trigger the module. Share this post Link to post Share on other sites
ANGRY_FARMER 10 Posted August 17, 2016 yees!thanks schmoking!its probbly exactly what i need! can you please help me explaining what i need to do exactly ? huge thanks !PS: i just need to respawn arsenal on some of them ! thanks! Share this post Link to post Share on other sites
donelsarjo 60 Posted August 17, 2016 If you hover over the code box with your mouse the is a tool tip explaining the variables passed to the code. _this select 0 is the old vehicle and _this select 1 is the newly spawned.(or the other way around) So try this code: _this select 0 addaction ["Open Virtual Arsenal", { ["Open",true] call BIS_fnc_arsenal; }]; The thing is I don't know if the code is executed on each client. Just try it. Share this post Link to post Share on other sites
schmoking 17 Posted August 17, 2016 sry im not much of an expert here. just try ur code in vehInitFunctions.sqf and se what happens :) davidoss is the one that wrote the code to help me make the plane respawn with addaction. i could not figure it out myself. Share this post Link to post Share on other sites
ANGRY_FARMER 10 Posted August 17, 2016 yeeah i menaged to make it work !thanks guys!now a new problem appeared...some vehicles have a infantry respawn synced to them (to act as mobile respawn).seems that sometimes after being destroyed, the respawn no longer works !!it happens on some vehicles, and dont happens on others ! maaah !EDIT: after some tests...i noticed that respawn get disabled on "medium" helicopters and submarine.respawn keep working on heavy helicopters , vtol, speedboat and armored carsi'm really disappointed!EDIT2: lol...i found what was causing the problem.....the vehicles on what was non working were not named!after giving a name to the vehicles, all was working for all!YEAH ! thanks for your help guys ! Share this post Link to post Share on other sites