Jump to content
Guest

Export SQF not exporting modules

Recommended Posts

Guest

Tried exporting a mission from the editor with the "Export SQF" option. Everything worked fine apart from the modules that didn't even spawn in when I pasted the SQF into the debug console. 

///////////////////////////////////////////////////////////////////////////////////////////
// Logics
private _logics = [];
private _logicIDs = [];

private _item18813 = objNull;
if (_layer18784 && _layer16458) then {
	_item18813 = (group (missionNamespace getvariable ["BIS_functions_mainscope",objnull])) createUnit ["ModuleEffectsBubbles_F",[15231.8,14142.8,0.494209],[],0,"CAN_COLLIDE"];
	_this = _item18813;
	_logics pushback _this;
	_logicIDs pushback 18813;
	_this setPosWorld [15231.8,14142.8,-68.4047];
	_this setVectorDirAndUp [[0,1,0],[0,0,1]];
	_this setVariable ['Period',10,true];;
	_this setVariable ['Delay',1,true];;
	_this setVariable ['LifeTime',4,true];;
	_this setVariable ['Density',5,true];;
	_this setVariable ['SpeedX',0,true];;
	_this setVariable ['SpeedY',0,true];;
	_this setVariable ['SpeedZ',0.5,true];;
	_this setVariable ['Size',1,true];;
	_this setvariable ["BIS_fnc_initModules_disableAutoActivation",false];
};

private _item19042 = objNull;
if (_layer16458) then {
	_item19042 = (group (missionNamespace getvariable ["BIS_functions_mainscope",objnull])) createUnit ["ModuleEffectsPlankton_F",[15231.5,14137.4,68.792],[],0,"CAN_COLLIDE"];
	_this = _item19042;
	_logics pushback _this;
	_logicIDs pushback 19042;
	_this setPosWorld [15231.5,14137.4,0.000335693];
	_this setVectorDirAndUp [[0,1,0],[0,0,1]];
	_this setvariable ["BIS_fnc_initModules_disableAutoActivation",false];
};

private _item19066 = objNull;
if (_layer19043 && _layer16458) then {
	_item19066 = (group (missionNamespace getvariable ["BIS_functions_mainscope",objnull])) createUnit ["ModuleEffectsSmoke_F",[15160.4,14135.6,110.698],[],0,"CAN_COLLIDE"];
	_this = _item19066;
	_logics pushback _this;
	_logicIDs pushback 19066;
	_this setPosWorld [15160.4,14135.6,51.1631];
	_this setVectorDirAndUp [[0,1,0],[0,0,1]];
	_this setVariable ['ColorRed',0.5,true];;
	_this setVariable ['ColorGreen',0.5,true];;
	_this setVariable ['ColorBlue',0.5,true];;
	_this setVariable ['ColorAlpha',0.5,true];;
	_this setVariable ['Timeout',0,true];;
	_this setVariable ['EffectSize',1,true];;
	_this setVariable ['ParticleDensity',3,true];;
	_this setVariable ['ParticleLifeTime',6.5,true];;
	_this setVariable ['ParticleSize',1,true];;
	_this setVariable ['Expansion',1,true];;
	_this setVariable ['ParticleSpeed',1,true];;
	_this setVariable ['ParticleLifting',1,true];;
	_this setVariable ['WindEffect',1,true];;
	_this setvariable ["BIS_fnc_initModules_disableAutoActivation",false];
};

private _item19067 = objNull;
if (_layer19043 && _layer16458) then {
	_item19067 = (group (missionNamespace getvariable ["BIS_functions_mainscope",objnull])) createUnit ["ModuleEffectsFire_F",[15160.4,14135.6,108.437],[],0,"CAN_COLLIDE"];
	_this = _item19067;
	_logics pushback _this;
	_logicIDs pushback 19067;
	_this setPosWorld [15160.4,14135.6,48.9019];
	_this setVectorDirAndUp [[0,1,0],[0,0,1]];
	_this setVariable ['ColorRed',0.5,true];;
	_this setVariable ['ColorGreen',0.5,true];;
	_this setVariable ['ColorBlue',0.5,true];;
	_this setVariable ['Timeout',0,true];;
	_this setVariable ['FireDamage',1,true];;
	_this setVariable ['EffectSize',4,true];;
	_this setVariable ['ParticleDensity',50,true];;
	_this setVariable ['ParticleLifeTime',3.5,true];;
	_this setVariable ['ParticleSize',1.6,true];;
	_this setVariable ['ParticleSpeed',1,true];;
	_this setVariable ['ParticleOrientation',0,true];;
	_this setvariable ["BIS_fnc_initModules_disableAutoActivation",false];
};


///////////////////////////////////////////////////////////////////////////////////////////
// Layers


///////////////////////////////////////////////////////////////////////////////////////////
// Crews


///////////////////////////////////////////////////////////////////////////////////////////
// Vehicle cargo


///////////////////////////////////////////////////////////////////////////////////////////
// Connections


///////////////////////////////////////////////////////////////////////////////////////////
// Inits (executed only once all entities exist; isNil used to ensure non-scheduled environment)



///////////////////////////////////////////////////////////////////////////////////////////
// Module activations (only once everything is spawned and connected)
if !(isNull _item18813) then {_item18813 setvariable ["BIS_fnc_initModules_activate",true];};
if !(isNull _item19042) then {_item19042 setvariable ["BIS_fnc_initModules_activate",true];};
if !(isNull _item19066) then {_item19066 setvariable ["BIS_fnc_initModules_activate",true];};
if !(isNull _item19067) then {_item19067 setvariable ["BIS_fnc_initModules_activate",true];};


///////////////////////////////////////////////////////////////////////////////////////////
[[_objects,_groups,_triggers,_waypoints,_logics,_markers],[_objectIDs,_groupIDs,_triggerIDs,_waypointIDs,_logicIDs,_markerIDs]]

Unfortunately, I can't post the whole thing because it's massive but here is the part that has the modules. I was suggested by Heyoxe on discord to change "BIS_fnc_initModules_disableAutoActivation" true to false but the problem still remains. Any help with this issue would be appreciated. 

Share this post


Link to post
Share on other sites

Some ideas:

  1. Have you made sure that the code executes? Maybe the if statements are returning false?
  2. 5 hours ago, Gustav Bengtsson said:

    (group (missionNamespace getvariable ["BIS_functions_mainscope",objnull])) createUnit

    Instead of this maybe use createAgent?

  3. The BIS_fnc_initModules_disableAutoActivation has to be set to false.

  4. Why so many ";;"? It shouldn't break anything but is not good practice.

Otherwise I'd suggest checking with diag_log if the modues are created

_item18813 = (group (missionNamespace getvariable ["BIS_functions_mainscope",objnull])) createUnit ["ModuleEffectsBubbles_F",[15231.8,14142.8,0.494209],[],0,"CAN_COLLIDE"];
diag_log [_item18813, alive _item18813, isNull _item18813, isNil "_item18813"];

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×