Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

bumyplum

Member
  • Content Count

    125
  • Joined

  • Last visited

  • Medals

Everything posted by bumyplum

  1. bumyplum

    Eventhandlers

    _G_Slider = _display ctrlCreate ["RscXSliderH",68]; _G_Slider sliderSetRange [0, 255]; _G_Slider sliderSetPosition _GREEN; _G_Slider sliderSetSpeed [10, 10, 1]; _G_Slider ctrlSetPosition [0.237492 * safezoneW + safezoneX,0.232889 * safezoneH + safezoneY,0.2 * safezoneW,0.025 * safezoneH]; _G_Slider ctrlSetBackgroundColor [0.15,0.85,0.85,1]; _G_Slider ctrlRemoveAllEventHandlers 'SliderPosChanged'; _G_Slider ctrlAddEventHandler ['SliderPosChanged',' _RED = profileNamespace getVariable "Var_Red"; _BLUE = profileNamespace getVariable "Var_Blue"; _GREEN = profileNamespace getVariable "Var_Green"; _BRIGHT = profileNamespace getVariable "Var_Bright"; _REDC = _RED / 255; _BLUEC = _BLUE / 255; _BRIGHTC = _BRIGHT / 255; _GREEN_UR = (_this select 1); _GREEN = Round _GREEN_UR; _GREENC = _GREEN / 255; _RGBA = [_REDC,_GREENC,_BLUEC,_BRIGHTC]; ((findDisplay 999) displayCtrl 68) sliderSetPosition (_this select 1); ((findDisplay 999) displayCtrl 119) ctrlSetText format[''%1 '',_GREEN]; ((findDisplay 999) displayCtrl 123) ctrlSetBackgroundColor _RGBA; profileNamespace setVariable ["Var_Green",_GREEN]; ']; _G_Slider ctrlCommit 0.3; For example, how would i get what happends when the sliderpos is changed
  2. bumyplum

    Eventhandlers

    I mean a control handler i didn't realise I put a regular eventhandler
  3. bumyplum

    Eventhandlers

    Say if i loaded up editor and executed a Killed event handler on my self with a script with i be able to retrieve what script will be triggered when the eventhandler happends?
  4. How comes you cant use setVelocity? Also try teleporting the player to the players position, _vPos = getpos (vehicle player); (vehicle player) setpos _vPos; It's only just an idea I'm not sure if itll work
  5. From creating my own chat commands script and looking at long bows youd have to develop the chatcomProcess.sqf to split the command and the increment for example, the way I way I execute it through mine for example is, ["player", _code, _selectedTargetName] spawn fnc_chat_Exec; Which executes code on a specific player which is selected by their name in chat for example #heal Amar Which would heal the player Amar but it also allowed Scalar values, for example #delete 500 Which would delete all objected within a 500 radius which is changeable by typing in chat the value This is all done through spitting the command from the target/scalar value // The _code is defined when it finds out which command is selected. Thanks
  6. How do you get a player profileName from their objVar for eample: profileName = "Player1"; how do i get Player1's object var just from their name
  7. bumyplum

    profileName to objVar

    I realised it wasn't the best option, how ever i figured my own way of doing it. private _arr = []; { _1 = [name _x]; _2 = [_x]; _3 = _1 + _2; _arr pushBack _3; } forEach allPlayers; private _selectedTarget = []; for "_i" from 0 to (count _arr - 1) do { _findNamePos = ((_arr select _i) find _selectedTargetName); if !(_findNamePos isEqualTo -1) then { _selectedTarget pushBack ((_arr select _i)select 1); }; }; _selectedTarget = _selectedTarget select 0; Instead of remote executing it your able to do it though a foreach statement. Thanks 🙂
  8. bumyplum

    profileName to objVar

    []spawn { missionNameSpace setVariable ["allNames",[] ,true]; _selectedTargetName = "FR0STY"; [{ _allNames = missionNameSpace getVariable ["allNames",[]]; _allNames pushbackUnique [profileName, player]; missionNameSpace setVariable ["allNames",_allNames,true]; }] remoteExec ["BIS_fnc_spawn",0,false]; sleep 0.1; _allNames = missionNameSpace getVariable ["allNames",false]; hint str _allNames; private _subNames = []; for "_i" from 0 to (count _allNames - 1) do { _findNamePos = ((_allNames select _i) find _selectedTargetName); if !(_findNamePos isEqualTo -1) then { _subNames pushBack [_i ,_findNamePos, ((_allNames select _i)select 0), ((_allNames select _i)select 1)]; }; }; _selectedTarget = ((_subNames select 0) select 3); player setVariable["_selectedTarget", _selectedTarget]; hint str _selectedTarget; }; []spawn { sleep 0.1; _selectedTarget = player getVariable["_selectedTarget", false]; hint format["%1", _selectedTarget]; _selectedTarget setDamage 1; }; is what i currently have and works accordingly // with some extra details
  9. bumyplum

    profileName to objVar

    Thanks for the input how ever i'm trying to get what BIS_fnc_objectVar returns hint str (player call BIS_fnc_objectVar); // "bis_o2_692" just using a profileName, hint str (profileName call BIS_fnc_objectVar); Would be good but doesn't work ie. i'm attempting to get the "bis_o2_692" from a profileName and not player
  10. bumyplum

    profileName to objVar

    I've already attempted, _name = format["%1", profileName]; _id = vehicleVarName _name; hint str _id; // which doesn't seem to work
  11. Hello, I'm attempting to make a script where it hints what you have messaged in chat how ever i'm failing to detect when the chat is opened or closed, i'm attempting to do so via, [] spawn { waitUntil {inputAction "chat" > 0}; hint "Chat opened"; }; Anyone know why it isnt working
  12. bumyplum

    Chat Input Action

    // Update the code i have written bellow works / thanks 🙂 fnc_chat_checker = { [] spawn { waitUntil { !isNull findDisplay 24 }; hint "Chat Opend!"; [] spawn { waitUntil { isNull findDisplay 24 }; hint "Chat Closed!"; []spawn fnc_chat_checker; }; }; }; []spawn fnc_chat_checker;
  13. Would you not be able to use player variables instead of profileNamespace? You'd be able to do something along the lines of player addEventHandler ["Killed", { params ["_unit", "_killer", "_instigator", "_useEffects"]; _killer setVariable["p_kills", ((_killer getVariable ["p_kills", 0])+1, true); }]; Just a thought 🙂
  14. Hello, is there anyway to edit the Players list box which is located on the map, https://gyazo.com/527f8802457dbaa4daf4e0fb475f303e // see image for reference I've found the display control for the listbox which contains: Map, Briefing, Team, Players, Log which is (findDisplay 12) displayCtrl 1001), how ever is there a way to edit whats in the players list box and the box on the far right, any infomation is helpful
  15. I'm attempting to create a leaderboard for a players points how ever i'm unable to sort the leadboard correctly as _arr sort false; just sots the first number how ever the string contains numbers and letters in the format of _playerPoints - (name player) _playerPoints - (name player) _playerPoints - (name player) _playerPoints - (name player) and so on how ever it just organises the first number and not all of them, i've been trying for a while and i'm not sure on how to proceed
  16. When i set the players points on the variable i can't get them if that makes sense so i'm passing them through a marker
  17. Ehm, if something doesn't work i try work around it in my own way aha _markerName = format["%1_points", name player]; deleteMarker _markerName; Marker1 = createMarker [_markerName ,[0,0,0]]; _currentPoints = player getVariable ["_playerPoints",0]; _updatedPoints = _currentPoints + 10; player setVariable["_playerPoints", _updatedPoints]; _newPoints = player getVariable "_playerPoints"; _markerName setMarkerText format["%1",_newPoints ,name player]; this is how players get points _allPlayers = allPlayers - entities "HeadlessClient_F"; private _arr = []; _pScore = { _namePlayer = format["%1_points", name _x]; _playerName = (name _x); _points = markerText _namePlayer; _points = parseNumber _points; _points = _points / 100000; _points = format["%1 - %2", _points, _playerName]; _arr pushBack _points; _arr sort false; }forEach _allPlayers; { _Leaderboard_GUI_LB lbAdd _x; } forEach _arr; that's how they're added to an array
  18. _namePlayer = format["%1_points", name _x]; _playerName = (name _x); _points = markerText _namePlayer; _points = parseNumber _points; _points = _points / 100000; _points = format["%1 - %2", _points, _playerName]; _arr pushBack _points; _arr sort false; // when i devide the score into decimals it sorts correctly but i was to show it as the original points
  19. Hello, I have a quick question about remote executing. So i'm creating a script where it adds the option to capture a flag and im using remote execute to add the action to it, how ever if i execute the code a player joins after ive executed it they don't seem to get the add action. I'm using a custom menu to spawn the flag which is executed by a menu i have created within the game. How would i be able to spawn the flag with everyone being able to interact with it including players who join, thanks in advance.
  20. I'm attempting to create a custom leader board with points i assign to players, how ever it just returns <null>. private _arr = []; _pScore = { _playerPoints = _x getVariable "Players_Points"; _playerName = name _x; _points = format["%1 - %2", _playerPoints, _playerName]; _arr pushBack _points; }forEach playableUnits; { _Leaderboard_GUI_LB lbAdd _x; } forEach _arr; how ever it adds them to the listbox and their names work fine just it doesn't seem to get the variable "Players_Points" and returns null. _getStats = player getVariable "Players_Points"; _updateStats = _getStats + 10; player setVariable["Players_Points", _updateStats]; (locally this is how the points are applied to a player)
  21. i tried both and neither worked i believe
  22. The player gets points by capturing a flag and ever x amount of time the player gets x amount of points, i've changed how the points are added to the player to // player setVariable["Players_Points", 0, "true"]; which is executed locally on them self, how ever when trying to make a scoreboard it just adds my points as 0 as well as other players I've also attempted _namePlayer = format["%1_points", name player]; missionNamespace setVariable [_namePlayer , 100, "true"]; // for giving points private _arr = []; _pScore = { _namePlayer = format["%1_points", name _x]; _getVarPoints = missionNamespace getVariable [_namePlayer, 0]; _playerName = name _x; _points = format["%1 - %2", _getVarPoints, _playerName]; _arr pushBack _points; }forEach playableUnits; { _Leaderboard_GUI_LB lbAdd _x; } forEach _arr; // for adding to the list box how ever it shows my points correctly just doesn't display other players it just displays 0 even if they have points
  23. I've attempted this and even if they do have points then it just adds 0 for them
  24. [ // what you want to add the action to\\ , ["Tittle", { // put the script here\\ } ]] remoteExec ["addAction"]; ^ for example the player or cursortarget I hope this helps
×