-
Content Count
332 -
Joined
-
Last visited
-
Medals
Everything posted by Johnson11B2P
-
How to change one of the text color in RscListbox?
Johnson11B2P posted a topic in ARMA 3 - QUESTIONS & ANSWERS
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 //////////////////////////////////////////////////////// }; }; -
Change Color of a list box entry.
Johnson11B2P posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 //////////////////////////////////////////////////////// }; }; -
Change Color of a list box entry.
Johnson11B2P replied to Johnson11B2P's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Change Color of a list box entry.
Johnson11B2P replied to Johnson11B2P's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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? -
[Release]Some Scripts(MineDetector w/ sound)(Vanilla to xMed1 Converter) & moar
Johnson11B2P replied to Lala14's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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? -
Why Won't My Dialog Open?
Johnson11B2P replied to doubleblind's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Working with Dialogs you have to reload the mission everytime you make a change. -
Why Won't My Dialog Open?
Johnson11B2P replied to doubleblind's topic in ARMA 3 - MISSION EDITING & SCRIPTING
createDialog "RecruitUnit" -
Change Color of a list box entry.
Johnson11B2P replied to Johnson11B2P's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Trigger when task is completed
Johnson11B2P replied to Domceck's topic in ARMA 3 - MISSION EDITING & SCRIPTING
["taskID"] call BIS_fnc_taskCompleted put that in the condition box. -
whats the best way to set up headless clent missions?
Johnson11B2P replied to jandrews's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Issues with variables on multiplayer (client-server)
Johnson11B2P replied to Icaruk's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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? -
whats the best way to set up headless clent missions?
Johnson11B2P replied to jandrews's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Issues with variables on multiplayer (client-server)
Johnson11B2P replied to Icaruk's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Question are the players on the server at the same time? -
Going crazy!! Stupid syntax error
Johnson11B2P replied to sturmfalkerda's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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"]; -
{alive _x} count thislist<3
Johnson11B2P replied to Kommiekat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Correct because this will make thisList include only Independent units inside the trigger area. -
creating public variables
Johnson11B2P replied to blasturbator's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Use publicVariable command for your first question. -
{alive _x} count thislist<3
Johnson11B2P replied to Kommiekat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
{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 -
What does it really take to port over a ARMA2 script to ARMA3!
Johnson11B2P replied to avibird 1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Trigger & timeout
Johnson11B2P replied to 1para{god-father}'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
What environment have you tested this? -
Bis_fnc_MP example needed
Johnson11B2P replied to wyattwic's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Activate a trigger if a other trigger has been activated?!
Johnson11B2P replied to Aebian's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
createVehicle and Trigger on unit death
Johnson11B2P replied to blasturbator's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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];" , ""]; -
How to Teleport script??
Johnson11B2P replied to kgino1045's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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]; -
Tasksucceeded not mp synced?
Johnson11B2P replied to clawhammer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
/* * 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. -
While (true) script not working
Johnson11B2P replied to Antorugby's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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.