Jump to content

Johnson11B2P

Member
  • Content Count

    332
  • Joined

  • Last visited

  • Medals

Everything posted by Johnson11B2P

  1. So I've created my G.U.I and I want to know if there is any way to change the color of the text in the list box I selected? Should I handle this in the sqf file that handles the selection of the list box? Update: So I found lbSetColor. So my code is 1547 lbSetColor [0,[0,1,0,0.5]]; which does nothing. class PN_Range_Select { idd=0; movingenable=true; onLoad = "_startUp = [] spawn loadRangeGUI;"; objects[] = {}; class controls { //////////////////////////////////////////////////////// // GUI EDITOR OUTPUT START (by Rex, v1.063, #Luxale) //////////////////////////////////////////////////////// class PN_Frame: RscFrame { idc = 1800; text = "Range Select"; //--- ToDo: Localize; x = 0.298906 * safezoneW + safezoneX; y = 0.236 * safezoneH + safezoneY; w = 0.402187 * safezoneW; h = 0.528 * safezoneH; }; class PN_ListBox_Ranges: RscListbox { idc = 1547; text = "Select Range"; //--- ToDo: Localize; x = 0.329844 * safezoneW + safezoneX; y = 0.324 * safezoneH + safezoneY; w = 0.345469 * safezoneW; h = 0.308 * safezoneH; }; class PN_Picture_Logo: RscPicture { idc = 1200; text = "Images\logo.paa"; x = 0.329844 * safezoneW + safezoneX; y = 0.258 * safezoneH + safezoneY; w = 0.04125 * safezoneW; h = 0.055 * safezoneH; tooltip = "Project Nova"; //--- ToDo: Localize; }; class RscStructuredText_1100: RscStructuredText { idc = 1100; x = 0.386562 * safezoneW + safezoneX; y = 0.258 * safezoneH + safezoneY; w = 0.278437 * safezoneW; h = 0.055 * safezoneH; text = "Project Nova Range Selector"; }; class PN_Button_OK: RscButton { idc = 1600; text = "Select"; //--- ToDo: Localize; x = 0.396875 * safezoneW + safezoneX; y = 0.665 * safezoneH + safezoneY; w = 0.04125 * safezoneW; h = 0.055 * safezoneH; action = "null = execVM ""Range Scripts\RangeSelectResult.sqf"";"; }; class PN_Button_Cancel: RscButton { idc = 1601; text = "Cancel"; //--- ToDo: Localize; x = 0.567031 * safezoneW + safezoneX; y = 0.665 * safezoneH + safezoneY; w = 0.04125 * safezoneW; h = 0.055 * safezoneH; action = "closeDialog 0"; }; //////////////////////////////////////////////////////// // GUI EDITOR OUTPUT END //////////////////////////////////////////////////////// }; };
  2. So I've created my G.U.I and I want to know if there is any way to change the color of the text in the list box I selected? Should I handle this in the sqf file that handles the selection of the list box. I found lbSetColor. So my code is 1547 lbSetColor [0,[0,1,0,0.5]]; which does nothing. /* * File: RangeSelectGUI.hpp * Author: [PN]Rex or RJ4706 * Date: 2014 April 25 * Purpose: This file is the GUI for the Range selection screen. */ class PN_Range_Select { idd=0; movingenable=true; onLoad = "_startUp = [] spawn loadRangeGUI;"; objects[] = {}; class controls { //////////////////////////////////////////////////////// // GUI EDITOR OUTPUT START (by Rex, v1.063, #Luxale) //////////////////////////////////////////////////////// class PN_Frame: RscFrame { idc = 1800; text = "Range Select"; //--- ToDo: Localize; x = 0.298906 * safezoneW + safezoneX; y = 0.236 * safezoneH + safezoneY; w = 0.402187 * safezoneW; h = 0.528 * safezoneH; colorBackground[] = { 1, 1, 1, 1 }; }; class PN_ListBox_Ranges: RscListbox { idc = 1547; text = "Select Range"; //--- ToDo: Localize; x = 0.329844 * safezoneW + safezoneX; y = 0.324 * safezoneH + safezoneY; w = 0.345469 * safezoneW; h = 0.308 * safezoneH; }; class PN_Picture_Logo: RscPicture { idc = 1200; text = "Images\logo.paa"; x = 0.329844 * safezoneW + safezoneX; y = 0.258 * safezoneH + safezoneY; w = 0.04125 * safezoneW; h = 0.055 * safezoneH; tooltip = "Project Nova"; //--- ToDo: Localize; }; class RscStructuredText_1100: RscStructuredText { idc = 1100; x = 0.386562 * safezoneW + safezoneX; y = 0.258 * safezoneH + safezoneY; w = 0.278437 * safezoneW; h = 0.055 * safezoneH; text = "Project Nova Range Selector"; }; class PN_Button_OK: RscButton { idc = 1600; text = "Select"; //--- ToDo: Localize; x = 0.396875 * safezoneW + safezoneX; y = 0.665 * safezoneH + safezoneY; w = 0.04125 * safezoneW; h = 0.055 * safezoneH; action = "null = execVM ""Range Scripts\RangeSelectResult.sqf"";"; }; class PN_Button_Cancel: RscButton { idc = 1601; text = "Cancel"; //--- ToDo: Localize; x = 0.567031 * safezoneW + safezoneX; y = 0.665 * safezoneH + safezoneY; w = 0.04125 * safezoneW; h = 0.055 * safezoneH; action = "closeDialog 0"; }; //////////////////////////////////////////////////////// // GUI EDITOR OUTPUT END //////////////////////////////////////////////////////// }; };
  3. Johnson11B2P

    Change Color of a list box entry.

    So I found the answer to my solution. On my onLoad script file I basically looked for changes through variables and change the color of selected lbCurSel.
  4. Johnson11B2P

    Change Color of a list box entry.

    Okay so I see what I was doing wrong. I would close the Dialog before I made the changes. Is there a way to change text color and make it stick for when the next time the display is called?
  5. For the mine detector/metal detector, is there a way to increase the sound? It should be louder than what it is. Someone from 20 meters away should here it to. Also is the sound local to the player or can anyone hear it?
  6. Johnson11B2P

    Why Won't My Dialog Open?

    Working with Dialogs you have to reload the mission everytime you make a change.
  7. Johnson11B2P

    Why Won't My Dialog Open?

    createDialog "RecruitUnit"
  8. Johnson11B2P

    Change Color of a list box entry.

    Thanks for the input and I couldn't find the error in the .rpt but I did change the syntax to this | lbSetColor [1547,0,[1,0,0,1]]; and nothing happened. Also I did this hint format ["%1", lbColor[1547,0]]; and I get [1,0,0,1] but the color is still white when I reopen the lb.
  9. Johnson11B2P

    Trigger when task is completed

    ["taskID"] call BIS_fnc_taskCompleted put that in the condition box.
  10. That is correct. The SQM to SQF converter was made for ARMA 2 and things are totally different now in ARMA 3. There are corrections you have to make as the program is not suited for ARMA3. For setVehicleInit look at my example this = _obj_0; [] call compile "null = [this,""area0"",""RANDOM"",""MIN:"",1,""MAX:"",2,""nofollow""] execVM ""scripts\UPSMON.sqf"";"; This is the process I used to get mimic setVehicleInit.
  11. Using publicVariableServer you are telling the server to keep track of the updates for the variable and no client will receive the updated variable information. Using publicVariable after the variable on the server has been updated is the right way to go. But caution must be used when using the publicVariable frequently. It can severely lag other parts of the game. How often is A going to be 1? Maybe a point for every 3 seconds a player is in the sector?
  12. The best way I found to use the headless client is make and SQF of the enemies I want the HC to control. Use the local command to make the script execute only on the HC and this way the HC takes care of the calculations required to run the sqf. if(local HC) then{ execVM "enemyCamp.sqf";}; I will show you an example of a unit that is a squad leader created in a sqf _obj_0 = objNull; if (true) then { _obj_0 = _group_east_1 createUnit ["O_Soldier_SL_F", [3480.781, 12921.258, 0], [], 0 ,"NONE"]; this = _obj_0; [] call compile "null = [this,""area0"",""RANDOM"",""MIN:"",1,""MAX:"",2,""nofollow""] execVM ""scripts\UPSMON.sqf"";"; _obj_0 setDir 46.02599; _obj_0 setUnitAbility 0.5; _obj_0 setRank "SERGEANT"; if(true) then { _group_east_1 selectLeader _obj_0; }; }; The best way to do this is find the SQM to SQF converter that was made for ARMA 2. You're going to have to make some changes mainly setVehicleInit which no longer works. Place just the enemies you want on the map and then convert it to sqf and make the changes.
  13. Question are the players on the server at the same time?
  14. Johnson11B2P

    Going crazy!! Stupid syntax error

    waypoint setWaypointStatements [condition, statement] Parameters: waypoint: Array - format Waypoint [condition, statement]: Array condition: String statement: String Return Value: Nothing //---Example code for future reference---// new_wp setWaypointStatements ["true", "diag_log ['GroupLeader: ', this]; diag_log ['Units: ', thislist]"]; I think you want if the group is alive and at the waypoint so try this. [_grp1t, 0] setWaypointStatements ["alive walrustest","[""end1"", true, true] call BIS_fnc_endMission"];
  15. Johnson11B2P

    {alive _x} count thislist<3

    Correct because this will make thisList include only Independent units inside the trigger area.
  16. Johnson11B2P

    creating public variables

    Use publicVariable command for your first question.
  17. Johnson11B2P

    {alive _x} count thislist<3

    {alive _X && !isFleeing _X} count thislist <= 5 If you want to check the number of independents in the area you are going to have to check the side count inside the trigger. Your condition code as it is checks for all sides. When the condition box of the trigger doesn't have a "this" statement in it, the parameters you setup for the trigger aren't considered except maybe the size of the trigger area depending on your condition code. If you want to check to see the count of alive independent forces use this. {side _x == independent}count thisList <= 5 && this
  18. I guess the major thing to worry about it class names and some commands don't work especially setVehicleInit, you will have to figure out a way to overcome it. If you have a module scripted in your code you're going to have to work that out too.
  19. Johnson11B2P

    Trigger & timeout

    What environment have you tested this?
  20. Johnson11B2P

    Bis_fnc_MP example needed

    The target parameter specifies who shall receive the function. If the isPersistent parameter is true it will call the function now and for every JIP player.
  21. In the condition box of the trigger it should be triggerActivated uk_check && (({_x isKindOf "LandVehicle"} count thisList) > 0) Try this I think the syntax is correct.
  22. Sometimes the !alive command doesn't work. Try this damage _obj = 1 I also don't see the point in have the if statement checking the object whether it was dead or not when you clearly had to waitUntil it was dead. So you can remove the if statement and go straight to your trigger creation. Also one more important tip, in the setTriggerStatements you're going to have to use double quotes when placing code inside the statements. _trigE setTriggerStatements ["", "nul = [this] execVM ""intelPickup""; { deleteVehicle _x; } forEach nearestObjects [getpos player,[""Land_Suitcase_F""],2];" , ""];
  23. Johnson11B2P

    How to Teleport script??

    Here is how to make it on map click. 104 cutText ["Click on the map where you'd like Teleport.","PLAIN DOWN",5]; waitFor = true; ["teleportSelf","onMapSingleClick","vehicle player setPos [_pos select 0, _pos select 1,0]; 104 cutText ['','PLAIN DOWN',5]; waitFor = false;"] call BIS_fnc_addStackedEventHandler; waitUntil{!waitFor}; ["teleportSelf","onMapSingleClick"] call BIS_fnc_removeStackedEventHandler; {player reveal _x}forEach nearestObjects [player,[],100];
  24. Johnson11B2P

    Tasksucceeded not mp synced?

    /* * init.sqf */ if(isServer) then { taskOneState = "ASSIGNED"; publicVariable = "taskOneState"; }; if(local player) { waitUntil {!isNil "taskOneState"}; ["taskOne",west,["Task's detailed description","Description","desc"],getMarkerPos "example",taskOneState,1,true,false] call BIS_fnc_setTask; }; Now during the mission when the task state changes update the publicVariable so it should be consistent for everyone joining the mission. I just brained storm this and didn't test but I believe this should work. Let me know if it doesn't or there is a simpler way.
  25. Johnson11B2P

    While (true) script not working

    What Grimes said. Think of it this way, your code won't run another instruction until the first while statement is finished. I think using spawn may be a work around for this.
×