M-Owen 11 Posted April 29, 2017 I would like to accomplish a mission where a given terminal date is opened, send information and activate a mission task ... some of you have an example? Share this post Link to post Share on other sites
pierremgi 4851 Posted April 30, 2017 Place your data terminal (things/military) Then, in init field of the object: MGITerminal1 = this; [MGITerminal1,"red","orange","green"] call BIS_fnc_dataTerminalColor; MGITerminal1 addAction ["Activate terminal",{ MGITerminal1 removeAction (_this select 2); MGITerminal1 spawn { [_this,3] call BIS_fnc_dataTerminalAnimate; sleep 10; firstTask = ["task0", true, ["Description here","Title here",""],nil, "ASSIGNED", 0, true, true,"",true] call BIS_fnc_setTask; [MGITerminal1,0] call BIS_fnc_dataTerminalAnimate } }]; Share this post Link to post Share on other sites
Midnighters 152 Posted May 2, 2017 @pierremgi the second parameter (number) is for the color correct? (BIS_fnc_dataTerminalAnimate) Share this post Link to post Share on other sites
pierremgi 4851 Posted May 2, 2017 16 minutes ago, Midnighters said: @pierremgi the second parameter (number) is for the color correct? (BIS_fnc_dataTerminalAnimate) no , the phase of animation. 3 t o open, 0 to close it. Applied to 3 sources: lock_source, sesame_source, antenna_source. I don't have more details than what is written in the function viewer. Share this post Link to post Share on other sites
7erra 629 Posted May 2, 2017 52 minutes ago, Midnighters said: @pierremgi the second parameter (number) is for the color correct? (BIS_fnc_dataTerminalAnimate) Okay here's what I found out: The number's not the color but the animtaion state with which the color changes as well Spoiler 0: Closed 1: Open, no antenna, first screen some text, second screen empty 2: Open, antenna extended, first screen text, second screen empty 3: Open, both screens (second screen animated), antenna deployed Function: Spoiler //--- A script function for animating "Land_DataTerminal_01_F" //--- To open terminal: [box, 3] call BIS_fnc_DataTerminalAnimate //--- To close terminal: [box, 0] call BIS_fnc_DataTerminalAnimate if !(_this isEqualTypeParams [objNull, 0]) exitWith { ["Required format: [<dataTerminalObject>, <animationPhase>]"] call BIS_fnc_error; nil }; params ["_obj", "_phase"]; _obj animateSource ["Lock_source", _phase]; _obj animateSource ["Sesame_source", _phase]; _obj animateSource ["Antenna_source", _phase]; _______________________________________________________________________________________________________________________________________________________________ If you want to change the color you can use BIS_fnc_DataTerminalColor: [termimnal, color1, color2, color3] call BIS_fnc_DataTerminalColor; terminal: object color1: Closed color (phase 0) color2: processing color (while deploying) color3: deployed color (only in final phase (3)) Color can be: "blue", "orange", "green", "red", "purple" Function: Spoiler private ["_dataTerminal", "_color1", "_color2", "_color3"]; _dataTerminal = [_this, 0, objNull, [objNull]] call BIS_fnc_param; _color1 = [_this, 1, "undefined", ["string"]] call BIS_fnc_param; _color2 = [_this, 2, "undefined", ["string"]] call BIS_fnc_param; _color3 = [_this, 3, "undefined", ["string"]] call BIS_fnc_param; if (isNull(_dataTerminal)) then { false } else { switch (toLower _color1) do { case "blue": {_dataTerminal setObjectTextureGlobal [2, "#(argb,8,8,3)color(0,1,1,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [2, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_blue.rvmat"];}; case "orange": {_dataTerminal setObjectTextureGlobal [2, "#(argb,8,8,3)color(0.75,0.5,0,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [2, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_orange.rvmat"];}; case "green": {_dataTerminal setObjectTextureGlobal [2, "#(argb,8,8,3)color(0.25,0.75,0.25,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [2, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_green.rvmat"];}; case "red": {_dataTerminal setObjectTextureGlobal [2, "#(argb,8,8,3)color(1,0.15,0.05,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [2, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_red.rvmat"];}; case "purple": {_dataTerminal setObjectTextureGlobal [2, "#(argb,8,8,3)color(1,0.125,1,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [2, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_purple.rvmat"];}; }; switch (toLower _color2) do { case "blue": {_dataTerminal setObjectTextureGlobal [3, "#(argb,8,8,3)color(0,1,1,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [3, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_blue.rvmat"];}; case "orange": {_dataTerminal setObjectTextureGlobal [3, "#(argb,8,8,3)color(0.75,0.5,0,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [3, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_orange.rvmat"];}; case "green": {_dataTerminal setObjectTextureGlobal [3, "#(argb,8,8,3)color(0.25,0.75,0.25,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [3, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_green.rvmat"];}; case "red": {_dataTerminal setObjectTextureGlobal [3, "#(argb,8,8,3)color(1,0.15,0.05,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [3, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_red.rvmat"];}; case "purple": {_dataTerminal setObjectTextureGlobal [3, "#(argb,8,8,3)color(1,0.125,1,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [3, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_purple.rvmat"];}; }; switch (toLower _color3) do { case "blue": {_dataTerminal setObjectTextureGlobal [4, "#(argb,8,8,3)color(0,1,1,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [4, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_blue.rvmat"];}; case "orange": {_dataTerminal setObjectTextureGlobal [4, "#(argb,8,8,3)color(0.75,0.5,0,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [4, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_orange.rvmat"];}; case "green": {_dataTerminal setObjectTextureGlobal [4, "#(argb,8,8,3)color(0.25,0.75,0.25,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [4, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_green.rvmat"];}; case "red": {_dataTerminal setObjectTextureGlobal [4, "#(argb,8,8,3)color(1,0.15,0.05,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [4, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_red.rvmat"];}; case "purple": {_dataTerminal setObjectTextureGlobal [4, "#(argb,8,8,3)color(1,0.125,1,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [4, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_purple.rvmat"];}; }; true }; Share this post Link to post Share on other sites
Midnighters 152 Posted May 2, 2017 2 hours ago, pierremgi said: no , the phase of animation. 3 t o open, 0 to close it. Applied to 3 sources: lock_source, sesame_source, antenna_source. I don't have more details than what is written in the function viewer. Gotcha, the params confused me at first. Share this post Link to post Share on other sites
Midnighters 152 Posted May 2, 2017 1 hour ago, 7erra said: Okay here's what I found out: The number's not the color but the animtaion state with which the color changes as well Reveal hidden contents 0: Closed 1: Open, no antenna, first screen some text, second screen empty 2: Open, antenna extended, first screen text, second screen empty 3: Open, both screens (second screen animated), antenna deployed Function: Reveal hidden contents //--- A script function for animating "Land_DataTerminal_01_F" //--- To open terminal: [box, 3] call BIS_fnc_DataTerminalAnimate //--- To close terminal: [box, 0] call BIS_fnc_DataTerminalAnimate if !(_this isEqualTypeParams [objNull, 0]) exitWith { ["Required format: [<dataTerminalObject>, <animationPhase>]"] call BIS_fnc_error; nil }; params ["_obj", "_phase"]; _obj animateSource ["Lock_source", _phase]; _obj animateSource ["Sesame_source", _phase]; _obj animateSource ["Antenna_source", _phase]; _______________________________________________________________________________________________________________________________________________________________ If you want to change the color you can use BIS_fnc_DataTerminalColor: [termimnal, color1, color2, color3] call BIS_fnc_DataTerminalColor; terminal: object color1: Closed color (phase 0) color2: processing color (while deploying) color3: deployed color (only in final phase (3)) Color can be: "blue", "orange", "green", "red", "purple" Function: Reveal hidden contents private ["_dataTerminal", "_color1", "_color2", "_color3"]; _dataTerminal = [_this, 0, objNull, [objNull]] call BIS_fnc_param; _color1 = [_this, 1, "undefined", ["string"]] call BIS_fnc_param; _color2 = [_this, 2, "undefined", ["string"]] call BIS_fnc_param; _color3 = [_this, 3, "undefined", ["string"]] call BIS_fnc_param; if (isNull(_dataTerminal)) then { false } else { switch (toLower _color1) do { case "blue": {_dataTerminal setObjectTextureGlobal [2, "#(argb,8,8,3)color(0,1,1,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [2, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_blue.rvmat"];}; case "orange": {_dataTerminal setObjectTextureGlobal [2, "#(argb,8,8,3)color(0.75,0.5,0,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [2, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_orange.rvmat"];}; case "green": {_dataTerminal setObjectTextureGlobal [2, "#(argb,8,8,3)color(0.25,0.75,0.25,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [2, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_green.rvmat"];}; case "red": {_dataTerminal setObjectTextureGlobal [2, "#(argb,8,8,3)color(1,0.15,0.05,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [2, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_red.rvmat"];}; case "purple": {_dataTerminal setObjectTextureGlobal [2, "#(argb,8,8,3)color(1,0.125,1,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [2, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_purple.rvmat"];}; }; switch (toLower _color2) do { case "blue": {_dataTerminal setObjectTextureGlobal [3, "#(argb,8,8,3)color(0,1,1,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [3, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_blue.rvmat"];}; case "orange": {_dataTerminal setObjectTextureGlobal [3, "#(argb,8,8,3)color(0.75,0.5,0,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [3, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_orange.rvmat"];}; case "green": {_dataTerminal setObjectTextureGlobal [3, "#(argb,8,8,3)color(0.25,0.75,0.25,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [3, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_green.rvmat"];}; case "red": {_dataTerminal setObjectTextureGlobal [3, "#(argb,8,8,3)color(1,0.15,0.05,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [3, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_red.rvmat"];}; case "purple": {_dataTerminal setObjectTextureGlobal [3, "#(argb,8,8,3)color(1,0.125,1,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [3, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_purple.rvmat"];}; }; switch (toLower _color3) do { case "blue": {_dataTerminal setObjectTextureGlobal [4, "#(argb,8,8,3)color(0,1,1,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [4, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_blue.rvmat"];}; case "orange": {_dataTerminal setObjectTextureGlobal [4, "#(argb,8,8,3)color(0.75,0.5,0,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [4, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_orange.rvmat"];}; case "green": {_dataTerminal setObjectTextureGlobal [4, "#(argb,8,8,3)color(0.25,0.75,0.25,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [4, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_green.rvmat"];}; case "red": {_dataTerminal setObjectTextureGlobal [4, "#(argb,8,8,3)color(1,0.15,0.05,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [4, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_red.rvmat"];}; case "purple": {_dataTerminal setObjectTextureGlobal [4, "#(argb,8,8,3)color(1,0.125,1,1.0,co)"]; _dataTerminal setObjectMaterialGlobal [4, "\A3\Props_F_Exp_A\Military\Equipment\Data\DataTerminal_purple.rvmat"];}; }; true }; Wow, interesting observation. Wouldn't have known the different colors for each phase. I would only assume the final color would be just in one RGBA or RGB format. Share this post Link to post Share on other sites
black_hawk_mw2_87 74 Posted September 30, 2018 OK, if I put the script in the data object's init field, I would be able to activate it. But what should I use as a condition for a task state 'success' (task completed)? :) That would be a script that checks if the data is sent or the device is activated. :) Share this post Link to post Share on other sites