JeyR 2 Posted August 3, 2017 Hey, Larrow. You did an awesome job!! I have only one simple problem. The delete function doesn't delete the destroyed items :/. Is there any way to fix that? Share this post Link to post Share on other sites
Larrow 2695 Posted August 4, 2017 15 hours ago, JeyR said: The delete function doesn't delete the destroyed items Can you give me an example class? Are we talking buildings? Share this post Link to post Share on other sites
JeyR 2 Posted August 9, 2017 Sorry for the late reply, I have been busy working on my mission with your awesome script. There you go some class names that doesn't work: Land_HBarrierTower_F, Land_Device_assembled_F,Land_Campfire_F,Land_GarbageBarrel_01_english_F,Land_i_Shed_Ind_F, And the same goes for boxes. I didn't have the time to test everything. I also have one more problem, maybe you can give me a suggestion, I have this : //_taskobjective is a classname randomly selected from array, _blockade = ["blockade1"] call LARs_fnc_spawnComp; _comp = [_taskobjective,getPos _guard, [0,0,0], random 360, true, true ] call LARs_fnc_spawnComp; ... Later in code : [ _comp ] call LARs_fnc_deleteComp; [_blockade] call LARs_fnc_deleteComp; My problem: The "_comp" gets deleted, everything is working perfectly, but I get an error when It wants to delete the "_blockade". 13:26:56 Error in expression < { if ( !isNil "_x" && { _x select 0 == _compReference } ) exitWith { LARs_spawn> 13:26:56 Error position: <_compReference } ) exitWith { LARs_spawn> 13:26:56 Error Undefined variable in expression: _compreference 13:26:56 File LARs\functions\Utilities\fn_deleteComp.sqf [LARs_fnc_deleteComp], line 58 13:26:56 Error in expression <l" ]; params[ "_compReference" ]; if ( _compReference isEqualType objNull ) exi> 13:26:56 Error position: <_compReference isEqualType objNull ) exi> 13:26:56 Error Undefined variable in expression: _compreference 13:26:56 File LARs\functions\Utilities\fn_deleteComp.sqf [LARs_fnc_deleteComp], line 6 [_blockade] call LARs_fnc_deleteComp; } > 13:26:56 Error position: <_blockade] call LARs_fnc_deleteComp; } > 13:26:56 Error Undefined variable in expression: _blockade I am sure it is something very stupid that I forget to use, or something similar, so I would appreciate some help. Share this post Link to post Share on other sites
Larrow 2695 Posted August 9, 2017 10 hours ago, JeyR said: There you go some class names that doesn't work: Land_HBarrierTower_F, Land_Device_assembled_F,Land_Campfire_F,Land_GarbageBarrel_01_english_F,Land_i_Shed_Ind_F, Ta Ill have a look when I can. 10 hours ago, JeyR said: but I get an error when It wants to delete the "_blockade". The error shows that _blockade is undefined even before you call my code. [_blockade] call LARs_fnc_deleteComp; } > 13:26:56 Error position: <_blockade] call LARs_fnc_deleteComp; } > 13:26:56 Error Undefined variable in expression: _blockade You would need to show the rest of your code for me to help you understand why your reference is undefined. Share this post Link to post Share on other sites
JeyR 2 Posted August 10, 2017 if(current_task == "bigmarker6" || current_task == "smallmarker10") then { _blockade = ["blockade1"] call LARs_fnc_spawnComp; if(current_task == "bigmarker6") then {_null = []execVM "eos\blockade_rus.sqf"; } else{_null = []execVM "eos\blockade_ins.sqf";}; }; //current_task is a randomly selected marker // this is in compositions.cfg: ////// class blockade1{ #include "blockade1.sqe" }; ////// // later in the code : [_blockade] call LARs_fnc_deleteComp; if you want the Whole script, then check out this link: https://pastebin.com/hADbqqch I didn't want to post that here because it's quite big, P.S : this is what I tried first instead of: [_blockade] call LARs_fnc_deleteComp ---> // copy the marker before changing it : _premarker = current_task; //after the mission is completed: if(_pretaskmarker == "bigmarker6" || _pretaskmarker == "smallmarker10")then{ [ _blockade ] call LARs_fnc_deleteComp; }; Share this post Link to post Share on other sites
Larrow 2695 Posted August 11, 2017 As _blockade is only set within the IF statements scope {} the variable is only defined within this scope. Once outside (further on in your code) it will be undefined (nil). Easiest fix would be to private the variable at the top of your script, this will make it defined within the whole of your script, although still nil until it is set by the call in the IF statement. private["_blockade"]; if(current_task == "bigmarker6" || current_task == "smallmarker10") then { _blockade = ["blockade1"] call LARs_fnc_spawnComp; if(current_task == "bigmarker6") then {_null = []execVM "eos\blockade_rus.sqf"; } else{_null = []execVM "eos\blockade_ins.sqf";}; }; //snip [ _blockade ] call LARs_fnc_deleteComp; Share this post Link to post Share on other sites
JeyR 2 Posted August 11, 2017 I knew I was mistaken somewhere. Thank you. Share this post Link to post Share on other sites
MBMC 0 Posted August 12, 2017 Hallo Larrow, thanks for the great stuff. I have one problem with spawning a composition. I greate a composition with the new Praetorian 1C AAA (Mk-49 Spartan SAM or Mk-21 Centurion SAM). I create them empty and instead of a BLUFOR unit, I set in a OPFOR unit. Now the problem is when I want to creat it in my Mission, the OPFOR guy isn't inside the Praetorian 1C AAA (Mk-49 Spartan SAM or Mk-21 Centurion SAM). Everthing else work awsome. Mayby you know the problem what I'm doing wrong? Share this post Link to post Share on other sites
lepasi 10 Posted October 6, 2017 Hey Larrow ! Thanks for this amazing script, works great. I figured you would know a little something about compositions, I have a problem with the creation itself within the Eden Editor. Sometimes when I create a new composition in the Editor, I save it as composition but after I place it again directly into the Editor (maybe to just look at it or to change some things) some objects start to have weird offsets (in height) . So I place it, fix the floatin objects, save it, but they will float anyway again. Happend to Ais, to crates, sandbags ... One example: I have shipping container and one Ai guard standing on top of it. When I spawn it in again (In the Editor, not via script) the Ai floats above the container (actually it floats above the container as high as the containers height, like it would add both heights). Then on a different sample it works greate again, but then the other Ai floats again and so on and so on. There seems to be something going on while saving the actual compositions in the editor, something weird .... Share this post Link to post Share on other sites
Fluit 13 Posted November 2, 2017 Is the Startis mission from dropbox the latest version of this script or is there a github repo or something similar where I can find updates? Share this post Link to post Share on other sites
LifeSnatcher 2 Posted November 13, 2017 Hello, Great tool, its awesome. I am having a few issues using it though. Im pretty sure its due to my lack of understanding of how all this arma 3 scripting works. When I spawn in a composition using the action menu or using a trigger, the elements that were in side of structures are dropping in from the roof or just hovering above the roof. how do i fix that. also i wrote some script to randomly call my compositions. Each of the compositions has a trigger that when all opfor are dead then call my function and load in another composition. however when i spawn in the composition the trigger keeps firing and continuously spawning in compositions. Another issue is that i cant figure out how to use your code to spawn the composition location from exactly where it was made at. I am using some very unpleasant methods, such as markers to create composition then load back and finds it cords using my mouse. not the best. any help will be appreciated. Again awesome tool, i just don't understand how to use it yet. Share this post Link to post Share on other sites
LifeSnatcher 2 Posted December 6, 2017 (edited) I am using LARS compositions spawn-er and it has stopped working. here is the error message _wp |#|setWaypointCombatMode _mode; _wp setWayp... Error Foreign error: Unknown enum value: "" File LaRs\Functions\fn_createComp.sqf [LaRs_fnc_createComp], line 1201 ----------------------------------------------------------------------------------------------------------------------------- here is the code from LaRs\Functions\fn_createComp.sqf. Line 1201 is highlighted. Let me know if the whole file is required. //***** //WAYPOINTS //***** private _fnc_spawnWaypoint = { private [ "_position", "_ATLOffset", "_placement", "_compRadius", "_mode", "_formation", "_speed", "_behaviour", "_description", "_condition" ]; params[ "_cfg", "_group" ]; _position = getArray( _cfg >> "position" ); _ATLOffset = getNumber( _cfg >> "atlOffset" ); //_position = [ _position, _ATLOffset ] call _fnc_getPosition; _position = [ objNull, _position, [0,0,0], _ATLOffset ] call _fnc_setPositionandRotation; _placement = getNumber( _cfg >> "placement" ); _compRadius = getNumber( _cfg >> "completitionRadius" ); _mode = getText( _cfg >> "combatMode" ); _formation = getText( _cfg >> "formation" ); _speed = getText( _cfg >> "speed" ); _behaviour = getText( _cfg >> "combat" ); _description = getText( _cfg >> "description" ); _condition = [ ( _cfg >> "expCond" ), "TXT", "true" ] call _fnc_getCfgValue; //TODO: does this need defering private [ "_onAct", "_name", "_script", "_timeout", "_show", "_type" ]; _onAct = getText( _cfg >> "expActiv" ); _name = getText( _cfg >> "name" ); _script = getText( _cfg >> "script" ); _timeout = [ getNumber( _cfg >> "timeoutMin" ), getNumber( _cfg >> "timeoutMid" ), getNumber( _cfg >> "timeoutMax" ) ]; _show = getText( _cfg >> "showWP" ); _type = getText( _cfg >> "type" ); private [ "_effectCondition", "_effectSound", "_effectVoice", "_effectSoundEnvironment", "_effectMusic", "_effectTitle", "_wp" ]; _effectCondition = getText( _cfg >> "Effects" >> "condition" ); //TODO: does this need defering _effectSound = getText( _cfg >> "Effects" >> "sound" ); _effectVoice = getText( _cfg >> "Effects" >> "voice" ); _effectSoundEnvironment = getText( _cfg >> "Effects" >> "soundEnv" ); _effectMusic = getText( _cfg >> "Effects" >> "track" ); _effectTitle = getText( _cfg >> "Effects" >> "title" ); _wp = _group addWaypoint[ ASLToATL _position, _placement, count waypoints _group, _name]; _wp setWaypointType _type; _wp setWaypointCompletionRadius _compRadius; _wp setWaypointCombatMode _mode; _wp setWaypointFormation _formation; _wp setWaypointSpeed _speed; _wp setWaypointBehaviour _behaviour; _wp setWaypointDescription _description; _wp setWaypointStatements[ _condition, _onAct ]; _wp setWaypointTimeout _timeout; _wp showWaypoint _show; _wp setWaypointScript _script; //TODO: Effects need testing _wp setEffectCondition _effectCondition; _wp setSoundEffect [ _effectSound, _effectVoice, _effectSoundEnvironment, "" ]; _wp setMusicEffect _effectMusic; switch ( true ) do { case ( isClass( missionConfigFile >> "RscTitles" >> _effectTitle ) ) : { _wp setTitleEffect [ "RES", "", _effectTitle ]; }; case ( isClass( configFile >> "CfgTitles" >> _effectTitle ) ) : { _wp setTitleEffect [ "OBJECT", "", _effectTitle ]; }; default { if ( _effectTitle != "" ) then { _wp setTitleEffect [ "TEXT", "PLAIN", _effectTitle ]; }; }; }; _wp }; //********** Edited December 6, 2017 by LifeSnatcher forgot to highlight line where error happens Share this post Link to post Share on other sites
LT.DANG 0 Posted December 6, 2017 Hey all, hopefully i'm posting in the right area. I mod DUWS-R into other mods like IFA3, FOW and UNSUNG. I noticed a new bug since the last DLC update that returns an enum error - Error Foreign error: Unknown enum Value "" line 11 or sometimes line 5 depending on what map I put DUWS-R onto. Here is the script code // _center = createCenter sideLogic; un center existe déjà // create && synchronize HC _grplogic = createGroup sideLogic; _hc_module = _grplogic createUnit ["HighCommand",[0,0,0] , [], 0, ""]; _hc_module synchronizeObjectsAdd [player]; // done, // make 1 HC subordinate so that the player will not control all blufor forces _grplogic = createGroup sideLogic; _sub_module = _grplogic createUnit ["HighCommandsubordinate",[0,0,0] , [], 0, ""]; //- line 11 _sub_module synchronizeObjectsAdd [_hc_module]; In DUWS you can spawn High command squads and now when you start the game you gain control of all forces on your side as tht HC subordinate part of the code is not working. Strangely the bug doesn't occur all the time, the error message does every time but maybe 10-20% of the time you do not gain control of all squads from the start of the game. Is there a fix for this? Its doing my head in. I guess the script that defines what squad spawns may need some changing as well.....not sure, I'm more of a modder to code than a coder. Would like to fix this soon as I'm making a new WW2 version set in the Pacific as a Christmas present to my subscribers. Share this post Link to post Share on other sites
Lorenz94 6 Posted January 22, 2018 On 6/12/2017 at 4:51 AM, LifeSnatcher said: I am using LARS compositions spawn-er and it has stopped working. here is the error message _wp |#|setWaypointCombatMode _mode; Bump! Same error here :( The composition process is ok, but sometimes, some objects moves sideways! For example, a lorry tips on a side. Thank you. Share this post Link to post Share on other sites
davidoss 548 Posted January 22, 2018 For now you can use bis functions to do such things until it will be repaired https://community.bistudio.com/wiki/BIS_fnc_objectsGrabber https://community.bistudio.com/wiki/BIS_fnc_ObjectsMapper Share this post Link to post Share on other sites
Mr H. 393 Posted February 1, 2018 Hey I can spawn compositions alright and it works like a charm, but the deleting function doesn't work. I've tried it with very simple test compositions including a small group of AIs and a marker. The composition spawns as expected but won't get deleted. Are you still supporting this awesome script? EDIT: the deleting function DOES work properly I was just not using it properly, my bad. Markers won't get spawned properly though, only the text will show, not the marker pic. Share this post Link to post Share on other sites
Mr H. 393 Posted February 14, 2018 @davidoss objects grabber and objects mapper aren't anywhere as efficient as this script is. After further testing: Triggers have some issues, condition "NOT PRESENT" is not passed "PRESENT" is set instead. Trigger owners are not recorded. @Larrow commented his code on this. Trigger timeout is not set. (though from my testing its correctly grabbed from the sqe) Share this post Link to post Share on other sites
pierremgi 4493 Posted February 14, 2018 3 hours ago, Mr H. said: @davidoss objects grabber and objects mapper aren't anywhere as efficient as this script is. After further testing: Triggers have some issues, condition "NOT PRESENT" is not passed "PRESENT" is set instead. Trigger owners are not recorded. Yes, far too old functions (Arma 2). 3den did some improvements from then. Good enough to place some empty objects. Share this post Link to post Share on other sites
davidoss 548 Posted February 14, 2018 18 minutes ago, pierremgi said: Yes, far too old functions (Arma 2). 3den did some improvements from then. Good enough to place some empty objects. I cant agree. I am spawning whole bases and other compositions with. What is not there are alignment to the ground. This can be achieved by snipped as function are returning objects array. Share this post Link to post Share on other sites
Mr H. 393 Posted February 14, 2018 yes but the script also grabs triggers and their parameters, units and their waypoints & loadouts, init scripts; in short EVERYTHING. You can use it to spawn whole missions, which is what I'm using it for, and objectsgrabber just won't do that 1 Share this post Link to post Share on other sites
PiZZADOX 47 Posted April 6, 2018 I am very impressed by the power of this script. I am using it for a quick and easy way of locally spawning AI on the HC machine, getting around any of the numerous issues with setowner transfer between server and HC. The only thing is that for live spawning the performance is quite poor due to direct cfg reads. Wouldn't the script would be much faster and less intensive to run if the cfg data was stored in arrays (server or HC local) so that the spawning portion of the script read only from other sqf and missionconfigfile data instead of sqe every time? Or is there a way to preload sqe data to make it quicker to access I am missing? Share this post Link to post Share on other sites
Larrow 2695 Posted October 30, 2018 30/10/2018 - All new refactor of code... Some changes to positional calculations Added missing unit attribute for stance Added AI Radar use Added remote sensor attributes Fixed errors from BI enumeration changes Fixed trigger and waypoint effect errors in console Added missing trigger isServer attribute 2 2 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4201 Posted October 30, 2018 Thank you very much Larrow ! Share this post Link to post Share on other sites
Lorenz94 6 Posted November 1, 2018 On 30/10/2018 at 1:15 PM, Larrow said: 30/10/2018 - All new refactor of code... Some changes to positional calculations Added missing unit attribute for stance Added AI Radar use Added remote sensor attributes Fixed errors from BI enumeration changes Fixed trigger and waypoint effect errors in console Added missing trigger isServer attribute Thank you Larrow! Did you feel guilty in the last few days? hahah :P Share this post Link to post Share on other sites
Larrow 2695 Posted November 1, 2018 01/11/2018 Added new parameter to LARs_fnc_spawnComp to allow ignoring of composition items ATLOffset to enable spawning of building decors. See included example map test_houseFurniture.VR for setup 2 Share this post Link to post Share on other sites