Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

7 Neutral

About ribera1945e

  • Rank
    Private First Class

Recent Profile Visitors

733 profile views
  1. I created the mission using a script in an environment with add-ons in place. However, when testing in multiplayer, when I place a BRUFOR AI unit group in ZEUS and have them attack the AO, it crashes with access violations in the middle of the mission. This is the same on both dedicated and hosted servers. I am new to scripting and with the help of a friend I created a mission but could not find the cause of the crash. I would like to ask everyone to help me debug this mission. Here is the zip of the mission and the add-on preset html we are using Thanks.
  2. I am a little saddened. I'm going to give up.
  3. I am now trying to figure out how to override cfgworlds in description.ext. If clutterGrid = 0 the grass clutter should be invisible, but my mission still has grass. Can't I manipulate the grass clutter config in cfgworlds? class cfgworlds { class Desert_E { clutterGrid = 0; }; };
  4. I want to get rid of grass clutter altogether by scripting.
  5. I am looking for a way to remove grass clutter in a very large area with low load. The method of placing a large number of grass cutters is too heavy. The map is being tested in the CUP desert. Is there any way to do this?
  6. Apparently I was writing unnecessary processing. If you change the processing of the initial value, JIP will also be synchronized. I've finally got the code to work as intended in JIP-enabled multiplayer, so I'll share it: /*----------------------------------------------------------------------------------- Script: liveFeedUAV Description: UAVのカメラフィードバックをモニターオブジェクトに行う。 Parameters: _monitor - <OBJECT> フィードバック再生とaddActionを行うオブジェクト Return: Nothing Examples: (in initPlayerLocal.sqf) nul = [yourMonitor] execVM "scripts\liveFeedUAV1.sqf"; (in init.sqf) [missionNamespace, "arsenalClosed", { [yourMonitor] execVM "scripts\liveFeedUAV1.sqf"; }] call BIS_fnc_addScriptedEventHandler; ["ace_arsenal_displayClosed", { [yourMonitor] execVM "scripts\liveFeedUAV1.sqf"; }] call CBA_fnc_addEventHandler; Author: ribera1945eBP -----------------------------------------------------------------------------------*/ params ["_monitor"]; if (isNull _monitor) exitWith {}; sleep 1; if (localNamespace getVariable ["liveFeedUAV1done", false]) exitWith { _cam1 = (localNamespace getVariable "cam1"); _cam1 cameraEffect ["Internal", "Back", "uavrtt1"]; }; _monitor setObjectTexture [0, "#(argb,512,512,1)r2t(uavrtt1,1)"]; _cam1 = "camera" camCreate [0,0,0]; _cam1 cameraEffect ["Internal", "Back", "uavrtt1"]; _cam1 attachTo [MQ_1, [0,0,0], "PiP0_pos"]; localNamespace setVariable ["cam1", _cam1]; liveFeedUAV1cams = []; fnc_selectZoom = { private _sZoom = _this select 0; private _cam1 = _this select 1; switch (_sZoom) do { case "ULTRA WIDE": { missionNamespace setVariable ["zoomLevel", 0.46599999, true]; }; case "WIDE": { missionNamespace setVariable ["zoomLevel", 0.2, true]; }; case "MEDIUM": { missionNamespace setVariable ["zoomLevel", 0.1, true]; }; case "NARROW": { missionNamespace setVariable ["zoomLevel", 0.02, true]; }; case "NARROWER": { missionNamespace setVariable ["zoomLevel", 0.01, true]; }; }; }; fnc_selectMode = { private _sMode = _this select 0; switch (_sMode) do { case "DTV": { missionNamespace setVariable ["camMode", [0], true]; }; case "NV": { missionNamespace setVariable ["camMode", [1], true]; }; case "WHOT": { missionNamespace setVariable ["camMode", [2], true]; }; case "BHOT": { missionNamespace setVariable ["camMode", [7], true]; }; }; }; { private _actionTitle = format ["Select Zoom - %1",_x]; _monitor addAction [ _actionTitle, { private _Value = _this select 3 select 0; [_Value, (localNamespace getVariable "cam1")] call fnc_selectZoom; }, [_x],3.3,true,false,"","",8 ]; } forEach ["ULTRA WIDE", "WIDE", "MEDIUM", "NARROW", "NARROWER"]; { private _actionTitle = format ["Select Mode - %1",_x]; _monitor addAction [ _actionTitle, { private _Value = _this select 3 select 0; [_Value] call fnc_selectMode; }, [_x],3.3,true,false,"","",8 ]; } forEach ["DTV", "NV", "WHOT", "BHOT"]; localNamespace setVariable ["liveFeedUAV1done", true]; 0 = liveFeedUAV1cams pushBack [localNamespace getVariable "cam1"]; addMissionEventHandler ["Draw3D", { { _cam1 = _x select 0; _dir = (MQ_1 selectionPosition "laser_start") vectorFromTo (MQ_1 selectionPosition "laser_end"); _cam1 setVectorDirAndUp [ _dir, _dir vectorCrossProduct [-(_dir select 1), _dir select 0, 0] ]; _cam1 camSetFov (missionNamespace getVariable ["zoomLevel", 0.46599999]); "uavrtt1" setPiPEffect (missionNamespace getVariable ["camMode", [0]]); } count liveFeedUAV1cams; }]; There is still a possibility of optimization, but this is the end for the time being. @7erra @pierremgi Thanks for teaching me a lot!
  7. Thank you for the detailed lecture. I thought that everything would work if remoteExec was done. Please forgive the script rookie. Now I'm running camSetFov and setPiPEffect in Draw3D. This works as intended in multiplayer. However, JIP still seems to be loading the initial values of zoomLevel and camMode. I want to borrow your wisdom once again. Thanks.
  8. That's exactly what I'm looking for. Everyone should have the same picture regardless of who set it. fnc_selectZoom is currently only run by the server, does that mean cam1 doesn't match that of the local machines? Also, does cam1 need to be private? Thanks.
  9. @7erra Thank you for your reply. I wrote !IsServer at the beginning to prevent addAction from running on all machines. I modified the code based on your point: But fnc_selectZoom stopped working in preview. I don't get an error, but camSetFov doesn't seem to recognize cam1. What should I do?
  10. Hello. I am making a PiP script that runs on a dedicated server. It works as intended in the preview, but not in multiplayer. Below is the code: I have implemented zoom and PiPEffect change functions using addAction, but changes to the monitor are not synchronized in multiplayer. Thanks.
  11. ribera1945e

    [solved]PiP script and arsenal

    Thank you for your reply. Your code helped me understand the code delays in arma3. I solve the problem by simply adding sleep 1 to my code. thank you for your politeness.
  12. ribera1945e

    [solved]PiP script and arsenal

    It works in the debug console but not in the if statement. Help me
  13. ribera1945e

    [solved]PiP script and arsenal

    I gave up on how to execute code inside an event handler. Instead, I succeeded in calling liveFeedUAV1.sqf from init.sqf with pierremgi's code. But another problem arose. I limited the code with exitWith to avoid multiple execution of all the code in liveFeedUAV1.sqf, but cameraEffect and camCreate are not working with the following syntax. if (missionNamespace getVariable ["liveFeedUAV1done", false] isEqualTo true) exitWith { cam1 cameraEffect ["TERMINATE", "BACK"]; camDestroy cam1; cam1 = "camera" camCreate [0,0,0]; cam1 cameraEffect ["Internal", "Back", "uavrtt1"]; cam1 camSetFov 0.46599999; "uavrtt1" setPiPEffect [0]; cam1 attachTo [MQ_1, [0,0,0], "PiP0_pos"]; }; I think the if statement is correct as it works when I run hint in the syntax. Maybe I overlook something? Thanks.
  14. ribera1945e

    [solved]PiP script and arsenal

    After the screen goes black, run the following code on the server to restore the monitor. isNil { cam1 cameraEffect ["TERMINATE", "BACK"]; camDestroy cam1; cam1 = "camera" camCreate [0,0,0]; cam1 cameraEffect ["INTERNAL", "BACK", "uavrtt1"]; cam1 attachTo [MQ_1, [0,0,0], "PiP0_pos"]; }; Is it possible for the event handler to not recognize the variable name?
  15. ribera1945e

    [solved]PiP script and arsenal

    I ran it globally with init.sqf, but it had no effect. I also tried the following syntax to regenerate cam1 but it didn't work. //PIP arsenal proof [missionNamespace, "arsenalClosed", { isNil { cam1 cameraEffect ["TERMINATE", "BACK"]; camDestroy cam1; cam1 = "camera" camCreate [0,0,0]; cam1 cameraEffect ["INTERNAL", "BACK", "uavrtt1"]; cam1 attachTo [MQ_1, [0,0,0], "PiP0_pos"]; }; }] call BIS_fnc_addScriptedEventHandler;