avibird 1 137 Posted August 12, 2020 I will definitely check out your modules for sure. Question does your module leave a dependency if used in a mission and if you don't want to use it you need to delete items from your mission init? Share this post Link to post Share on other sites
pierremgi 4493 Posted August 13, 2020 These is no dependency with other mods (CBA or else). 1. If the mod is loaded but no module used, there is nothing in mission.sqm. 2. If you use a module, so, as any modded object, this module is present in mission.sqm. You need to let it or edit again the mission and delete it. With no more module, you are in the situation 1. 3. For player(s) you need to load the mod. (Same as modded objects/entities) 4. Mod is signed. Spoiler The specific module "touch of class" allows you to know the class/model of any objects (houses/vegetation...) on map. You can use it and delete it. It's a kind of tool for writers. On the other hand, this module allows also to change a map object (say shabby house) into another one (say tower control), visible in 3den and persistent for the mission. In this case you need to let the module of course. (see video on steam) 1 Share this post Link to post Share on other sites
gsg94490 10 Posted September 29, 2020 How can i turn off the notifications? I'm using this with a CAS script for aircraft and don't need to know when they spawn Share this post Link to post Share on other sites
pierremgi 4493 Posted September 29, 2020 delete: if (!isNull _newVeh) then { ['RespawnVehicle',[_displayName,_respawnName,_picture]] remoteExec ['BIS_fnc_showNotification',_side]; }; Share this post Link to post Share on other sites
gsg94490 10 Posted September 29, 2020 im running your modules, can i still do it? Share this post Link to post Share on other sites
_Bradley 10 Posted October 27, 2020 Hey Pierre, sorry to bother you. I am currently trying to get your Script to work with different vehicles with different respawn delays for each vehicle. How would I go about utilizing different delays? Currently I am trying it this way: Spoiler <whole script of yours above> respawnhandle1 = [[west_apc,west_tank],"start",300,true,false] spawn MGI_fnc_VehicleRespawn; respawnhandle2 = [[west_quad1,west_quad2,west_quad3,west_quad4],"start",60,true,false] spawn MGI_fnc_VehicleRespawn; respawnhandle3 = [[west_qilin_armed,west_qilin],"start",120,true,false] spawn MGI_fnc_VehicleRespawn; respawnhandle4 = [west_transport,"start",1,true,false] spawn MGI_fnc_VehicleRespawn; But well, it doesn't work out and only uses the last line. Thanks for your script. It really does some awesome stuff and completely replaces the BI Module. I hope you have an enjoyable day. Regards, Bradley Share this post Link to post Share on other sites
pierremgi 4493 Posted October 27, 2020 Yes, this parameter is a global variable. It's normal to overwrite it with the last script. I can't easily implement something different because that means to identify what vehicles should respawn within a delay, and what others within another delay. What you can do, for yourself, is to create 3 or 4 versions of this script, for example MGI_fnc_VehicleRespawn1 , MGI_fnc_VehicleRespawn2 ... in which you customize the variable names like: MGIrespVehDelay1, MGIrespVehDelay2, ... (everywhere needed). The method worth also for MGIrespOnDisabled variable. Not tested. Share this post Link to post Share on other sites
_Bradley 10 Posted October 27, 2020 9 hours ago, pierremgi said: Yes, this parameter is a global variable. It's normal to overwrite it with the last script. I can't easily implement something different because that means to identify what vehicles should respawn within a delay, and what others within another delay. What you can do, for yourself, is to create 3 or 4 versions of this script, for example MGI_fnc_VehicleRespawn1 , MGI_fnc_VehicleRespawn2 ... in which you customize the variable names like: MGIrespVehDelay1, MGIrespVehDelay2, ... (everywhere needed). The method worth also for MGIrespOnDisabled variable. Not tested. I will try that, thanks for your answer! Share this post Link to post Share on other sites
abudabi 16 Posted December 23, 2020 I want bots to spawn in random place in whole marker called "respawn" Im calling script with "start", both for independent and west, any way to randomize it? Quote _createBots = [[INDEPENDENT,WEST],["start","start"],5,false,false] spawn MGI_fnc_VehicleRespawn; Share this post Link to post Share on other sites
pierremgi 4493 Posted December 23, 2020 The easiest way is to respawn on marker (you can choose different ones for sides). Make it invisible on map. Then run a loop randomizing the position of the marker. Something like, in server: 0 = [] spawn { private _initpos = getMarkerPos "myHolyMarker"; while {true} do { "myHolyMarker" setMarkerPosLocal (_initpos vectorAdd [-100 + random 200, -100 + random 200,0]); sleep 2 } }; Note: I will probably add a random position inside marker with an area... for the MGI module. Share this post Link to post Share on other sites
gsg94490 10 Posted January 8, 2021 hey, im trying to get your script version working with my mission. I am unable to get your init field fix working. I have this in my vehicls init: this setVariable ["MGIcustomCode", 'this addEventHandler ["GetOut" , {(_this select 2) setDamage 1;(_this select 0) setDamage 1;} ];' ]; call compile (this getVariable "mgiCustomcode"); and it works the first time around (ie the event handler works) but then on the second spawn it doesnt. have i done something wrong here? Share this post Link to post Share on other sites
pierremgi 4493 Posted January 8, 2021 No that's not implemented for init field of vehicle. (Because scripters add too much things in init fields and that can be tricky (or even crazy) in MP to re-run some codes on each PCs). You can easily add EH on spawned vehicles during mission (in init.sqf): [] spawn { while {TRUE} do { { _x addEventHandler ["getOut", {...}]; _x setVariable ["yourPass",TRUE]; } forEach (vehicles select {isNil {_x getVariable "yourPass"}}); sleep 3; }; }; Share this post Link to post Share on other sites
max-117- 0 Posted January 10, 2021 Hey Pierre, -I am making a MP game with only BLUFOR and OPFOR factions. My intention is to only respawn ALL BLUFOR vehicles at their START POSITION if destroyed. -I have RHSUSAF and H60J Coast Guard Helicopter MODs loaded -I also have respawn scripts for saving the loadouts of infantry players in the mission file (onPlayerKilled.sqf and onPlayerRespawn.sqf) -the command line I'm using is: 0 = [[WEST],"start",10,false,true] spawn MGI_fnc_VehicleRespawn; and the rest of the script is copy and paste -I got the script to respawn vehicles properly but they seem to always respawn at the death position and occasionally spawn at the start position for choppers -I dont have any markers and have tried an array of "start" but all of them still respawn the vehicle at death position. -So I looked through your script and I believe the following line of code sets the respawn position as death position if no other markers or start positions are found: _positions = _positions apply {if (getMarkerpos _x isEqualTo [0,0,0] && _x != "start") then {"death"} else {_x}}; private ["_idx","_positionType"]; -Then, I tried forcing the vehicles to spawn at start by changing {"death"} to {"start"}, but that just ended up not respawning the vehicles completely. I wonder if that means the game couldn't find a start position. Plz help ;-; 117 Share this post Link to post Share on other sites
rowdied 43 Posted April 11, 2021 Hey Pierre, The script version works great except for one problem when using ace. When a tank blows up and loses its turret, the vehicle respawns in without its turret. Any fix for this? thanks!! Share this post Link to post Share on other sites
pierremgi 4493 Posted April 11, 2021 58 minutes ago, rowdied said: Hey Pierre, The script version works great except for one problem when using ace. When a tank blows up and loses its turret, the vehicle respawns in without its turret. Any fix for this? thanks!! No, unfortunately. I don't care with ACE compatibility. ACE is just too much, interfering with everything. So, if you want to spawn a normal tank, don't ask ACE to split into parts. 🙄 That said, if this is reproducible with a simple great mod, like CUP, RHS, IFA3, UNSUNG,... and no other mod, I'll have a look at it. Share this post Link to post Share on other sites
J.Larsson 1 Posted October 25, 2022 Jesus chirst this is confusing!? EDIT: i just think i got it to work! Share this post Link to post Share on other sites
J.Larsson 1 Posted October 25, 2022 3 hours ago, J.Larsson said: is there any way to increase the timer on death when a vehicle is downed? Right now they almost instant delete wreck and respawn what line is it in the script? Share this post Link to post Share on other sites
pierremgi 4493 Posted October 25, 2022 19 minutes ago, J.Larsson said: is there any way to increase the timer on death when a vehicle is downed? Right now they almost instant delete wreck and respawn what line is it in the script? It's a 10 sec delay by default. See front page for the script parameters.... or use the module instead. Share this post Link to post Share on other sites