Search the Community
Showing results for tags 'modulecivilianpresence'.
Found 1 result
-
create Module Civilian Presence with script
CheyenneAH56 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello everyone, I need a little help I try to create, through a script, a combination of modules to add a civilian presence to the cities crossed by the player. The problem is that at the launch of the mission, despite the generation of three modules (visible and existing in Zeus mode) the main module (ModuleCivilianPresence_F) does not link with the other two modules (ModuleCivilianPresenceSafeSpot_F and ModuleCivilianPresenceUnit_F), and I have the following error message : "bis_fnc_moduleCivilianPresence [x] Civilian Presence L-Alpha 1-2: 1 terminated." There are at least 1 spawnpoint and 1 position module. " How to make dialogue, synchronize the three modules, created via a script, ingame ? This is just a piece of extracted code; the rest of my project works perfectly : Do not pay attention to the two ways to create a unit, both ways work exactly the same, I put the necessary characters to hide the text for reading the script > /* and */ _townLoc = nearestLocations [getPos player, ["NameVillage","NameCity","NameCityCapital","NameLocal","CityCenter","Airport"], 2500]; if ((count _townLoc) > 0) then { sleep 0.01; _townPos = locationPosition (_townLoc select 0); /* sleep 0.50; _MCP_Spawn = (createGroup sideLogic) createUnit ["ModuleCivilianPresenceUnit_F",_townPos,[],0,"NONE"]; _MCP_Spawn setvariable ['BIS_fnc_initModules_disableAutoActivation', false]; sleep 0.50; _MCP_SafeSpot = (createGroup sideLogic) createUnit ["ModuleCivilianPresenceSafeSpot_F",_townPos,[],0,"NONE"]; _MCP_SafeSpot setvariable ['BIS_fnc_initModules_disableAutoActivation', false]; sleep 0.50; _MCP_Module = (createGroup sideLogic) createUnit ["ModuleCivilianPresence_F",_townPos,[],0,"NONE"]; _MCP_Module setvariable ['BIS_fnc_initModules_disableAutoActivation', false]; */ sleep 0.50; _MCP_SafeSpot = "ModuleCivilianPresenceSafeSpot_F" createUnit [_townPos, createGroup sideLogic, "this setVariable ['BIS_fnc_initModules_disableAutoActivation', false];", 0.6, "PRIVATE"]; sleep 0.50; _MCP_Spawn = "ModuleCivilianPresenceUnit_F" createUnit [_townPos, createGroup sideLogic, "this setVariable ['BIS_fnc_initModules_disableAutoActivation', false];", 0.6, "PRIVATE"]; sleep 0.50; _MCP_Module = "ModuleCivilianPresence_F" createUnit [_townPos, createGroup sideLogic, "this setVariable ['BIS_fnc_initModules_disableAutoActivation', false];", 0.6, "PRIVATE"]; }; Otherwise I also tried another method : I to place the necessary modules in the 3den editor, then move them by script when the player is near a locality. The modules change position, but the created civil entities always go to the moduleCivilianPresenceSafeSpot module's initial position, ie the position of the module when it was placed in the editor, even if it was changed position. :/