Jump to content

d3nn16

Member
  • Content Count

    319
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by d3nn16

  1. Hi I have to decide between creating a script to test if player is in a specific area (with a specific shape : rectangle, ellipse) and using "player in thisList" in a trigger. And I need something to check tens of different areas with different shapes at once. Anyone knows which solution is best for performance and why ? how is a trigger implemented in the game ?
  2. When I put a mission folder in my MPMissions folder (profile folder) and I start a hosted server I get 2 lines with "Item , listed twice". When I remove the folder and put another mission folder I have no more "Item , listed twice" lines added in arma2.RPT file. Anyone knows what can cause this message ? ---------- Post added at 04:49 PM ---------- Previous post was at 04:35 PM ---------- I could isolate the problem in stringtable.csv file : I had only one language (LANGUAGE,English) on top of file and the end of file I had one line with 5 translations (STR_XXX,"translation1","translation2","translation3","translation4","translation5")
  3. I explain how to set a server on the same PC here :http://forums.bistudio.com/showthread.php?t=82004 To avoid being kicked you need to use reportIp = "<>"; in one of the server files. Just download server.zip archive (link in post above)
  4. This script is from my ctf template. It only works with human players but I think it can be adjusted for AI too. Markers BASE_EAST_1, ..., BASE_WEST_1, ..., GAME_AREA_1, ... Look how it's done and adjust to your needs. //////////VARIABLES //////////////////////////////////////////////////////////////////////////////// MARK_GAMEAREAS = true; MARK_SPAWNAREAS_WEST = true; MARK_SPAWNAREAS_EAST = true; SPAWNAREAS_WEST = []; SPAWNAREAS_EAST = []; GAMEAREAS = []; F_ROTATION = { private ["_p_dir", "_x", "_y", "_x_2", "_y_2"]; _p_dir = _this select 2; _x = ((_this select 0) select 0) - ((_this select 1) select 0); _y = ((_this select 0) select 1) - ((_this select 1) select 1); _x_2 = _x * (cos _p_dir) + _y * (sin _p_dir); _y_2 = -1 * _x * (sin _p_dir) + _y * (cos _p_dir); [_x_2 + ((_this select 1) select 0), _y_2 + ((_this select 1) select 1)] }; F_BORDERS = { private [ "_p_base_areas", "_p_game_areas", "_p_obj", "_p_step", "_idx_limit", "_f_ingamearea", "_idx_area", "_center", "_w", "_h", "_d", "_rect", "_i", "_x_strt", "_y_strt", "_x_end", "_y_end", "_x", "_y", "_obj_pos", "_obj", "_angle_step", "_prev_obj_pos", "_tmp", "_x_tan", "_y_tan" ]; _p_base_areas = _this select 0; _p_game_areas = _this select 1; _p_obj = _this select 2; _p_step = _this select 3; _idx_limit = (count _p_base_areas); _f_ingamearea = { private [ "_p_obj_pos", "_p_idx_area", "_p_idx_limit", "_res", "_idx_area", "_center", "_w", "_h", "_d", "_rect", "_x_min", "_x_max", "_y_min", "_y_max", "_p_obj_pos_2" ]; _p_obj_pos = _this select 0; _p_idx_area = _this select 1; _p_idx_limit = _this select 2; _res = true; if (surfaceIsWater [_p_obj_pos select 0, _p_obj_pos select 1]) exitWith {_res = false; _res}; _idx_area = 0; { scopeName "loop"; if (_idx_area != _p_idx_area) then { _center = position _x; _w = triggerArea _x select 0; _h = triggerArea _x select 1; _d = triggerArea _x select 2; _rect = triggerArea _x select 3; if (_rect) then // rectangle { _x_min = (_center select 0) - _w; _x_max = (_center select 0) + _w; _y_min = (_center select 1) - _h; _y_max = (_center select 1) + _h; _p_obj_pos_2 = [_p_obj_pos, _center, -_d] call F_ROTATION; if ( ((_p_obj_pos_2 select 0) >= _x_min) && ((_p_obj_pos_2 select 0) <= _x_max) && ((_p_obj_pos_2 select 1) >= _y_min) && ((_p_obj_pos_2 select 1) <= _y_max) ) then { if (_idx_area < _p_idx_limit) then { _res = false; breakOut "loop"; } else { _res = true; breakOut "loop"; }; } else { if (_idx_area >= _p_idx_limit) then { _res = false; }; }; } else { if (_w == _h) then // circle { if ((_p_obj_pos distance _center) <= _w) then { if (_idx_area < _p_idx_limit) then { _res = false; breakOut "loop"; } else { _res = true; breakOut "loop"; }; } else { if (_idx_area >= _p_idx_limit) then { _res = false; }; }; } else // ellipse { _p_obj_pos_2 = [_p_obj_pos, _center, -_d] call F_ROTATION; if ( ( ((((_p_obj_pos_2 select 0) - (_center select 0)) / _w) ^ 2) + ((((_p_obj_pos_2 select 1) - (_center select 1)) / _h) ^ 2) ) <= 1 ) then { if (_idx_area < _p_idx_limit) then { _res = false; breakOut "loop"; } else { _res = true; breakOut "loop"; }; } else { if (_idx_area >= _p_idx_limit) then { _res = false; }; }; }; }; }; _idx_area = _idx_area + 1; } forEach (_p_base_areas + _p_game_areas); _res }; _idx_area = 0; { _center = position _x; _w = triggerArea _x select 0; _h = triggerArea _x select 1; _d = triggerArea _x select 2; _rect = triggerArea _x select 3; if (_rect) then // rectangle { _x_strt = (_center select 0) - _w; _x_end = (_center select 0) + _w; _y = (_center select 1) + _h; for "_i" from _x_strt to _x_end step _p_step do // top { _obj_pos = [[_i, _y], _center, _d] call F_ROTATION; if ([_obj_pos, _idx_area, _idx_limit] call _f_ingamearea) then { _obj = _p_obj createVehicleLocal _obj_pos; _obj setPos _obj_pos; _obj setDir (_d + 180); }; }; _x_strt = (_center select 0) - _w; _x_end = (_center select 0) + _w; _y = (_center select 1) - _h; for "_i" from _x_strt to _x_end step _p_step do // bottom { _obj_pos = [[_i, _y], _center, _d] call F_ROTATION; if ([_obj_pos, _idx_area, _idx_limit] call _f_ingamearea) then { _obj = _p_obj createVehicleLocal _obj_pos; _obj setPos _obj_pos; _obj setDir _d; }; }; _y_strt = (_center select 1) - _h; _y_end = (_center select 1) + _h; _x = (_center select 0) - _w; for "_i" from _y_strt to _y_end step _p_step do // left { _obj_pos = [[_x, _i], _center, _d] call F_ROTATION; if ([_obj_pos, _idx_area, _idx_limit] call _f_ingamearea) then { _obj = _p_obj createVehicleLocal _obj_pos; _obj setPos _obj_pos; _obj setDir (_d + 90); }; }; _y_strt = (_center select 1) - _h; _y_end = (_center select 1) + _h; _x = (_center select 0) + _w; for "_i" from _y_strt to _y_end step _p_step do // right { _obj_pos = [[_x, _i], _center, _d] call F_ROTATION; if ([_obj_pos, _idx_area, _idx_limit] call _f_ingamearea) then { _obj = _p_obj createVehicleLocal _obj_pos; _obj setPos _obj_pos; _obj setDir (_d - 90); }; }; } else { if (_w == _h) then // circle { _angle_step = 2 * (asin ((_p_step / 2) / _w)); _x_strt = _center select 0; _y_strt = (_center select 1) + _w; for [{_i = 0}, {_i < 360}, {_i = _i + _angle_step}] do { _obj_pos = [[_x_strt, _y_strt], _center, _i] call F_ROTATION; if ([_obj_pos, _idx_area, _idx_limit] call _f_ingamearea) then { _obj = _p_obj createVehicleLocal _obj_pos; _obj setPos _obj_pos; _obj setDir (_i + 180); }; }; } else // ellipse { _prev_obj_pos = [0, 0]; if (_w > _h) then {_angle_step = 2 * (asin ((_p_step / 2) / _w)) * (_h / _w)} else {_angle_step = 2 * (asin ((_p_step / 2) / _h)) * (_w / _h)}; for "_i" from 0 to 360 step _angle_step do { _obj_pos = [ (_center select 0) + _w * (cos _i), (_center select 1) + _h * (sin _i) ]; if ((_prev_obj_pos distance _obj_pos) >= _p_step) then { _prev_obj_pos = _obj_pos; _tmp = sqrt ((_h ^ 2) * ((cos _i) ^ 2) + (_w ^ 2) * ((sin _i) ^ 2)); _x_tan = (-1 * _w * (sin _i)) / _tmp; _y_tan = (_h * (cos _i)) / _tmp; _obj_pos = [_obj_pos, _center, _d] call F_ROTATION; if ([_obj_pos, _idx_area, _idx_limit] call _f_ingamearea) then { _obj = _p_obj createVehicleLocal _obj_pos; _obj setPos _obj_pos; _obj setDir (_d + (_x_tan atan2 _y_tan) - 90); }; }; }; }; }; _idx_area = _idx_area + 1; } forEach _p_base_areas; }; //////////////////////////////////////////////////////////////////////////////// //////////CTF TRIGGERS, FLAG MARKERS //////////////////////////////////////////////////////////////////////////////// _m_name = ""; _m_color = if (markerType "respawn_west" != "") then { markerColor "respawn_west"; } else { if (markerType "respawn_west_1" != "") then { markerColor "respawn_west_1"; } else { "colorgreen"; }}; _i = 1; while {call compile format ["markerType 'BASE_WEST_%1' != ''", _i]} do { call compile format ["_m_name = 'BASE_WEST_%1'", _i]; _m_color = markerColor _m_name; _trig = createTrigger ["emptydetector", markerPos _m_name]; _trig setTriggerArea [markerSize _m_name select 0, markerSize _m_name select 1, markerDir _m_name, markerShape _m_name == "rectangle"]; _trig setTriggerActivation ["east", "present", true]; _trig setTriggerStatements ["vehicle player in thisList", "player setDamage 1", ""]; SPAWNAREAS_WEST = SPAWNAREAS_WEST + [_trig]; _i = _i + 1; }; _marker = createMarkerLocal ["FLAG_WEST", position FLAG_WEST]; _marker setMarkerShapeLocal "icon"; _marker setMarkerTypeLocal "flag1"; _marker setMarkerSizeLocal [1, 1]; _marker setMarkerColorLocal _m_color; if (markerType "respawn_east" != "") then { markerColor "respawn_east"; } else { if (markerType "respawn_east_1" != "") then { markerColor "respawn_east_1"; } else { "colorred"; }}; _i = 1; while {call compile format ["markerType 'BASE_EAST_%1' != ''", _i]} do { call compile format ["_m_name = 'BASE_EAST_%1'", _i]; _m_color = markerColor _m_name; _trig = createTrigger ["emptydetector", markerPos _m_name]; _trig setTriggerArea [markerSize _m_name select 0, markerSize _m_name select 1, markerDir _m_name, markerShape _m_name == "rectangle"]; _trig setTriggerActivation ["west", "present", true]; _trig setTriggerStatements ["vehicle player in thisList", "player setDamage 1", ""]; SPAWNAREAS_EAST = SPAWNAREAS_EAST + [_trig]; _i = _i + 1; }; _marker = createMarkerLocal ["FLAG_EAST", position FLAG_EAST]; _marker setMarkerShapeLocal "icon"; _marker setMarkerTypeLocal "flag1"; _marker setMarkerSizeLocal [1, 1]; _marker setMarkerColorLocal _m_color; _i = 1; while {call compile format ["markerType 'GAME_AREA_%1' != ''", _i]} do { call compile format ["_m_name = 'GAME_AREA_%1'", _i]; _trig = createTrigger ["emptydetector", markerPos _m_name]; _trig setTriggerArea [markerSize _m_name select 0, markerSize _m_name select 1, markerDir _m_name, markerShape _m_name == "rectangle"]; _trig setTriggerActivation ["any", "present", true]; _trig setTriggerStatements ["! (vehicle player in thisList) && alive player", "", ""]; GAMEAREAS = GAMEAREAS + [_trig]; _i = _i + 1; }; if (count GAMEAREAS > 0) then { _grp = createGroup sideLogic; _unit = _grp createUnit ["logic", [0, 0], [], 0, "none"]; _waypoint = _grp addWaypoint [[0, 0], 0]; _waypoint setWaypointType "and"; _waypoint setWaypointStatements ["true", "player setDamage 1"]; {_x synchronizeWaypoint [_waypoint]} forEach GAMEAREAS; _waypoint = _grp addWaypoint [[0, 0], 0]; _waypoint setWaypointType "cycle"; }; if (MARK_SPAWNAREAS_WEST && count SPAWNAREAS_WEST > 0) then { [sPAWNAREAS_WEST, GAMEAREAS, "sign_mp_op", 10] spawn {call F_BORDERS}; }; if (MARK_SPAWNAREAS_EAST && count SPAWNAREAS_EAST > 0) then { [sPAWNAREAS_EAST, GAMEAREAS, "sign_mp_blu", 10] spawn {call F_BORDERS}; }; if (MARK_GAMEAREAS && count GAMEAREAS > 0) then { [GAMEAREAS, [], "sign_danger", 10] spawn {call F_BORDERS}; }; ////////////////////////////////////////////////////////////////////////////////
  5. Personally I use setVehicleInit in my C&H mission because I couldn't figure out any other solution to unload the default ammunition cargo from vehicles and still allow JIP players to see exactly what other players added/retrieved from ammo cargos. That is because clearWeaponCargo and clearMagazineCargo only have local effects. I use _v setVehicleInit "clearWeaponCargo; clearMagazineCargo"; processInitCommands on all vehicles that spawn. I think in general this problem affects missions that last many hours like Evolution. On a side note I noticed a possible problem with group objects not being deleted properly from game sometimes and still being present while having no units in them, a memory leak. I noticed it because I used allGroups command to display a list of all units sorted by groups in a dialog and I could see "Error : no unit" message instead of players names, even after checking my own group creating/deleting system was OK and refreshing the list. ---------- Post added at 11:33 PM ---------- Previous post was at 09:46 PM ---------- Pasting files contents here in case link to mission gets broken. description.ext respawn = "base"; respawnDelay = 5; disabledAI = 1; class Header { minPlayers = 1; maxPlayers = 1; }; #define _CT_STATIC_ 0 #define _CT_BUTTON_ 1 #define _CT_EDIT_ 2 #define _ST_LEFT_ 0 #define _ST_CENTER_ 2 #define _ST_LIST_ 0 #define _FONT_ "Zeppelin32" #define _FONTSIZE_ 0.025 #define _BLACK_ {0, 0, 0, 1} #define _GRAYDARK_ {0.3, 0.3, 0.3, 1} #define _GRAY_ {0.5, 0.5, 0.5, 1} #define _WHITE_ {1, 1, 1, 1} #define _ORANGERED_ {1, 0.4, 0, 1} #define _DIAG_X_ 0.05 #define _DIAG_Y_ 0.8 #define _DIAG_W_ 0.9 #define _DIAG_H_ 0.2 #define _DX_ 0.01 #define _DY_ 0.01 #define _BTN_W_ (_DIAG_W_ - 2 * _DX_) #define _BTN_H_ ((_DIAG_H_ - 3 * _DY_) / 2) #define _BTN_FONT_ _FONT_ #define _BTN_FONTSIZE_ _FONTSIZE_ #define _CONT_X_ _DIAG_X_ + _DX_ #define _CONT_Y_ _DIAG_Y_ + _DY_ class TEMPL_STATIC { idc = -1; moving = true; type = _CT_STATIC_; style = _ST_CENTER_; x = 0; y = 0; w = 0; h = 0; sizeEx = _FONTSIZE_; font = _FONT_; text = ""; colorText[] = _BLACK_; colorBackground[] = _WHITE_; }; class TEMPL_BUTTON { idc = -1; type = _CT_BUTTON_; style = _ST_CENTER_; x = 0; y = 0; w = _BTN_W_; h = _BTN_H_; sizeEx = _BTN_FONTSIZE_; font = _BTN_FONT_; text = ""; colorText[] = _ORANGERED_; colorBackground[] = _BLACK_; default = false; borderSize = 0; colorDisabled[] = _GRAY_; colorFocused[] = _GRAYDARK_; colorShadow[] = _ORANGERED_; colorBorder[] = _ORANGERED_; colorBackgroundActive[] = _GRAYDARK_; colorBackgroundDisabled[] = _GRAYDARK_; offsetX = 0; offsetY = 0.004; offsetPressedX = 0; offsetPressedY = 0.002; soundEnter[] = {}; soundPush[] = {}; soundClick[] = {}; soundEscape[] = {}; }; class TEMPL_EDIT { idc = -1; type = _CT_EDIT_; style = _ST_LEFT_; x = 0; y = 0; w = _BTN_W_; h = _BTN_H_; sizeEx = _FONTSIZE_; font = _FONT_; text = ""; colorText[] = _WHITE_; autocomplete = true; colorSelection[] = _BLACK_; }; class DIAG_OPTIONS { idd = 1; movingEnable = true; controlsBackground[] = {BACKGROUND, EDIT_SCRIPT_B}; controls[] = {EDIT_SCRIPT, BTN_OK}; objects[] = {}; class BACKGROUND : TEMPL_STATIC { idc = 30; x = _DIAG_X_; y = _DIAG_Y_; w = _DIAG_W_; h = _DIAG_H_; colorBackground[] = _BLACK_; }; class EDIT_SCRIPT : TEMPL_EDIT { idc = 10; x = _CONT_X_; y = _CONT_Y_; text = ""; }; class EDIT_SCRIPT_B : TEMPL_STATIC { idc = 11; x = _CONT_X_; y = _CONT_Y_; w = _BTN_W_; h = _BTN_H_; colorBackground[] = _ORANGERED_; }; class BTN_OK : TEMPL_BUTTON { idc = 20; x = _CONT_X_; y = _CONT_Y_ + _BTN_H_ + _DY_; text = "OK"; action = "call compile ctrlText 10"; }; }; init.sqf enableSaving [false, false]; if (! (isServer && isNull player)) then { waitUntil {! isNull player}; _trig = createTrigger ["emptydetector", [0,0,0]]; _trig setTriggerArea [0, 0, 0, false]; _trig setTriggerActivation ["none", "present", true]; _trig setTriggerStatements ["vehicle player != player", "VEHICLE_PLAYER = vehicle player; OPTIONS_IDX = VEHICLE_PLAYER addAction ['OPTIONS', 'options.sqf', 0, 0, false, true]", "VEHICLE_PLAYER removeAction OPTIONS_IDX"]; OPTIONS_IDX = player addAction ["OPTIONS", "options.sqf", 0, 0, false, true]; player addEventHandler [ "killed", { [] spawn { cutText ["", "black out"]; player removeAction OPTIONS_IDX; waitUntil {alive player}; OPTIONS_IDX = player addAction ["OPTIONS", "options.sqf", 0, 0, false, true]; cutText ["", "black in"]; }; } ]; }; if (isServer) then { "EXECS" addPublicVariableEventHandler { call (_this select 1); }; } else { "SERV_DONE" addPublicVariableEventHandler { hint (_this select 1); }; }; options.sqf createDialog "DIAG_OPTIONS"; mission.sqm version=11; class Mission { addOns[]= { "utes", "cacharacters2", "CAWheeled2_HMMWV_Ambulance", "CAWheeled2_MTVR", "CAWheeled2_Kamaz", "CAWheeled2_GAZ39371", "CAWheeled", "cawheeled2_m1114_armored", "CAWheeled3_M1030", "CATracked2_AAV", "CAWheeled2_LAV25", "CAWheeled2_BTR90", "CATracked", "cawheeled2_m998a2_avenger", "CATracked2_T90", "CATracked2_2S6M_Tunguska", "CAA10", "ca_air2_su25", "CAAir", "Arma2_Ka52", "CAAir2_UH1Y", "caweapons_ammoboxes" }; addOnsAuto[]= { "cacharacters2", "utes" }; randomSeed=2047616; class Intel { briefingName="DYNAMIC SCRIPT EXECUTION 1a"; briefingDescription="Eraser [ZDROB]"; startWeather=0.39999998; forecastWeather=0.25; year=2008; month=10; day=11; hour=14; minute=20; }; class Groups { items=2; class Item0 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={3151.3999,16.825634,4438.853}; id=0; side="EAST"; vehicle="RU_Soldier_Medic"; leader=1; skill=0.60000002; }; }; }; class Item1 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={3159.7507,16.41205,4436.7324}; id=1; side="EAST"; vehicle="RU_Soldier_SL"; player="PLAYER COMMANDER"; leader=1; skill=0.60000002; }; }; }; }; }; class Intro { addOns[]= { "utes" }; addOnsAuto[]= { "utes" }; randomSeed=16685155; class Intel { startWeather=0.40000001; forecastWeather=0.25; year=2008; month=10; day=11; hour=14; minute=20; }; }; class OutroWin { addOns[]= { "utes" }; addOnsAuto[]= { "utes" }; randomSeed=2031883; class Intel { startWeather=0.40000001; forecastWeather=0.25; year=2008; month=10; day=11; hour=14; minute=20; }; }; class OutroLoose { addOns[]= { "utes" }; addOnsAuto[]= { "utes" }; randomSeed=5245889; class Intel { startWeather=0.40000001; forecastWeather=0.25; year=2008; month=10; day=11; hour=14; minute=20; }; };
  6. addScore command doesn't work (EDIT:) on clients, only on servers (dedicated or hosted)
  7. I knew about the bug from http://community.bistudio.com/wiki/Talk:clearVehicleInit :cool:
  8. There is no command to be found in the test mission. You have to type commands you want to execute in the edit box that you open by selecting OPTIONS from action menu. Using this mission I did the following tests : created hmmwv, added init "toto=123", processinitcommands checked server : toto was correctly initialized exeuted clearVehicleinit on client; then processInitcommands to be sure reconnected to server : toto still initialized to 123 restarted mission and did same test again except I used EXECS to execute clearVehicleInit on server then i reconnected but still toto was initialized to 123 So executing clearVehicleInit (followed by processInitCommands just in case it is needed) had no effect whether this executes on client or server.
  9. Each time you use setVehicleInit the string gets longer (or there is an array of strings that gets bigger). And on top of all that when you delete a vehicle the init string is still transmitted to JIP players and executed. Imagine you create hundreds of vehicles dyanmically after mission started and you use setVehicleInit intensively on each vehicle. Could explain why some missions take alot of time to JIP into. Xeno use my mission to test clearVehicleInit, I did and for me the command didn't clear the vehicle's init. Maybe I am wrong in that case I would like to know how you use the command
  10. Why do people (in general beginners) want to put such a big structure in a tiny mission and the game engine can't hold so many players/AI anyway (or it can but goodbye performance) ? (I'm not saying that that's what you are trying to do galzohar) The best IMO would be to make multiple (MP) missions that would follow a story involving small parts of an army where only a few of the soldiers (a reasonable number that the game can handle properly) would take part in the small missions each time. Or another idea (I don't know exactly how MP campaign works), you have one single mission similar to Domination but you have 2 "player controlled" sides (or not). And you script the missions of each side so they match : for instance west company charlie attacks hill position in a confined area held by east company kilo, or depending on how many soldiers are present on each side you change the objectives accordingly. First objective of east players will be to position themselves in the area they have to defend. Then you trigger west objective they have to move in the area they have to attack. What I mean is that you control the flow of the operations on each side by script. Continuing with the example : when west players die attacking hill position they respawn at base leaving the rest of the team fight until a certain condition is met (only 3 soldiers left -> mission cancelled, or player commanding the operation cancles mission for example). Or another possibility they respawn in a reinforcements squad, once enough of them are inside it, maybe add some AI to get a full squad, you set them an objective to help the attacking company etc. And so the mission could be a persistent one where west and east fronts advance and withdraw as more and more operations are going on, one at a time. Each campaign would be unique going on forever (saving capability for MP missions). Would be a cool scenario what do all you think ? If anyone is interested in this mission idea I'm willing to help with scripts, and others could help with scenario or ideas.
  11. It took me 2 years before I could edit the mission I dreamed of playing since OFP : http://forums.bistudio.com/showthread.php?t=61954. And here is the result : http://zdrob.neuf.fr/maps/ch120z_battlefields_t2c.chernarus.zip Some time before ArmA 1 came out I had already edited a very simple C&H map (without respawn) in OFP. Nobody liked it because it didn't have respawn. After ArmA 1 came out I started learning to script with CTF maps. Took me around 1 year to master the language. And now I finished the mission in a total of roughly 1 month. Now I started converting the ctf template (I learned scripting language with it) and will make a DM template too.
  12. Nobody knows how to use the new type of listbox ?
  13. Hi I want to replace my current lists (CT_LIST 5) with 2D lists (CT_2DLIST? 102) but I can't find a way to make the horizontal scroll bar show. I tried adding rows (lnbAddRow and lnbAddArray commands) with text that is long enough to overflow outside of the list box but still the horizontal scroll bar doesn't show up as it happens with the vertical scroll bar (when you add too many rows to fit in the box the vertical scroll bar pops up). Does anyone know how to do it ? Thx in advance.
  14. d3nn16

    time limit

    a trigger with condition : time > param1 && param1 < 10000 activation : endmission "end1" or another possible solution : type : end1 condition : time > param1 && param1 < 10000 activation : forceEnd another one is to write in a init.sqf file in mission folder: if (param1 < 10000) then { [] spawn { while (time < param1) do {sleep 1}; endmission "end1"; }; }; yet another one in init.sqf file : _trig = createTrigger ["emptydetector", [0, 0]]; _trig setTriggerArea [0, 0, 0, false]; _trig setTriggerTimeout [param1, param1, param1, false]; _trig setTriggerType "end1"; _trig setTriggerActivation ["any", "present", false]; _trig setTriggerStatements ["true", "forceEnd", ""]; and all the other combinations ... :-)
  15. The first time I saw gamelogics was in OFP when I was studying a mission done by BIS people. The gamelogic was used to control the flow of the mission by giving it "move", "cycle", "and", "or" waypoints, and these waypoints were synchronized with triggers. It is a way to enforce a certain sequence in the activation of triggers. For example you place a gamelogic in editor and give it 2 move waypoints. Then you create 2 triggers, you sync first trigger with first waypoint and second trigger with second waypoint. The second trigger will activate after the first trigger even if its conditions are met (because he's synchronized with the second move waypoint of the gamelogic, and the gamelogic won't go to second move point until the first move waypoint is activated which in turn won't activate until the first trigger activates).
  16. I'm making a mission where players buy magazines. But for convenience I'm thinking of putting only silenced magazines because they work with both variants (normal/silenced) of weapons (SD weapons work only with SD mags). This way for instance when a player loads an ammo truck with mags he won't have to bother thinking how many normal/silenced mags to buy for the other players depending on what they will need. So is there a difference in effectiveness of the bullets if I use SD mags instead of normal mags ?
  17. In this case it is not possible to use silenced weapons because they only work with SD mags in ArmA 2 unlike ArmA 1.
  18. Hi I wanted to use addMagazine command to rearm a vehicle but it only adds magazines for the main turret. Does anyone know what is the code for the 'rearm at ammo truck' action ?
  19. Actually I am looking for something to add magazines individually so setVehicleAmmo isn't what I'm looking for. I think setVehicleAmmo is bugged because, after executing 'myvehicle setVehicleAmmo 0' any other setVehicleAmmo x (where x > 0) will not work.
  20. d3nn16

    Scripting

    I would like to have 2 scripting functions that allow to add magazines/weapons to all turrets in a vehicle not just the main turret as it is the case at the moment with addMagazine and addWeapon commands. For example : [vehicle, <turret path>] addWeaponTurret "weapon" [vehicle, <turret path>] addMagazineTurret "magazine" Other commands I'd like to have is setAmmo (complementary to ammo) which will set the number of rounds in the current magazine and maxAmmo which will return the max number of rounds of the current magazine. I also want to say the rearming system is bugged and needs some attention : addMagazine, addWeapon, clearMagazineCargo, clearWeaponCargo effects are not visible to JIP players; setVehicleAmmo 1 doesn't rearm vehicle if executed after setVehicleAmmo 0; ammo trucks only rearm current magazines in vehicles without adding the initial number of magazines; addMagazine can add an infinite amount of magazines to vehicle or soldier; Another solution would be to make vehicle weapon magazines as infantry weapon magazines : objects that can be put in a vehicle ammo cargo and taken from cargo to reload vehicle weapon.
  21. d3nn16

    custom controls

    Didn't find any answers for 'custom controls' section in Controls menu in this forum or on Google. Anyone knows what are these for ? 'use action 1' ... 'use action 20' seem to be some kind of actions but when I use the keys assigned to them I see no effect.
  22. d3nn16

    Black Screen(Recieving) Bug

    It didn't fix the problem for me. Hyrax, eenter do you have Vista ?
  23. d3nn16

    ArmA 2 Demo feedback

    I am having the same problem with this demo as I had with ArmA1 v1.14/v1.16 but this time it happens from the very few seconds in the game intro screen. The game ran smoothly for a few seconds/minutes while I was setting controls and then the game freezed and the HDD led went on indefinitely and I had to reset the computer. Tried different optimizations with same result. In ArmA1 I could play missions because freezing occurred while I was moving fast in an airplane or helicopter most of the time. A solution I found was to increase view distance around 4000, it did block for a few seconds but it didn't freeze computer completely. WinXP, arma2demo and pagefile (4GB) on different partitions on same new HDD HDD WD3200AAJB 320GB (there's a second HDD, the old one, set as slave) Intel P4 3.2 GHz HyperThreading (2 logical processors) 2GB RAM ASUSTek P4SD-VL Intel i865PE nvidia GeForce 7800 GS 256MB (AGP 8x)
×