tom.machu
Member-
Content Count
13 -
Joined
-
Last visited
-
Medals
Community Reputation
1 NeutralAbout tom.machu
-
Rank
Private First Class
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
conversations BIS_fnc_kbTell - how to get arguments from sentence config in bikb?
tom.machu posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Hi, is it possible to get arguments from sentence config .bkib file and use them in BIS_fnc_kbTell as you can do so with kbTell? class Sentences { class Sentence1 { text = "$STR_HelloThere"; speech[] = { "\Sound\hello.ogg" }; class Arguments {}; actor = "obi1"; }; class Sentence2 { text = "$STR_GeneralKenobi"; speech[] = { "Sound\gk.ogg" }; class Arguments { class Team { type = "simple"; }; class Location { type = "simple"; }; }; actor = "griev"; }; class Sentence3 { text = "$STR_YouAreABoldOne"; speech[] = { "Sound\bold.ogg" }; class Arguments { class Name { type = "simple"; }; }; actor = "griev"; }; }; class Arguments {}; class Special {}; startWithVocal[] = { hour }; startWithConsonant[] = { europe, university }; I dont know, how to get arguments from sentence 2 and sentence 3. I thought I could have use of the code parameter, but Im clueless honestly right now, and I failed to make it working. ["Topic", "MissionName", "", false, [{}[]], [player, NPC], 1, true] spawn BIS_fnc_kbTell; Thank you folks. -
setVariable on ctrlDisplay
tom.machu replied to tom.machu's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I think displayCtrl can't preserve the local variable from setVariable and lose it once the main display is shut down (similarly like when an object is deleted, you can't get getVariable anymore). I used misionNamespace instead and it works. player addAction ["Open Dialog", { createDialog "radioDiag"; {!isNull findDisplay 23}; private _ctrl = findDisplay 23 displayCtrl 1400; private _dirScrl = missionNamespace getVariable ["dir",0]; _ctrl ctrlSetAngle [round _dirScrl, 0.5, 0.5]; hint str _dirScrl; } ]; params ["_displayOrControl", "_scroll"]; disableSerialization; private _ctrl = findDisplay 23 displayCtrl 1400; private _getDir = ctrlAngle _ctrl; private _dir = _getDir select 0; if (_scroll > 0) then { private _dirScrl = (round _dir + 1); _ctrl ctrlSetAngle [_dirScrl, 0.5, 0.5]; missionNamespace setVariable ["dir", _dirScrl]; }; if (_scroll < 0) then { private _dirScrl = (round _dir - 1); _ctrl ctrlSetAngle [_dirScrl, 0.5, 0.5]; missionNamespace setVariable ["dir", _dirScrl]; }; -
setVariable on ctrlDisplay
tom.machu replied to tom.machu's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank you. But how do I get the position of the button in addAction with local variables, when the position was defined by zChanged.sqf. It stays on its default (0 degrees) every time, I open the dialog unless I use the global variable 🙂 params ["_displayOrControl", "_scroll"]; disableSerialization; private _ctrl = findDisplay 23 displayCtrl 1400; private _getDir = ctrlAngle _ctrl; private _dir = _getDir select 0; if (_scroll > 0) then { _ctrl ctrlSetAngle [round _dir + 1, 0.5, 0.5]; private _dirScrl = (round _dir + 1); _ctrl setVariable ["dir", _dirScrl]; }; if (_scroll < 0) then { _ctrl ctrlSetAngle [round _dir - 1, 0.5, 0.5]; private _dirScrl = (round _dir - 1); _ctrl setVariable ["dir", _dirScrl]; }; -
setVariable on ctrlDisplay
tom.machu replied to tom.machu's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If I change _dirScrl to global variable dirScrl in both .sqf, then it works. Is it okay? player addAction [ "Open Dialog", { createDialog "radioDiag"; if (isNil "dirScrl") exitWith {}; private _ctrl = findDisplay 23 displayCtrl 1400; private _dirScrl = _ctrl getVariable ["dir", dirScrl]; private _ctrl ctrlSetAngle [round dirScrl, 0.5, 0.5]; hint str dirScrl; } ]; -
Hi guys, can I set setVariable on displayCtrl and retrieve it in another script? The goal is to set the angle of the (rounded) button and save its position for every time I open dthe dialog? zChanged.sqf (executed from controls.hpp - onMouseZChanged="_this execVM 'zChanged.sqf'"😉 params ["_displayOrControl", "_scroll"]; private _ctrl = findDisplay 23 displayCtrl 1400; private _getDir = ctrlAngle _ctrl; private _dir = _getDir select 0; if (_scroll > 0) then { _ctrl ctrlSetAngle [round _dir + 1, 0.5, 0.5]; //hint str (round _dir + 1); _dirScrl = (round _dir + 1); _ctrl setVariable ["dir", _dirScrl]; }; if (_scroll < 0) then { _ctrl ctrlSetAngle [round _dir - 1, 0.5, 0.5]; //hint str (round _dir - 1); _dirScrl = (round _dir - 1); _ctrl setVariable ["dir", _dirScrl]; }; initPlayerLocal.sqf player addAction [ "Open Dialog", { createDialog "radioDiag"; private _ctrl = findDisplay 23 displayCtrl 1400; private _dirScrl = _ctrl getVariable "dir"; private _ctrl ctrlSetAngle [round _dirScrl, 0.5, 0.5]; hint str _dirScrl; } ];
-
[_unit, currentWeapon _unit] remoteExecCall ["CBA_fnc_dropWeapon", 0] not working for server
tom.machu replied to tom.machu's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks for the quick reply. Unfortunately, this doesn't seem to work either. Works for the server, but client doesnt see the _unit dropping a weapon. -
Hi guys, I ´m having the problem with CBA_fnc_dropWeapon in MP. When a server host executes the function (included in _unit addAction), both the host and the client sees the proper action. But when the client executes the action, then CBA_fnc_dropWeapon works only for the client, but not for the server host. I have tried numerous ways like: private _odhod = [_unit, currentWeapon _unit] remoteExecCall ["CBA_fnc_dropWeapon", 0]; //for client works properly, doesn't work for server private _odhod = [_unit, currentWeapon _unit] remoteExec ["CBA_fnc_dropWeapon", 0]; // not working at all _odhod = [_unit, currentWeapon _unit] call CBA_fnc_dropWeapon; // only executer sees the action [-2, {[_unit, currentWeapon _unit] call CBA_fnc_dropWeapon}] call CBA_fnc_globalExecute; // there I should need to pass _unit variable, since I run it through CBA Extended_InitPost_EventHandlers Thanks.
-
MP - switch ( profileName ) do {}
tom.machu replied to tom.machu's topic in ARMA 3 - MISSION EDITING & SCRIPTING
My bad, it should not be there, I know. Anyway I tried to cfgIdentities in description.ext and call it via: switch (profileName) do { case "*profileName*": { [player, "*name*"] remoteExec ["setIdentity", 0, player]; }; }; With no luck. So I guess, player just has to change the desired profileName in the options for MP scenario. I wanted to add every player his authentic voice and name in the chat for communications in the mission. -
I´m wondering if this can work in MP scenario... init.sqf _player = ""; { if (isPlayer _x AND alive _x) then {_player = _x}; } foreach (playableUnits + switchAbleUnits); switch (profileName) do { case "playerProfileName": { _player setName "John Wick" }; }; script.sqf function called via: [params] remoteExecCall ["radio1_fnc_coordinates",0]; defined function: radio addAction ["Coordinates", { params ["_target", "_caller", "_id", "_args"]; //[_target, _id] remoteExec ["removeAction"]; _target = _this select 0; _caller = _this select 1; _pilot = pilot; switch (name _caller) do { case "John Wick": { _spoj = floor (random 4); switch (_spoj) do { case 0: { _caller sideChat "some text"; sleep 5; [west, "HQ"] sideChat format ["some text %1",mapGridPosition (getposatl _pilot)]; }; case 1: { _caller sideChat "some text"; sleep 5; [west, "HQ"] sideChat format ["*no connection*"]; }; case 2: { _caller sideChat "some text"; sleep 5; [west, "HQ"] sideChat format ["*no connection*"]; }; case 3: { _caller sideChat "some text"; sleep 5; [west, "HQ"] sideChat format ["some text %1",mapGridPosition (getposatl _pilot)]; }; }; }; case "Max Max": { _spoj2 = floor (random 4); switch (_spoj2) do { case 0: { _caller sideChat "some text"; sleep 5; [west, "HQ"] sideChat format ["some text %1",mapGridPosition (getposatl _pilot)]; }; case 1: { _caller sideChat "some text"; sleep 5; [west, "HQ"] sideChat format ["*no connection*"]; }; case 2: { _caller sideChat "some text"; sleep 5; [west, "HQ"] sideChat format ["*no connection*"]; }; case 3: { _caller sideChat "some text"; sleep 5; [west, "HQ"] sideChat format ["some text %1",mapGridPosition (getposatl _pilot)]; }; }; }; }; }, nil, 1, true, true, "", "true", 5, false, "", ""]; In MP scenario it called the function, but it doesn´t work with "name _caller" parameter.
-
How to pass _caller (addAction) into a string in setWaypointStatements ??
tom.machu replied to tom.machu's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Works just fine. Thank you! -
How to pass _caller (addAction) into a string in setWaypointStatements ??
tom.machu posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi, is there a way around it?? waitUntil { player inArea "evac" }; player addAction [ "set up a radio", { params ["_target", "_caller", "_id", "_args"]; [_target, _id] remoteExec ["removeAction"]; _target = _this select 0; _caller = _this select 1; private _trg3 = createTrigger ["EmptyDetector", (getPos _caller)]; _trg3 setTriggerArea [25, 25, 0, false]; _trg3 setTriggerActivation ["ALPHA", "NOT PRESENT", false]; _trg3 setTriggerStatements ["this", "_caller sideChat 'we are ready'", ""]; 1 setRadioMsg "Call helicopter"; }, nil, 1, true, true, "", "true", 5, false, "", ""]; -
Make BIS_fnc_randomPos running in MP
tom.machu posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi, having limited skills, I´m trying to make a script, which would result in a certain group of player spawned at a random position on the map and other group of player at other random position. The script below works in SP, is there a way how to make the script operational in MP (listen server)? _playerposition = [] call BIS_fnc_randomPos; s1 setPos _playerposition; //s1 (placed object in Eden) is player1 s2 setPos (getPos s1); //s2 (placed object in Eden) is player2 _wreck = "Land_Mi8_wreck_F" createVehicle (s1 getPos [10, 45]); _smoke = "test_EmptyObjectForSmoke" createVehicle (getPos _wreck); _smoke attachTo [_wreck, [0, -5, 0]]; _smoke2 = "test_EmptyObjectForSmoke" createVehicle (getPos _wreck); _smoke2 attachTo [_wreck, [0, -3, 0]]; _emitter = "#particlesource" createVehicleLocal (getPos _wreck); _emitter setParticleClass "MediumSmoke"; _emitter setParticleFire [0.3,1.0,0.1]; _fire = "test_EmptyObjectForFireBig" createVehicleLocal (getPos _wreck); _fire attachTo [_wreck, [0, -5, 0]]; _onroadposition = [[[position s1,8000]],[], {isOnRoad _this}] call BIS_fnc_randomPos; _offroad = "C_Offroad_01_comms_F" createVehicle (_onroadposition); _offroad2 = "C_Offroad_01_comms_F" createVehicle (_offroad getPos [10, 180]); c1 moveInDriver _offroad; //c1 (placed object in Eden) is player3 c2 moveInCargo _offroad; c3 moveInCargo _offroad; c4 moveInCargo _offroad; c5 moveInDriver _offroad2; //c5 (placed object in Eden) is player4 c6 moveInCargo _offroad2; c7 moveInCargo _offroad2; c8 moveInCargo _offroad2;