Jump to content

T. Miller

Member
  • Content Count

    43
  • Joined

  • Last visited

  • Medals

Everything posted by T. Miller

  1. T. Miller

    Need help fixing a bug!

    So if I want to make all values of the unit record changeable, I'd call this code: _unit = _unit apply {_x}; Or is that not sufficient?
  2. T. Miller

    Need help fixing a bug!

    Some of the values of the classes (such as subUnits or veterancyLevel) should be able to be changed later on in the game as well. What would the unitCreate look like then (considering I'd have to use the 'apply' command like; alot.) Or would you reckon it would be easier if I take these values out of the class and apply them in another way?
  3. T. Miller

    Need help fixing a bug!

    Updated project (fixed loads of stupid things and added some cool new things): https://drive.google.com/open?id=0B6JuQdETqP8Nb0UwNnNjaHhBS2s
  4. T. Miller

    Need help fixing a bug!

    No idea what those are.
  5. T. Miller

    Need help fixing a bug!

    1. Is that quicker/more efficient? 2. _unit = {if (_x select 0 == _unitName) exitWith {_x}} forEach _units; Wow, this is a lot more compact than what I wrote. if (isNil {_unit}) then { // unit with given name not found } else { // here we have unit record in _unit variable }; What is the purpose of this code? So, this code works fine: (_unit select 5) set [0, []] Yeah, I already used this instead of the other 1 in the other two functions. I actually didn't realize these two lines in this function. And problem is... each unit record as element 5 has REFERENCE to array SHARED between all units of same type! Well yeah fuck, rip. Quick and dirty solution is CLONE element 5 each time you create new unit. In fn_unitCreate.sqf: If I in future functions have to edit the other values of the unit as well, won't I bump in the same problem?
  6. T. Miller

    Need help fixing a bug!

    Two possible sources of the problem are: 1. The fact that when the units are created, two units of the same type get info from the same array. 2. the 'set' command is bugged and has this as a side effect.
  7. T. Miller

    Need help fixing a bug!

    You don't have a unpbo'er? Forgot to put the pbo in the reply anyway lol. Here's the file: https://drive.google.com/file/d/0B6JuQdETqP8NX2o3N3lUbGRLclU/view?usp=sharing I could potentially explain the bug or help explaining the gamemode if you join my teamspeak: 185.16.85.48:9990 (my name there is SSG T. Miller)
  8. T. Miller

    Need help fixing a bug!

    Here's the mission to test/debug: Be sure to unpbo it. To recreate the problem, execute this is the debug console: [0,["UT#001", [16000,17000]]] call A3A_fnc_unitArrayUpdate; [0,["UT#004", [16200,17000]]] call A3A_fnc_unitArrayUpdate; [0,["UT#004", [16400,17000]]] call A3A_fnc_unitArrayUpdate; [0,["UT#005", [16600,17000]]] call A3A_fnc_unitArrayUpdate; EDIT: I uploaded a zipfile instead: https://drive.google.com/file/d/0B6JuQdETqP8NX2o3N3lUbGRLclU/view?usp=sharing
  9. T. Miller

    random time & location issue

    Thank you, that second way seems a bit easier, I'll implement that, thanks for the help man.
  10. Hi, I'm trying to (for BLUFOR and OPFOR) have a updating marker on a enemy player (the HVT), which updates every 3 to 7 minutes. Since it's a multiplayer scenario, both sides are not supposed to see their OWN marker, I managed to spawn the marker local for each player on the side using the "initPlayerLocal.sqf". The marker that gets moved to the enemy HVT location needs to be updated every 3 to 7 minutes (a random time) and there needs to be a random offset to the marker of 50 meters to each side. Basically, both these things are working. The marker updates at the random time, and is not exactly on the HVT's location, BUT: Both these things are random for every player, instead of the same for everyone on the same side. SCRIPTS: (the ones that matter) init.sqf markers = 0; markersOPFOR = 0; markersBLUFOR = 0; _nil=[]execVM "enemyMarkerInfoOPFOR.sqf"; _nil=[]execVM "enemyMarkerInfoBLUFOR.sqf"; sleep 30; markers = 1; initPlayerLocal.sqf _nil=[]execVM "enemyMarkers.sqf"; enemyMarkers.sqf _playerSideID = (side player) call BIS_fnc_sideID; _HVT = [b_VIP, O_VIP] select _playerSideID; _HVT_Mk_Type = ["b_unknown", "o_unknown"] select _playerSideID; _HVT_Mk_Color = ["ColorWEST", "ColorEAST"] select _playerSideID; _HVT_Mk = createMarkerLocal ["HVT_Mk", getMarkerPos "MarkerSpawn"]; _HVT_Mk setMarkerShapeLocal "ICON"; _HVT_Mk setMarkerTypeLocal _HVT_Mk_Type; _HVT_Mk setMarkerColorLocal _HVT_Mk_Color; _HVT_Mk setMarkerTextLocal "HVT"; waitUntil {markers == 1;}; while {alive _HVT} do { _interval = [interval_O, interval_B] select _playerSideID; _randomX = [randomX_O,randomX_B] select _playerSideID; _randomY = [randomY_O,randomY_B] select _playerSideID; _x = _randomX + ((getPos _HVT) select 0); _y = _randomY + ((getPos _HVT) select 1); _HVT_Mk setmarkerposLocal [_x,_y]; sleep _interval; }; enemyMarkerInfoOPFOR.sqf while {true;} do { interval_O = round (random 240) + 180; randomX_O = round (random 100) - 50; randomY_O = round (random 100) - 50; sleep 60; }; enemyMarkerInfoBLUFOR.sqf while {true;} do { interval_B = round (random 240) + 180; randomX_B = round (random 100) - 50; randomY_B = round (random 100) - 50; sleep 60; }; I must have made about 10 different changes to try and fix the issue, but whenever I tested it on the hosted server with others it stays random per player..
  11. T. Miller

    random time & location issue

    Well I tried called the scripts for updating the markers over the initServer.sqf, and calling the hideMarker script over the initPlayerLocal, but that doesnt make the markers disappear.. SCRIPTS: initServer.sqf _nil=[]execVM "updateMarkersBLUFOR.sqf"; _nil=[]execVM "updateMarkersOPFOR.sqf"; initPlayerLocal.sqf _nil=[]execVM "hideMarkers.sqf"; updateMarkersBLUFOR.sqf sleep 5; while {true;} do { _interval = round (random 240) + 180; _offsetX = round (random 100) - 50; _offsetY = round (random 100) - 50; _x = _offsetX + ((getPos B_VIP) select 0); _y = _offsetY + ((getPos B_VIP) select 0); if (alive B_VIP) then {"B_HVT_Mk" setmarkerpos [_x,_y];} else {"B_HVT_Mk" setmarkerpos getmarkerpos "MarkerSpawn";}; sleep _interval; }; updateMarkersOPFOR.sqf sleep 5; while {true;} do { _interval = round (random 240) + 180; _offsetX = round (random 100) - 50; _offsetY = round (random 100) - 50; _x = _offsetX + ((getPos O_VIP) select 0); _y = _offsetY + ((getPos O_VIP) select 0); if (alive O_VIP) then {"O_HVT_Mk" setmarkerpos [_x,_y];} else {"O_HVT_Mk" setmarkerpos getmarkerpos "MarkerSpawn";}; sleep _interval; }; hideMarkers.sqf _playerSideID = (side player) call BIS_fnc_sideID; _HVT_Mk = ["O_HVT_Mk", "B_HVT_Mk"] select _playerSideID; _HVT_Mk setMarkerAlphaLocal 0; ---------- Post added at 13:57 ---------- Previous post was at 13:07 ---------- Alright. I've done a bit more research, and it seems like I'll have to get back to spawning the markers locally. I went back to basic, no offset for the marker (can't make the offset the same for the complete side) and no random time between two updates from 3 to 7 minutes (can't make it the same for the complete side). If anybody could help me by telling me how to create a global variable for the offset and the time, and implement that in what I already have now. UPDATE: Weirdly enough, with the following setup, 'not everyone'/'only one person' can see all markers, the rest only sees the friendly VIP marker. Anybody know why? I'm desperate. UPDATE UPDATE: Fixed the 'not everyone'/'only one person' problem, I used setMarkerColor instead of setMarkerColorLocal. SCRIPTS: initPlayerLocal.sqf _nil=[]execVM "markers.sqf"; _nil=[]execVM "markersHVT.sqf"; markers.sqf //////////////////// /* Spawn Markers */ //////////////////// //BLUFOR MARKERS _B_ASL_Mk = createMarkerLocal ["B_ASL_Mk", getMarkerPos "MarkerSpawn"]; _B_A1_Mk = createMarkerLocal ["B_A1_Mk", getMarkerPos "MarkerSpawn"]; _B_A2_Mk = createMarkerLocal ["B_A2_Mk", getMarkerPos "MarkerSpawn"]; _B_A3_Mk = createMarkerLocal ["B_A3_Mk", getMarkerPos "MarkerSpawn"]; _B_VIP_Mk = createMarkerLocal ["B_VIP_Mk", getMarkerPos "MarkerSpawn"]; _B_ASL_Mk setMarkerTypeLocal "b_hq"; _B_A1_Mk setMarkerTypeLocal "b_inf"; _B_A2_Mk setMarkerTypeLocal "b_inf"; _B_A3_Mk setMarkerTypeLocal "b_inf"; _B_VIP_Mk setMarkerTypeLocal "b_unknown"; _B_ASL_Mk setMarkerTextLocal "ASL"; _B_A1_Mk setMarkerTextLocal "A1"; _B_A2_Mk setMarkerTextLocal "A2"; _B_A3_Mk setMarkerTextLocal "A3"; _B_VIP_Mk setMarkerTextLocal "VIP"; _B_allMarkers = [_B_ASL_Mk, _B_A1_Mk, _B_A2_Mk, _B_A3_Mk, _B_VIP_Mk]; { _x setMarkerShapeLocal "ICON"; _x setMarkerColorLocal "ColorWEST"; } foreach _allMarkers; //OPFOR MARKERS _O_ASL_Mk = createMarkerLocal ["O_ASL_Mk", getMarkerPos "MarkerSpawn"]; _O_A1_Mk = createMarkerLocal ["O_A1_Mk", getMarkerPos "MarkerSpawn"]; _O_A2_Mk = createMarkerLocal ["O_A2_Mk", getMarkerPos "MarkerSpawn"]; _O_A3_Mk = createMarkerLocal ["O_A3_Mk", getMarkerPos "MarkerSpawn"]; _O_VIP_Mk = createMarkerLocal ["O_VIP_Mk", getMarkerPos "MarkerSpawn"]; _O_ASL_Mk setMarkerTypeLocal "o_hq"; _O_A1_Mk setMarkerTypeLocal "o_inf"; _O_A2_Mk setMarkerTypeLocal "o_inf"; _O_A3_Mk setMarkerTypeLocal "o_inf"; _O_VIP_Mk setMarkerTypeLocal "o_unknown"; _O_ASL_Mk setMarkerTextLocal "ASL"; _O_A1_Mk setMarkerTextLocal "A1"; _O_A2_Mk setMarkerTextLocal "A2"; _O_A3_Mk setMarkerTextLocal "A3"; _O_VIP_Mk setMarkerTextLocal "VIP"; _O_allMarkers = [_O_ASL_Mk, _O_A1_Mk, _O_A2_Mk, _O_A3_Mk, _O_VIP_Mk]; { _x setMarkerShapeLocal "ICON"; _x setMarkerColorLocal "ColorEAST"; } foreach _allMarkers; //////////////////// /* Hide Markers */ //////////////////// //Make markers you're not supposed to see invisible _playerSideID = (side player) call BIS_fnc_sideID; _ASL_Mk = ["B_ASL_Mk", "O_ASL_Mk"] select _playerSideID; _A1_Mk = ["B_A1_Mk", "O_A1_Mk"] select _playerSideID; _A2_Mk = ["B_A2_Mk", "O_A2_Mk"] select _playerSideID; _A3_Mk = ["B_A3_Mk", "O_A3_Mk"] select _playerSideID; _VIP_Mk = ["B_VIP_Mk", "O_VIP_Mk"] select _playerSideID; _ASL_Mk setMarkerAlphaLocal 0; _A1_Mk setMarkerAlphaLocal 0; _A2_Mk setMarkerAlphaLocal 0; _A3_Mk setMarkerAlphaLocal 0; _VIP_Mk setMarkerAlphaLocal 0; //////////////////// /* Update Markers */ //////////////////// sleep 5; while {true;} do { if (alive B_ASL_Leader) then {_B_ASL_Mk setMarkerPosLocal (getpos B_ASL_Leader);} else {_B_ASL_Mk setmarkerposLocal getmarkerpos "MarkerSpawn";}; if (alive B_A1_Leader) then {_B_A1_Mk setMarkerPosLocal (getpos B_A1_Leader);} else {_B_A1_Mk setmarkerposLocal getmarkerpos "MarkerSpawn";}; if (alive B_A2_Leader) then {_B_A2_Mk setMarkerPosLocal (getpos B_A2_Leader);} else {_B_A2_Mk setmarkerposLocal getmarkerpos "MarkerSpawn";}; if (alive B_A3_Leader) then {_B_A3_Mk setMarkerPosLocal (getpos B_A3_Leader);} else {_B_A3_Mk setmarkerposLocal getmarkerpos "MarkerSpawn";}; if (alive B_VIP) then {_B_VIP_Mk setMarkerPosLocal (getpos B_VIP);} else {_B_VIP_Mk setmarkerposLocal getmarkerpos "MarkerSpawn";}; if (alive O_ASL_Leader) then {_O_ASL_Mk setMarkerPosLocal (getpos O_ASL_Leader);} else {_O_ASL_Mk setmarkerposLocal getmarkerpos "MarkerSpawn";}; if (alive O_A1_Leader) then {_O_A1_Mk setMarkerPosLocal (getpos O_A1_Leader);} else {_O_A1_Mk setmarkerposLocal getmarkerpos "MarkerSpawn";}; if (alive O_A2_Leader) then {_O_A2_Mk setMarkerPosLocal (getpos O_A2_Leader);} else {_O_A2_Mk setmarkerposLocal getmarkerpos "MarkerSpawn";}; if (alive O_A3_Leader) then {_O_A3_Mk setMarkerPosLocal (getpos O_A3_Leader);} else {_O_A3_Mk setmarkerposLocal getmarkerpos "MarkerSpawn";}; if (alive O_VIP) then {_O_VIP_Mk setMarkerPosLocal (getpos O_VIP);} else {_O_VIP_Mk setmarkerposLocal getmarkerpos "MarkerSpawn";}; sleep 0.25; }; markersHVT.sqf //////////////////// /* Spawn Markers */ //////////////////// //BLUFOR MARKER _B_HVT_Mk = createMarkerLocal ["B_HVT_Mk", getMarkerPos "MarkerSpawn"]; _B_HVT_Mk setMarkerTypeLocal "b_unknown"; _B_HVT_Mk setMarkerTextLocal "HVT"; _B_HVT_Mk setMarkerShapeLocal "ICON"; _B_HVT_Mk setMarkerColor "ColorWEST"; //OPFOR MARKER _O_HVT_Mk = createMarkerLocal ["O_HVT_Mk", getMarkerPos "MarkerSpawn"]; _O_HVT_Mk setMarkerTypeLocal "o_unknown"; _O_HVT_Mk setMarkerTextLocal "HVT"; _O_HVT_Mk setMarkerShapeLocal "ICON"; _O_HVT_Mk setMarkerColorLocal "ColorEAST"; //////////////////// /* Hide Markers */ //////////////////// //Make marker you're not supposed to see invisible _playerSideID = (side player) call BIS_fnc_sideID; _HVT_Mk = ["O_HVT_Mk", "B_HVT_Mk"] select _playerSideID; _HVT_Mk setMarkerAlphaLocal 0; //////////////////// /* Update Markers */ //////////////////// sleep 5; while {true;} do { if (alive B_VIP) then {_B_HVT_Mk setMarkerPosLocal (getpos B_VIP);} else {_B_HVT_Mk setmarkerposLocal getmarkerpos "MarkerSpawn";}; if (alive O_VIP) then {_O_HVT_Mk setMarkerPosLocal (getpos O_VIP);} else {_O_HVT_Mk setmarkerposLocal getmarkerpos "MarkerSpawn";}; sleep 300; };
  12. T. Miller

    random time & location issue

    Wow, I didn't even think of that. That might also actually cost way less recourses.
  13. T. Miller

    "(side _x == west)" problems

    Thanks a lot, this works!
  14. Hey I'm trying to create side only local-markers. To do this I'd have to call the code for every BLUFOR unit. Therefore I'm trying to create a IF THEN structure to call this code. { if (side _x == west) then { //code }; } foreach playableUnits; Sadly enough the code never gets called (Yes, the code I filled in there to test it díd work). This means something is wrong with (side _x == west). I also tried ((side _x) == west). I only tested it in the editor.
  15. T. Miller

    "(side _x == west)" problems

    I figured this when I was making it and checking the WIKI for sides, but I don't think this would be an issue. Thanks anyway though!
  16. T. Miller

    "(side _x == west)" problems

    I tested it in Multiplayer too now with playableUnits, still didn't work. Since all players only have one life (and move to BIS spectator if they die) it wouldnt be a problem to use playableUnits. Let me post all the relevent code: init.sqf _nil=[]execVM "enemyMarkerBlufor.sqf"; _nil=[]execVM "enemyMarkerOpfor.sqf"; enemyMarkerBlufor.sqf : { if ((side _x) == west) then { spawn { _OHVT_Mk createMarkerLocal ["HVT", getMarkerPos "MarkerSpawn"]; _OHVT_Mk setMarkerShapeLocal ["ICON"]; _OHVT_Mk setMarkerTypeLocal ["o_unknown"]; _OHVT_Mk setMarkerColorLocal "ColorEAST"; while {alive O_VIP} do { _OHVT_Mk setMarkerPosLocal getPos O_VIP; _interval = 5 //"round (random 270) + 30;" maybe sleep _interval; }; }; }; } foreach playableUnits; enemyMarkerOpfor.sqf : { if ((side _x) == east) then { spawn { _BHVT_Mk createMarkerLocal ["HVT", getMarkerPos "MarkerSpawn"]; _BHVT_Mk setMarkerShapeLocal ["ICON"]; _BHVT_Mk setMarkerTypeLocal ["b_unknown"]; _BHVT_Mk setMarkerColorLocal "ColorWEST"; while {alive B_VIP} do { _BHVT_Mk setMarkerPosLocal getPos B_VIP; _interval = 5 //"round (random 270) + 30;" maybe sleep _interval; }; }; }; } foreach playableUnits; Explanation : Using the lines in the init to call the script when player joins. Should I maybe use 'initplayerlocal.sqf' to skip all this, together with replacing '((side _x) == west)' with '(player == west)'? Maybe use 'initserver.sqf, probably not though. If I'd do it the way you posted, where would I call what code? (Also keep in mind that I'm testing this on a hosted server, and won't be played off of that.) Guess the client code would look like this: createEnemyMarkerFunc = { if (playerSide == west) then { _OHVT_Mk createMarkerLocal ["HVT", getMarkerPos "MarkerSpawn"]; _OHVT_Mk setMarkerShapeLocal ["ICON"]; _OHVT_Mk setMarkerTypeLocal ["o_unknown"]; _OHVT_Mk setMarkerColorLocal "ColorEAST"; while {alive O_VIP} do { _OHVT_Mk setMarkerPosLocal getPos O_VIP; _interval = round (random 270) + 30; sleep _interval; }; }; if (playerSide == east) then { _BHVT_Mk createMarkerLocal ["HVT", getMarkerPos "MarkerSpawn"]; _BHVT_Mk setMarkerShapeLocal ["ICON"]; _BHVT_Mk setMarkerTypeLocal ["b_unknown"]; _BHVT_Mk setMarkerColorLocal "ColorWEST"; while {alive B_VIP} do { _BHVT_Mk setMarkerPosLocal getPos B_VIP; _interval = round (random 270) + 30; sleep _interval; }; }; }; Where would I call the server code, and what would that be in this case?
  17. T. Miller

    lnbAddRow variable usage

    Solved, figured I had to use lnbSetValue and lnbValue.
  18. Hello everyone, I am creating a store-dialog. Using a 'listnbox' I list all the things that are up for sale. The layout of the store is - as seen in this picture - the following: <weapon> <price> <amount> The way I am creating this is using the command lnbAddRow. MILstore_setContent.sqf while {dialogStatus == 0;} do { if (CategoryIndex == 0) then { lnbClear 1500; lnbAddRow [1500,["P07 9 mm","$600","0"]]; lnbAddRow [1500,["4-five .45","$900","0"]]; lnbAddRow [1500,["Vermin SMG .45 ACP","$1200","0"]]; lnbAddRow [1500,["SDAR 5.56 mm","$1400","0"]]; lnbAddRow [1500,["MXC 6.5 mm","$1400","0"]]; lnbAddRow [1500,["MXC 6.5 mm (Black)","$1400","0"]]; lnbAddRow [1500,["MX 6.5 mm","$1700","0"]]; lnbAddRow [1500,["MX 6.5 mm (Black)","$1700","0"]]; lnbAddRow [1500,["MX 3GL 6.5 mm","$2100","0"]]; lnbAddRow [1500,["MX 3GL 6.5 mm (Black)","$2100","0"]]; lnbAddRow [1500,["MX SW 6.5 mm","$1900","0"]]; lnbAddRow [1500,["MX SW 6.5 mm (Black)","$1900","0"]]; lnbAddRow [1500,["MXM 6.5 mm","$1800","0"]]; lnbAddRow [1500,["MXM 6.5 mm (Black)","$1800","0"]]; lnbAddRow [1500,["Mk-I EMR 7.62mm (Black)","$2600","0"]]; lnbAddRow [1500,["Mk-I EMR 7.62mm (Khaki)","$2600","0"]]; lnbAddRow [1500,["Mk-I EMR 7.62mm (Sand)","$2600","0"]]; lnbAddRow [1500,["Mk-I EMR 7.62mm (Camo)","$2600","0"]]; lnbAddRow [1500,["Mk-I EMR 7.62mm (Woodland)","$2600","0"]]; lnbAddRow [1500,["MAR-10 .338 (Black)","$3150","0"]]; lnbAddRow [1500,["MAR-10 .338 (Camo)","$3150","0"]]; lnbAddRow [1500,["MAR-10 .338 (Sand)","$3150","0"]]; lnbAddRow [1500,["SPMG .338 (MTP)","$4600","0"]]; lnbAddRow [1500,["SPMG .338 (Black)","$4600","0"]]; lnbAddRow [1500,["SPMG .338 (Sand)","$4600","0"]]; lnbAddRow [1500,["PCML","$2800","0"]]; lnbAddRow [1500,["Titan MPRL Compact","$3100","0"]]; lnbAddRow [1500,["Titan MPRL Launcher","$3100","0"]]; waitUntil {CategoryIndex != 0;}; }; if (CategoryIndex == 1) then { lnbClear 1500; lnbAddRow [1500,["9mm 16Rnd Mag","$2100","0"]]; lnbAddRow [1500,["9mm 30Rnd Mag","$2100","0"]]; lnbAddRow [1500,[".45 ACP 11Rnd Mag","$4600","0"]]; lnbAddRow [1500,[".45 ACP 30Rnd Vermin Mag","$4600","0"]]; lnbAddRow [1500,["5.56mm 30rnd STANAG Mag","$2800","0"]]; lnbAddRow [1500,["5.56mm 30rnd Tracer (Red) Mag","$3100","0"]]; lnbAddRow [1500,["5.56mm 20Rnd Dual Purpose Mag","$3100","0"]]; lnbAddRow [1500,["6.5mm 30Rnd STANAG Mag","$600","0"]]; lnbAddRow [1500,["6.5mm 30Rnd Tracer (Red) Mag","$900","0"]]; lnbAddRow [1500,["6.5mm 100Rnd Belt Case","$1700","0"]]; lnbAddRow [1500,["6.5mm 100Rnd Tracer (Red) Belt Case","$1700","0"]]; lnbAddRow [1500,["7.62mm 20Rnd Mag","$1400","0"]]; lnbAddRow [1500,[".338 LM 10Rnd Mag","$4600","0"]]; lnbAddRow [1500,[".338 NM 130Rnd Belt","$4600","0"]]; lnbAddRow [1500,[".408 7Rnd LRR Mag","$1400","0"]]; lnbAddRow [1500,["PCML Missile","$1900","0"]]; lnbAddRow [1500,["Titan AP Missile","$4600","0"]]; lnbAddRow [1500,["Titan AT Missile","$4600","0"]]; lnbAddRow [1500,["Titan AA Missile","$4600","0"]]; lnbAddRow [1500,["40mm HE Grenade Round","$1900","0"]]; lnbAddRow [1500,["Smoke Round (White)","$1800","0"]]; lnbAddRow [1500,["Smoke Round (Red)","$3150","0"]]; lnbAddRow [1500,["Smoke Round (Green)","$3150","0"]]; lnbAddRow [1500,["Smoke Round (Yellow)","$2600","0"]]; lnbAddRow [1500,["Smoke Round (Purple)","$2600","0"]]; lnbAddRow [1500,["Smoke Round (Blue)","$4600","0"]]; lnbAddRow [1500,["Smoke Round (Orange)","$4600","0"]]; lnbAddRow [1500,["Flare Round (White)","$4600","0"]]; lnbAddRow [1500,["Flare Round (Green)","$4600","0"]]; lnbAddRow [1500,["Flare Round (Red)","$4600","0"]]; lnbAddRow [1500,["Flare Round (Yellow)","$4600","0"]]; lnbAddRow [1500,["Flare Round (IR)","$4600","0"]]; lnbAddRow [1500,["40mm 3Rnd HE Grenade","$1800","0"]]; lnbAddRow [1500,["3Rnd 3GL Smoke Rounds (White)","$1200","0"]]; lnbAddRow [1500,["3Rnd 3GL Smoke Rounds (Red)","$3150","0"]]; lnbAddRow [1500,["3Rnd 3GL Smoke Rounds (Green)","$2600","0"]]; lnbAddRow [1500,["3Rnd 3GL Smoke Rounds (Yellow)","$2600","0"]]; lnbAddRow [1500,["3Rnd 3GL Smoke Rounds (Purple)","$2600","0"]]; lnbAddRow [1500,["3Rnd 3GL Smoke Rounds (Blue)","$4600","0"]]; lnbAddRow [1500,["3Rnd 3GL Smoke Rounds (Orange)","$4600","0"]]; lnbAddRow [1500,["3Rnd 3GL Flares (White)","$4600","0"]]; lnbAddRow [1500,["3Rnd 3GL Flares (Green)","$4600","0"]]; lnbAddRow [1500,["3Rnd 3GL Flares (Red)","$4600","0"]]; lnbAddRow [1500,["3Rnd 3GL Flares (Yellow)","$4600","0"]]; lnbAddRow [1500,["3Rnd 3GL Flares (IR)","$4600","0"]]; lnbAddRow [1500,["RGO Grenade","$4600","0"]]; lnbAddRow [1500,["RGN Grenade","$4600","0"]]; lnbAddRow [1500,["Smoke Grenade (White)","$4600","0"]]; lnbAddRow [1500,["Smoke Grenade (Red)","$4600","0"]]; lnbAddRow [1500,["Smoke Grenade (Green)","$4600","0"]]; lnbAddRow [1500,["Smoke Grenade (Yellow)","$4600","0"]]; lnbAddRow [1500,["Smoke Grenade (Purple)","$4600","0"]]; lnbAddRow [1500,["Smoke Grenade (Blue)","$4600","0"]]; lnbAddRow [1500,["Smoke Grenade (Orange)","$4600","0"]]; lnbAddRow [1500,["Chemlight (Green)","$4600","0"]]; lnbAddRow [1500,["IR Grenade [NATO]","$4600","0"]]; lnbAddRow [1500,["Designator Batteries","$4600","0"]]; lnbAddRow [1500,["APERS Mine","$4600","0"]]; lnbAddRow [1500,["APERS Bounding Mine","$4600","0"]]; lnbAddRow [1500,["AT Mine","$4600","0"]]; lnbAddRow [1500,["Explosive Charge","$4600","0"]]; lnbAddRow [1500,["Explosive Satchel","$4600","0"]]; waitUntil {CategoryIndex != 1;}; }; }; MILstore_onPlus.sqf _index = lbCurSel 1500; //to find the selected option in the listnbox _amount = ((findDisplay 1) displayCtrl 1500) lnbText [_index,2]; //to find the third row, the "0" that I put in using lnbAddRow, figured that I need that to be able to change it, eventhough it is not a variable. How do I make the <amount> a variable which I can change using other scripts? I tried using ["%1", PD7_count] instead of "0", but it didn't work out. Any help/example on how to make this number/text a variable, changeable using my + and - buttons? Thanks in advance.
×