-
Content Count
471 -
Joined
-
Last visited
-
Medals
Everything posted by M1ke_SK
-
You mean something like this?
-
[RELEASE] Simple Bomb Defuse [script]
M1ke_SK replied to M1ke_SK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Sorry for delay. I was away. Will test shortly, Did you tried script without mods ? -
[RELEASE] Simple Bomb Defuse [script]
M1ke_SK replied to M1ke_SK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Can you wrote dependencies (mods used) ? I dont have all mods you need for mission. -
[RELEASE] Simple Bomb Defuse [script]
M1ke_SK replied to M1ke_SK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Make sure that barrel is NOT simpleObject and have simulation ENABLED. Can you post your mission so we can have better look? -
Spawn ammo caches and marks
M1ke_SK replied to Lucas Andreatta's topic in ARMA 3 - MISSION EDITING & SCRIPTING
with headless client you can use these if (!hasInterface) then { //run on headless clients and dedicated server }; if (!hasInterface && !isDedicated) then { //run on headless clients only }; -
Spawn ammo caches and marks
M1ke_SK replied to Lucas Andreatta's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Make sure you wrap it in if(isServer) { ... } condition, to run it only by server. -
Spawn ammo caches and marks
M1ke_SK replied to Lucas Andreatta's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You dont need loop with mission eventhandler -
Spawn ammo caches and marks
M1ke_SK replied to Lucas Andreatta's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Better use addMissionEventHandler ["EntityKilled", { //your code }]; than looping eveny 10 seconds for every unit on map. -
Probably double quotes. Show your init.sqf to be sure. [] execVM "scripts\zlt_fastrope.sqf";
-
list ArmA's dialogs and displays (List)
M1ke_SK replied to 7erra's topic in ARMA 3 - MISSION EDITING & SCRIPTING
These are controls of display 602 -
list ArmA's dialogs and displays (List)
M1ke_SK replied to 7erra's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Inside inventory (602) 6331, // uniform 6381, // vest 6191, // backpack 6240 // headgear 610, // Primary Weapon 620, // PW Muzzle 621, // PW Optics 622, // PW Flashlight 611, // secondary weapon 612, // hand Gun 630, // HG Flashlight 628, // HG Muzzle 629 // HG Optics -
Does Arma 3 have a "Go, go go!" voice file?
M1ke_SK replied to thirith's topic in ARMA 3 - MISSION EDITING & SCRIPTING
-
There is weapon and magazines for weapon in container. player addEventHandler [ "Take", { params ["_unit", "_container", "_item"]; diag_log format ["_item: %1", _item]; } ]; When I take weapon, it shows up in log (_item variable). Problem: With weapon I receive also magazines for this weapon. Question: How to prevent to pick up these additional magazines? Idea: I want to have control of what I can take from container. I want only take weapon without magazines.
-
[problem] take weapon from container
M1ke_SK replied to M1ke_SK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Maybe little simplier would be: //clear all magazines player { _unit removeMagazine _x; } forEach magazines _unit; //restore old magazines before take { _unit addMagazine [_x, 1]; } forEach _old_unit_magazines_array; //clear all magazines from container clearMagazineCargoGlobal _container; //restore old magazines before take { _container addMagazineCargoGlobal [_x, 1]; } forEach _old_container_magazines_array; -
[problem] take weapon from container
M1ke_SK replied to M1ke_SK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@pierremgi When you already have some magazines in unit, and you will take weapon witch use these magazines, it will remove them too. _arrayA = [1,2,3,2,4]; _arrayB = [2,3]; _arrayC = _arrayA - _arrayB; _arrayC => [1,4] This will remove all main magazines used by weapon _loaded = MGI_crateLoadout - _new; -
[problem] take weapon from container
M1ke_SK replied to M1ke_SK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Maybe this? { if ( _x in primaryWeaponMagazine _unit ) then { _unit removeMagazine _x } } forEach magazines _unit; -
[problem] take weapon from container
M1ke_SK replied to M1ke_SK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yes, great. Is there possibility to REMOVE this magazine from weapon? Even when it is empty it should not be in weapon. -
[problem] take weapon from container
M1ke_SK replied to M1ke_SK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I tried it and this only remove bullets from gun. But ammo is in weapon. And it also add magazines to vest for weapon. I will try to fiddle with it. -
[problem] take weapon from container
M1ke_SK replied to M1ke_SK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am thinking if should I check items of unit before eventHandler and compare it with items after take, but that seems like overkill. -
[solved] close dialog created with script
M1ke_SK posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I have code where I crate dialog via script. I set action to close dialog for button _ctrl_button_close. disableSerialization; _ctrl_background = (findDisplay 46) ctrlCreate ["RscPicture", -1]; _ctrl_background ctrlSetPosition [0.438124 * safezoneW + safezoneX, 0.445 * safezoneH + safezoneY, 0.12375 * safezoneW, 0.11 * safezoneH]; _ctrl_background ctrlSetText "#(rgb,8,8,3)color(0,0,0,0.5)"; _ctrl_background ctrlCommit 0; _ctrl_button_give = (findDisplay 46) ctrlCreate ["RscButton", -1]; _ctrl_button_give ctrlSetPosition [0.469062 * safezoneW + safezoneX, 0.511 * safezoneH + safezoneY, 0.061875 * safezoneW, 0.022 * safezoneH]; _ctrl_button_give ctrlSetText "GIVE"; _ctrl_button_give ctrlCommit 0; _ctrl_button_close = (findDisplay 46) ctrlCreate ["RscButton", -1]; _ctrl_button_close ctrlSetPosition [0.551562 * safezoneW + safezoneX, 0.445 * safezoneH + safezoneY, 0.0103125 * safezoneW, 0.022 * safezoneH]; _ctrl_button_close ctrlSetText "X"; _ctrl_button_close buttonSetAction "closeDialog 0"; _ctrl_button_close ctrlCommit 0; _ctrl_edit = (findDisplay 46) ctrlCreate ["RscEdit", -1]; _ctrl_edit ctrlSetPosition [0.45875 * safezoneW + safezoneX, 0.467 * safezoneH + safezoneY, 0.0825 * safezoneW, 0.022 * safezoneH]; _ctrl_edit setText "0"; _ctrl_edit ctrlCommit 0; Problem: Can't close dialog with ESC key or close button (x). Question: How to close dialog created with script? -
[solved] close dialog created with script
M1ke_SK replied to M1ke_SK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Excellent ! -
[solved] close dialog created with script
M1ke_SK replied to M1ke_SK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am familiar with creating dialogs in description.ext. But I am wondering if there is way to create dialog without defining it in description. -
[solved] close dialog created with script
M1ke_SK replied to M1ke_SK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Is there a way to create dialog via script? How to use that ? createDialog "MyCustomDialog"; -
[solved] close dialog created with script
M1ke_SK replied to M1ke_SK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
so I set IDCs for controls and added displayEventHandler But I cannot enter value into RscEdit or interact with dialog. disableSerialization; _ctrl_background = (findDisplay 46) ctrlCreate ["RscPicture", 7001]; _ctrl_background ctrlSetPosition [0.438124 * safezoneW + safezoneX, 0.445 * safezoneH + safezoneY, 0.12375 * safezoneW, 0.11 * safezoneH]; _ctrl_background ctrlSetText "#(rgb,8,8,3)color(0,0,0,0.5)"; _ctrl_background ctrlCommit 0; _ctrl_button_give = (findDisplay 46) ctrlCreate ["RscButton", 7002]; _ctrl_button_give ctrlSetPosition [0.469062 * safezoneW + safezoneX, 0.511 * safezoneH + safezoneY, 0.061875 * safezoneW, 0.022 * safezoneH]; _ctrl_button_give ctrlSetText "GIVE"; _ctrl_button_give ctrlCommit 0; _ctrl_button_close = (findDisplay 46) ctrlCreate ["RscButton", 7003]; _ctrl_button_close ctrlSetPosition [0.551562 * safezoneW + safezoneX, 0.445 * safezoneH + safezoneY, 0.0103125 * safezoneW, 0.022 * safezoneH]; _ctrl_button_close ctrlSetText "X"; _ctrl_button_close buttonSetAction "{ ctrlDelete ( (findDisplay 46) displayCtrl _x ); } forEach [7001, 7002, 7003, 7004];"; //_ctrl_button_close buttonSetAction "closeDialog 0"; _ctrl_button_close ctrlCommit 0; _ctrl_edit = (findDisplay 46) ctrlCreate ["RscEdit", 7004]; _ctrl_edit ctrlSetPosition [0.45875 * safezoneW + safezoneX, 0.467 * safezoneH + safezoneY, 0.0825 * safezoneW, 0.022 * safezoneH]; _ctrl_edit ctrlSetText "0"; _ctrl_edit ctrlCommit 0; my_custom_display_event_handler = (findDisplay 46) displayAddEventHandler [ "KeyDown", { params ["_ctrl", "_dikCode", "_shift", "_ctrlKey", "_alt"]; if (_dikCode == 1 && !_shift && !_ctrlKey && !_alt) then { { ctrlDelete ( (findDisplay 46) displayCtrl _x ); } forEach [7001, 7002, 7003, 7004]; }; (findDisplay 46) displayRemoveEventHandler ["KeyDown", my_custom_display_event_handler]; } ]; -
[solved] close dialog created with script
M1ke_SK replied to M1ke_SK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
There is set action for button _ctrl_button_close buttonSetAction "closeDialog 0"; But I cannot click on button or close it with ESC key.