

Mr H.
Member-
Content Count
597 -
Joined
-
Last visited
-
Medals
Everything posted by Mr H.
-
Run Scripts on Players first spawn
Mr H. replied to Sneax x's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
it should be in initplayerlocal.sqf if it works in init but not in initplayerlocal you did something wrong in there. Also this post is in the wrong section, ask a moderator to move it here : https://forums.bohemia.net/forums/forum/154-arma-3-mission-editing-scripting/ -
How to create dead flat bush?
Mr H. replied to johnnyboy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Or a hidden selection then in the p3d? Would be useful to have a look at its config. -
How to create dead flat bush?
Mr H. replied to johnnyboy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Probably more an animation than another p3d don't you think? -
Restrict script to run for limited arma ID
Mr H. replied to anfo's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Player is not a valid variable on the server. Either run it client side or get the player object. -
Show "live" map on billbord???
Mr H. replied to loopdk's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm not at home so I can't run tests on your issue @neman.ekd btw with the satellite mod you can also access the satellite by deploying an antenna and connecting it to the U.T.D. tablet. Both can be found in the inventory items. -
Passing arguments/params when spawning ai
Mr H. replied to Robustcolor's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Depends on what you aim for. Security wise it's better to have them declared in the cfgFunctions. I also find that separate files for each function is clearer and easier to maintain -
Passing arguments/params when spawning ai
Mr H. replied to Robustcolor's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Your file has to be named fn_test.sqf and placed in the directory named functions -
Show "live" map on billbord???
Mr H. replied to loopdk's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yes, with scripting 😉 -
Passing arguments/params when spawning ai
Mr H. replied to Robustcolor's topic in ARMA 3 - MISSION EDITING & SCRIPTING
class CfgFunctions { class Robust { class Mission { file = "functions"; class Aihandler{}; class test; }; }; }; [Some params] spawn Test -
Passing arguments/params when spawning ai
Mr H. replied to Robustcolor's topic in ARMA 3 - MISSION EDITING & SCRIPTING
But why to you do that since you have a cfg functions? Why not just declare them along the others? -
Where to place custom scripts in mission folder
Mr H. replied to Ambross's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Check that your curator module is indeed named gamemaster. Also I used the wrong eventhandler it should be playerConnected -
Passing arguments/params when spawning ai
Mr H. replied to Robustcolor's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Never. Declare it in cfg functions and then spawn it. -
Show "live" map on billbord???
Mr H. replied to loopdk's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Uav screen you can,strategic map you can't -
Where to place custom scripts in mission folder
Mr H. replied to Ambross's topic in ARMA 3 - MISSION EDITING & SCRIPTING
addMissionEventHandler ["PlayerDisconnected", { params ["_id", "_uid", "_name", "_jip", "_owner", "_idstr"]; GameMaster addCuratorEditableObjects [playableUnits,true ]; }]; In your serverinit Btw playableUnits is already an array so I removed the [] -
Where to place custom scripts in mission folder
Mr H. replied to Ambross's topic in ARMA 3 - MISSION EDITING & SCRIPTING
For this initserver is better but you'd be better off doing it with an event handler -
Getting aircraft name from BIS_fnc_ambientFlyBy?
Mr H. replied to pappagoat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
But why ? BIS_fnc_spawnVehicle returns the vehicle, can spawn it in the air and flying and gives you more control! will work but it's way messier and more complicated to set up, plus it might detct the wrong aircraft if one is passing you by closer -
Restrict script to run for limited arma ID
Mr H. replied to anfo's topic in ARMA 3 - MISSION EDITING & SCRIPTING
nope @Dedmen used pseudo code to show you how it works but not actual code, no mistake on your end. -
Getting aircraft name from BIS_fnc_ambientFlyBy?
Mr H. replied to pappagoat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
but that's not what Bis_fnc_flyby is for, you should use BIS_fnc_spawnVehicle instead -
Restrict script to run for limited arma ID
Mr H. replied to anfo's topic in ARMA 3 - MISSION EDITING & SCRIPTING
in your initplayerLocal.sqf private _uids = ["UID1","UID2"]; //list allowed player uids here eg. ["01234567"] OR ["0123456","0147896"] if ((getPlayerUID player) in _uids) then { //your code here }; -
Restrict script to run for limited arma ID
Mr H. replied to anfo's topic in ARMA 3 - MISSION EDITING & SCRIPTING
will only work if you are hosting then on dedicated server "player" makes no sense -
ah ah yeah I don't use findIf often enough! 😊
-
Don't say that! Your script was good in the first place, when you post here people will offer alternatives and more optimized versions, I'm sure someone here can do better than my solution as well! That's how you learn. This was in no way meant as criticism!
-
Answering my own question: you did that because you have one texture for oefcp one for ucp but you don't need that, when texture with color alpha (transparent background) works fine, just tested it, and saves you the trouble of having to prepare two textures for players. Aso I've modified the script again. The uniform with nametag space has a selection called "identity", the following will work with all uniforms having a selection "identity" if rhs keeps this structure it will be compatible with all the uniforms that support it. This has been tested and works: //in initplayerLocal.sqf TAG_fnc_playerData ={ params ["_player"]; private _UIDsTexts = [ ["SOMEPLAYERUID","PATHTOCORRESPONDINGTEXT"], ["SOMEOTHERPLAYERUID","SOMEOTHERPATHTOTEXT"] //etc ]; private _return = []; { if (getPlayerUID _player == (_x select 0)) then {_return =_x}; }forEach _UIDsTexts; _return }; TAG_fnc_setNameTag = { params ["_player"]; private _data = [_player] call TAG_fnc_playerData; if (_data isEqualTo []) exitWith {diag_log format ["Player %1 not listed",name _player],false}; if ("identity" in (selectionNames _player)) then { _player setObjectTextureGlobal [3,(_data select 1)]; }; true }; //------ [player] call TAG_fnc_setNameTag; ["ace_arsenal_displayClosed", { [player] call TAG_fnc_setNameTag; }] call CBA_fnc_addEventHandler;
-
Why do you set the texture twice every time? also this can be simplified: //in initplayerLocal.sqf TAG_fnc_playerData ={ params ["_player"]; private _UIDsTexts = [ ["SOMEPLAYERUID","PATHTOCORRESPONDINGTEXT"], ["SOMEOTHERPLAYERUID","SOMEOTHERPATHTOTEXT"] //etc ]; private _return = []; { if (getPlayerUID _player == (_x select 0)) then {_return =_x}; }forEach _UIDsTexts; _return }; TAG_fnc_setNameTag = { params ["_player"]; private _data = [_player] call TAG_fnc_playerData; if (_data isEqualTo []) exitWith {diag_log format ["Player %1 not listed",name _player],false}; if ((uniform _player) in ["rhs_uniform_acu_ucp","rhs_uniform_acu_oefcp"]) then { _player setObjectTextureGlobal [3,(_data select 1)]; }; true }; //------ [player] call TAG_fnc_setNameTag; ["ace_arsenal_displayClosed", { [player] call TAG_fnc_setNameTag; }] call CBA_fnc_addEventHandler;
-
honestly this was quickly put together, since you are using ace and therefore cba there are more elegant/optimized ways to do this