SpaydCBR 11 Posted March 6, 2016 Hello guys, I'm just wondering how to call this function for a newly spawned vehicle. Basically a vehicle will spawn mid game, and become a respawn position for infantry that they can select in the respawn menu The wiki just has this to say https://community.bistudio.com/wiki/BIS_fnc_moduleRespawnPosition Share this post Link to post Share on other sites
das attorney 857 Posted March 6, 2016 You can look in the function viewer to see what the function accepts, so with this one, the inputs are: _logic = _this param [0,objnull,[objnull]]; _activated = _this param [2,true,[true]]; So maybe try something like this after your line of code that spawns the vehicle mid game: _thing = [_vehicleName,true,true] call bis_fnc_moduleRespawnPosition; You might need to spawn it instead of call (I couldn't see any sleeps in there but you'll find out soon enough if you have to spawn in place of calling the function). edit: weird that there doesn't seem to be an index for element 1. I guessed and put true in there. Share this post Link to post Share on other sites
SpaydCBR 11 Posted March 6, 2016 Thanks but neither call nor spawn worked :( . Also, is there a way to set type, side, and who to show it to like in the editor? I'd only want this to be a respawn position for one side. Share this post Link to post Share on other sites
near_blind_sniper 10 Posted March 9, 2016 //create group for the module, I don't know if this is necessary/which side it should be, so I use the side that will be re-spawning _logicGroup = createGroup _side; respawnPoint= _logicGroup createUnit ["ModuleRespawnPosition_F",_pos, [], 0, "FORM"]; //name that appears on the map respawnPoint setVariable ["Name","Reinforcement Helicopter"]; //Set the side of that can respawn here //0 = opfor 1 = blufor 2 = Independent 3 = Civ respawnPoint setVariable ["Side", 1]; //synchronize the module to a vehicle to respawn troops inside the vehicle respawnPoint synchronizeObjectsAdd [_veh]; I was fooling around with this concept over the weekend. I didn't have any luck with the function either, but I have gotten it to work via spawning the module, and then editing its attributes. Share this post Link to post Share on other sites
SpaydCBR 11 Posted March 9, 2016 That worked! Thank you, but why does simply placing the module in the editor, giving it the variable name "respawnPoint", then calling _pos = getMarkerPos "mkr_alpha_west_car_1"; _veh = "B_MRAP_01_hmg_F" createVehicle _pos; respawnPoint synchronizeObjectsAdd [_veh]; in a script not have the same effect? Also, how do you know the variable names? Share this post Link to post Share on other sites