{"name":"BIS_fnc_destroyer01Init","operator":null,"title":"BIS fnc destroyer01Init","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_destroyer01Init","revid":286071,"updated":"2021-06-20T17:25:14Z","groups":["Destroyer"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.84"}],"since":{"game":"arma3","name":"Arma 3","version":"1.84"},"arma3_since":"1.84","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"- This is a main function designed to assemble dynamic ship (multi-part structure). Ship consists of multiple sub-objects that are linked together based on precise memory point positions in 3D space.","syntaxes":[{"syntax":"[] call BIS_fnc_destroyer01Init","since":null,"effect":null,"exec":null,"params":[{"name":"mode","type":"Number","types":["Number"],"optional":false,"default":null,"description":"(Scalar)","since":null,"text":"0: (Scalar)","source":"docblock"},{"name":"param0","type":null,"types":[],"optional":false,"default":null,"description":"ship Base/object\nand parameters from config","since":null,"text":"0: ship Base/object\nand parameters from config","source":"docblock"}],"returns":{"type":"Array, Object, Script Handle","types":["Array","Object","Script Handle"],"description":null,"text":"exposes and array of objects (ship parts) to other scripts for easy access as variable in it is own object name-space.\nDestroyer (ship) is assembled","source":"docblock"}}],"examples":[{"text":"```sqf\nclass Eventhandlers\n{\n    init = \"_this call BIS_fnc_Destroyer01Init\";                                //main init fnc, will assemble ship in game\n    AttributesChanged3DEN = \"_this call BIS_fnc_Destroyer01EdenInit\";            //function to update objects position in EDEN editor if attributes changed by player\n    Dragged3DEN = \"_this call BIS_fnc_Destroyer01PosUpdate\";                    //function to update objects position in EDEN editor if attributes changed by player\n    RegisteredToWorld3DEN = \"_this call BIS_fnc_Destroyer01EdenInit\";            //initial EDEN init fnc (main init is still called)\n    UnregisteredFromWorld3DEN = \"_this call BIS_fnc_Destroyer01EdenDelete\";        //function  to delete all ship objects in EDEN editor\n};\n```","code":["class Eventhandlers\n{\n    init = \"_this call BIS_fnc_Destroyer01Init\";                                //main init fnc, will assemble ship in game\n    AttributesChanged3DEN = \"_this call BIS_fnc_Destroyer01EdenInit\";            //function to update objects position in EDEN editor if attributes changed by player\n    Dragged3DEN = \"_this call BIS_fnc_Destroyer01PosUpdate\";                    //function to update objects position in EDEN editor if attributes changed by player\n    RegisteredToWorld3DEN = \"_this call BIS_fnc_Destroyer01EdenInit\";            //initial EDEN init fnc (main init is still called)\n    UnregisteredFromWorld3DEN = \"_this call BIS_fnc_Destroyer01EdenDelete\";        //function  to delete all ship objects in EDEN editor\n};"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":[],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Destroyer","Functions","Introduced with Arma 3 version 1.84"],"docblock":{"author":"Bravo Zero One development, John_Spartan","description":"- This is a main function designed to assemble dynamic ship (multi-part structure). Ship consists of multiple sub-objects that are linked together based on precise memory point positions in 3D space.","params":[{"index":0,"name":"mode","types":["Number"],"optional":false,"default":null,"description":"(Scalar)","text":"(Scalar)"},{"index":0,"name":null,"types":[],"optional":false,"default":null,"description":"ship Base/object\nand parameters from config","text":"ship Base/object\nand parameters from config"}],"returns":{"types":["Array","Object","Script Handle"],"text":"exposes and array of objects (ship parts) to other scripts for easy access as variable in it is own object name-space.\nDestroyer (ship) is assembled"},"examples":["class Eventhandlers\n{\n    init = \"_this call BIS_fnc_Destroyer01Init\";                                //main init fnc, will assemble ship in game\n    AttributesChanged3DEN = \"_this call BIS_fnc_Destroyer01EdenInit\";            //function to update objects position in EDEN editor if attributes changed by player\n    Dragged3DEN = \"_this call BIS_fnc_Destroyer01PosUpdate\";                    //function to update objects position in EDEN editor if attributes changed by player\n    RegisteredToWorld3DEN = \"_this call BIS_fnc_Destroyer01EdenInit\";            //initial EDEN init fnc (main init is still called)\n    UnregisteredFromWorld3DEN = \"_this call BIS_fnc_Destroyer01EdenDelete\";        //function  to delete all ship objects in EDEN editor\n};"],"syntax":null,"execution":"- Call from EH on the main ship's base model (blank model with memory points and reference config).","notes":null,"requirements":"- Compatible object (carrier/ship) must have a base model with reference memory points and set of parts defined as separate objects in cfgVehicles config with their own models. Main ship base must have a definition of all listed sub parts and memory point position to reference it is placement in 3D space.\n\n    Example in cfgVehicles class for ship base\n    multiStructureParts[] = {\n                    {\"Land_Destroyer_01_hull_01_F\",\"pos_hull_1\"},\n                    {\"Land_Destroyer_01_hull_02_F\",\"pos_hull_2\"},\n                    {\"Land_Destroyer_01_hull_03_F\",\"pos_hull_3\"},\n                    {\"Land_Destroyer_01_hull_04_F\",\"pos_hull_4\"},\n                    {\"Land_Destroyer_01_hull_05_F\",\"pos_hull_5\"},\n                    {\"Land_Destroyer_01_interior_02_F\",\"pos_hull_2\"},\n                    {\"Land_Destroyer_01_interior_03_F\",\"pos_hull_3\"},\n                    {\"Land_Destroyer_01_interior_04_F\",\"pos_hull_4\"},\n                    {\"Land_HelipadEmpty_F\",\"pos_heliPad\"},\n                    {\"ShipFlag_US_F\",\"pos_Flag\"}\n\n                };","meta":{},"text":"Author: Bravo Zero One development\n- John_Spartan\n\nDescription:\n- This is a main function designed to assemble dynamic ship (multi-part structure). Ship consists of multiple sub-objects that are linked together based on precise memory point positions in 3D space.\n\nExecution:\n- Call from EH on the main ship's base model (blank model with memory points and reference config).\n\n    Example:\n    class Eventhandlers\n    {\n        init = \"_this call BIS_fnc_Destroyer01Init\";                                //main init fnc, will assemble ship in game\n        AttributesChanged3DEN = \"_this call BIS_fnc_Destroyer01EdenInit\";            //function to update objects position in EDEN editor if attributes changed by player\n        Dragged3DEN = \"_this call BIS_fnc_Destroyer01PosUpdate\";                    //function to update objects position in EDEN editor if attributes changed by player\n        RegisteredToWorld3DEN = \"_this call BIS_fnc_Destroyer01EdenInit\";            //initial EDEN init fnc (main init is still called)\n        UnregisteredFromWorld3DEN = \"_this call BIS_fnc_Destroyer01EdenDelete\";        //function  to delete all ship objects in EDEN editor\n    };\n\nRequirements:\n- Compatible object (carrier/ship) must have a base model with reference memory points and set of parts defined as separate objects in cfgVehicles config with their own models.\nMain ship base must have a definition of all listed sub parts and memory point position to reference it is placement in 3D space.\n\n    Example in cfgVehicles class for ship base\n    multiStructureParts[] = {\n                    {\"Land_Destroyer_01_hull_01_F\",\"pos_hull_1\"},\n                    {\"Land_Destroyer_01_hull_02_F\",\"pos_hull_2\"},\n                    {\"Land_Destroyer_01_hull_03_F\",\"pos_hull_3\"},\n                    {\"Land_Destroyer_01_hull_04_F\",\"pos_hull_4\"},\n                    {\"Land_Destroyer_01_hull_05_F\",\"pos_hull_5\"},\n                    {\"Land_Destroyer_01_interior_02_F\",\"pos_hull_2\"},\n                    {\"Land_Destroyer_01_interior_03_F\",\"pos_hull_3\"},\n                    {\"Land_Destroyer_01_interior_04_F\",\"pos_hull_4\"},\n                    {\"Land_HelipadEmpty_F\",\"pos_heliPad\"},\n                    {\"ShipFlag_US_F\",\"pos_Flag\"}\n\n                };\n\nParameter(s):\n    _this select 0: mode (Scalar)\n    0: ship Base/object\n\n    and parameters from config\n\nReturns: exposes and array of objects (ship parts) to other scripts for easy access as variable in it is own object name-space.\nResult: Destroyer (ship) is assembled"},"filled_from_docblock":["description","params","returns","examples"]}