{"name":"BIS_fnc_destroyer01HandleDamage","operator":null,"title":"BIS fnc destroyer01HandleDamage","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_destroyer01HandleDamage","revid":273884,"updated":"2021-06-13T01:12:52Z","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 damage visual FX simulation function designed to animate ships bridge windows when shot. Due to engine limitation (damage simulation is disabled for indestructible objects e.g. ships components) this workaround is applied.","syntaxes":[{"syntax":"[] call BIS_fnc_destroyer01HandleDamage","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":"Array","types":["Array"],"optional":false,"default":null,"description":"https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HitPart","since":null,"text":"0: event Handler Array as documented here - https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HitPart","source":"docblock"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"nothing\nDestroyer (ship) window textures are swapped for damaged ones. Simple swap.","source":"docblock"}}],"examples":[{"text":"```sqf\nclass Eventhandlers\n{\n    HitPart = \"_this call BIS_fnc_Destroyer01HandleDamage;\";\n};\n```","code":["class Eventhandlers\n{\n    HitPart = \"_this call BIS_fnc_Destroyer01HandleDamage;\";\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 damage visual FX simulation function designed to animate ships bridge windows when shot. Due to engine limitation (damage simulation is disabled for indestructible objects e.g. ships components) this workaround is applied.","params":[{"index":0,"name":"mode","types":["Number"],"optional":false,"default":null,"description":"(Scalar)","text":"(Scalar)"},{"index":0,"name":null,"types":["Array"],"optional":false,"default":null,"description":"https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HitPart","text":"event Handler Array as documented here - https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HitPart"}],"returns":{"types":["Nothing"],"text":"nothing\nDestroyer (ship) window textures are swapped for damaged ones. Simple swap."},"examples":["class Eventhandlers\n{\n    HitPart = \"_this call BIS_fnc_Destroyer01HandleDamage;\";\n};"],"syntax":null,"execution":"- Call from EH on the ship's model part with windows.","notes":null,"requirements":"- Compatible object (e.g. ship component) must have a set of selections that are setup and named by convention. Selections must be defined as hidden selections in order for setObjectTexture to work.","meta":{},"text":"Author: Bravo Zero One development\n- John_Spartan\n\nDescription:\n- This is a damage visual FX simulation function designed to animate ships bridge windows when shot.\n  Due to engine limitation (damage simulation is disabled for indestructible objects e.g. ships components) this workaround is applied.\n\nExecution:\n- Call from EH on the ship's model part with windows.\n\n    Example:\n    class Eventhandlers\n    {\n        HitPart = \"_this call BIS_fnc_Destroyer01HandleDamage;\";\n    };\n\nRequirements:\n- Compatible object (e.g. ship component) must have a set of selections that are setup and named by convention.\n  Selections must be defined as hidden selections in order for setObjectTexture to work.\n\nParameter(s):\n    _this select 0: mode (Scalar)\n    0: event Handler Array as documented here - https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HitPart\n\nReturns: nothing\nResult: Destroyer (ship) window textures are swapped for damaged ones. Simple swap."},"filled_from_docblock":["description","params","returns","examples"]}