Jump to content

Tom212

Member
  • Content Count

    29
  • Joined

  • Last visited

  • Medals

Everything posted by Tom212

  1. I've been running a Zeus campaign and up until recently my selection of mods worked fine. I like to use a virtual Zeus entity due to the nature of my campaign and I have had issues launching the Zeus interface when on our dedicated server so I now ensure I tick forced Zeus interface in the curator module. While working on a new mission I found that I would be faced with a black screen upon mission start when selecting the Forced Interface Zeus entity. I had introduced a few new mods so I reverted to the previous setup and attempted to run a previous mission that had worked fine, the same issue occurred. I found that in some cases if I returned to the lobby and then joined in progress it would resolve the issue, but in many cases I end up as the Zeus entity but without the Zeus interface, and pressing 'y' simply won't launch it. I've tried incrementally introducing mods to see when the issue occurs, but it's proven hard to isolate because it seems to be intermittent at lower mod counts. I just encountered it when moving from mod loadout a to b: Mod Loadout A: CBA CUP Terrains Core Northern Fronts Terrains IFA3_AIO_LITE Zeus Enhanced Mod Loadout B: CBA CUP Terrains Core Northern Fronts Terrains IFA3_AIO_LITE Zeus Enhanced ace ace 3 extension (animations and actions) acex task_force_radio zeus enhanced - ace3 compatibility I checked all of the additional mods in Loadout B for updates and none have been updated recently so I'm not sure why they would be causing issues now. Tomorrow I will continue to narrow that selection down to see if it is indeed one single mod causing the issue but for now I hoped anyone could look over the logs to see if there's perhaps some other reason I'm overlooking as I'm not convinced it's a mod causing this due to it suddenly appearing despite no new updates. This is a log of a successful mission start mod loadout A: https://pastebin.com/ERkv6eXj This is a log of a black screen mission start with mod loadout B: https://pastebin.com/eGsgZjXV For what it's worth I also found this thread and tried the solution offered by Rattler but it didn't seem to have any effect. Greatly appreciate any help offered, been pulling my hair out over this one all weekend 😞
  2. Hey all, I've written some scripts that accept objects as parameters but if I try to execute them inside an object's init while parsing 'this' I get undeclared variable errors. Is there anyway around this? Thanks in advance!
  3. Thanks for the responses, ah okay cool I see now, thanks for the help.
  4. I'm running this in the init line of an object. Attempting to hand over 'this' as a parameter to be used inside of hackingDevice.sqf. The scripts themselves work fine, I know this because I've been using them up until now using declared variables instead of magic variables and they function as expected, I haven't shared those to avoid confusion. My question is specifically regarding the use of the 'this' magic variable as a parameter. this addAction ["Hack Dish", {[this, 0.4, "scripts\Hacking\Outcomes\dishHacked.sqf"] execVM "scripts\Hacking\hackingDevice.sqf";}, nil, 1.5, false, true, "", "true", 5];
  5. Hi all, I'm currently working on a system that uses Killzone Kid's UAV to r2t tutorial as a basis: http://killzonekid.com/arma-scripting-tutorials-uav-r2t-and-pip/ I succeeded in what I was hoping to achieve, I've got TV's that can cycle through the feeds of various UAV's. These UAV's have an action that allows them to lock their camera's focus to their laser target. This means that their feed shows the targeted position without a gunner being active, allowing TV's to be setup to show particular points of interest on the fly during the mission. However, I hit a small problem. It appears that switching camera messes with the cameras/procedural textures I've setup and I'm not sure why. I first noticed that entering and exiting the arsenal would break all the camera feeds, they would just stream as black. I found that this could be resolved by running the script that setup the UAV cameras again so I added an action to the arsenal allowing players to 'fix tv feeds'. The code that sets up the cameras is as follows: //Spawns camera and streams to render surface. Cam1 = "camera" camCreate [0,0,0]; Cam1 cameraEffect ["Internal", "Back", "uav1rt"]; //Attaches the Camera to the UAV gunner position. Cam1 attachTo [UAV1, [0,0,0], "PiP0_pos"]; //Makes the camera zoom in a bit. Cam1 camSetFov 0.1; //Sets camera to normal display. "uav1rt" setPiPEffect [0]; Cam1Handler = addMissionEventHandler ["Draw3D", { _dir = (UAV1 selectionPosition "PiP0_pos") vectorFromTo (UAV1 selectionPosition "PiP0_dir"); Cam1 setVectorDirAndUp [ _dir, _dir vectorCrossProduct [-(_dir select 1), _dir select 0, 0] ]; }]; UAV1 addAction ["Set Focus On Laser", {[UAV1, UAV1FocusObj] remoteExec ["FNC_FocusOnLaser", 0, true];}, nil, 1.5, false, true, "", "true", 0.1]; UAV1 addAction ["Reset Focus", {[UAV1] remoteExec ["FNC_ResetFocus", 0, true];}, nil, 1.5, false, true, "", "true", 0.1]; Not ideal but a fine duct tape fix. But then a larger issue was met when I tested with Zeus. Changing camera into/out of Zeus broke the camera feeds like the Arsenal did, running the above code again did seem to fix the camera feeds but created a nasty side effect that caused the Zeus camera to no longer run smooth, it would just jut around updating position only every few seconds in response to my input. Using comments I tried to debug the exact command that caused this and deducted that it was cameraEffect. The BIS page for cameraEffect has the following warning which I feel is probably the issue, I just don't really understand it as I'm new to alot of these features: "One cannot mix and match cameraEffect and can either have multiple r2t cameras or a single camera for the whole screen. If one needs a background stream overlayed with r2t streams, this could be achieved by creating an object and using switchCamera to switch to it for background image, while using cameraEffect for r2t overlay (see Example 4)" I'd highly appreciate it if people could help explain this issue in more detail/help me understand the above warning, or otherwise suggest a fix. Thanks for reading and your time.
  6. The Reddit post was useful as it pointed me in the direction of an event handler I could use to hook up the tv's again after exiting the arsenal so thanks. Having reread the warning on the cameraEffect page I don't think it's possible to have r2t cameras active while in the zeus interface as it's a 'single camera for the whole screen': One cannot mix and match cameraEffect and can either have multiple r2t cameras or a single camera for the whole screen. If one needs a background stream overlayed with r2t streams, this could be achieved by creating an object and using switchCamera to switch to it for background image, while using cameraEffect for r2t overlay (see Example 4) If anyone has some suggestions on methods of circumventing this I'd appreciate them :).
  7. Thanks that's a much more elegant solution to my first problem. cameraEffect is still messing with my Zeus camera however. Thanks Jason, I'll take a look at that seems super relevant!
  8. Hi, I'm having the following issue with remote Exec. In my initServer file I have the following code: FNC_SetupBunkerDoors = compile loadFile "scripts\bunkerDoors.sqf"; remoteExec ["FNC_SetupBunkerDoors"]; 'bunkerDoors.sqf contains the following code': BunkerAlphaInteriorDoor addAction ["Exit Bunker", {[player, BunkerAlphaExterior]execVM "scripts\doorTravel.sqf"}, nil, 1.5, true, true, "", "true", 4]; BunkerAlphaExteriorDoor addAction ["Enter Bunker", {[player, BunkerAlphaInterior]execVM "scripts\doorTravel.sqf"}, nil, 1.5, true, true, "", "true", 4]; The desired effect is that all players have the action to enter/exit the bunker. If I test this locally in singleplayer or MP the code executes on my client and works fine. But when testing with a local dedicated server with 'loopback=true' clients do not receive the action so I can only assume the code isn't executing on them. I've tried changing the remoteExec line to the following in case the default value for target was incorrect on the wiki, or if for some reason my client was being treated as JIP but it didnt't solve the problem. remoteExec ["FNC_SetupBunkerDoors",0,true]; Any idea what I might be doing wrong here? Any help would be greatly appreciated :).
  9. Awesome thanks that makes sense, missed that. Yeah I was planning on eventually adding JIP true, but just wanted to get it working in it's default settings first. Appreciate the swift assistance, thank you!
  10. So I want to make a terrain using ground textures exclusively from the Apex map_data_exp folder. I'd like to generate a satellite texture for this using L3DT pro, so would like to make a new climate to match what I'm going for. I read somewhere that simply using the textures to generate a satellite equivalent will bring bad results so I was wondering if there are satellite images in the arma files I could pull to match GDT's such as the volcanic sand which I'll be using alot?
  11. Turned out that Star Wars Opposition is currently experiencing a bug which causes this, they have a hotfix on their FAQ section of their discord. Problem resolved.
  12. Hi guys, A friend and I have been trying to test out some addons in editor missions on ARMA 3 with the Star Wars: Opposition mod however we keep hitting the same problem. We are connected via VLAN using Hamachi, if we host a vanilla server we can both join eachother and play fine. However the moment we introduce to the Opposition mods to the equation we start getting problems. This is odd because its a highly popular mod that lots of people seem able to use and we've used earlier iterations of it with no problems in the past. If one of us hosts a mission the client can join the lobby, select a role and the host can start the game. When the briefing appears the host can see it fine, however the client gets a flash of what could be the map, before the splash screen appears. The host can continue to launch the mission and conclude the briefing. Then the host loads in and can play without any problems. The client can still only see the splashscreen for loading, even though they can hear gameplay as well as move their character blindly (which the host can see). We have tried a number of things: - Changing the mod load order. - Changing from the Star Wars Opposition Ace 3, to normal Ace. (A dependency for Star Wars OP) - Reinstalling the mods. - Reversing it so that my friend hosts and I join him, I experience the same problem so its independent from a host. Here I have the RPT's for both the host and client from a test. We were running these mods in this order: - CBA_A3 - StarWars: Opposition Mod (MAIN) - Opposition [ACE3] The Client .RDT: https://pastebin.com/jVdeUJmB The Host .RDT: https://pastebin.com/M1etu0jj Would appreciate any help people can offer with this as we're stumped. Not sure if this line in particular has any involvement as I noticed it in both my friend and my RPT's when attempting to be clients. "One or more children of class All do not support Extended Event Handlers. Fall back to loop." -edit: Made a mistake with spoilers in initial post, now corrected with pastebin. Also noticed that some people who use hamachi are being accused of having cracked games, I merely use it because I don't have full access to my router settings. Here is proof of purchase before people ask: https://i.imgur.com/CS6rBXP.png
  13. I think the main problem I'm having here rests on the fact that perhaps I misunderstand how variables of the object type are stored and handled.
  14. Hi, I'm making a mission that selects a player from an array filled with the elements taken from the playableUnits command/array. With the help of a friend to act as an extra client and hints placed throughout the code I have isolated the problem. The mission selects a element from the array which is a playableUnit, it then continues to run this on it: [[], "spyMenu", _newSpy] call BIS_fnc_MP; In this case _newSpy is the element selected. If this element happens to be myself, the host the function is called successfully, however if it happens to be a client that's connect it fails. Inspecting the playableUnits array vs. the returned strings from 'player' on the clients, I noticed the strings are different. Whereas a player has: '#:#:# Alpha (player name)' Elements from playableUnits has: '#:#:# Alpha (player name) REMOTE' I'm suspecting this is the problem, but I thought that since the stored elements are in fact objects they should refer to the same entity. Would solving this issue be as easy as formating the playableUnit's element to remove the ' REMOTE'? Or is there something deeper here I'm lacking with regards to how objects actually work?
  15. I was wrong I didn't fix my problem. @Tajin sorry, as you can see now I've linked the entire script possibleSpies is updated over the course of it's use. It's a mess as it's currently a WIP but here is the entire script. The purpose of the script is to pick a random player from the resistance side then send them a dialog 'createDialog "SPY_SELECTED_DIALOG";' If they click a button labled 'Accept' on the dialog they receive this code: [[player, profileName], 'newSpy', false] call BIS_fnc_MP; closedialog 0; Which finishes it off. The current problem is that the function spyMenu never runs on clients, it runs fine when I'm selected and hosting however. But it never shows a dialog for other players. spies = []; possibleSpies = []; civilians = ["C_man_1","C_man_1_1_F","C_man_1_2_F","C_man_1_3_F","C_man_hunter_1_F","C_man_p_beggar_F","C_man_p_beggar_F_afro","C_man_p_fugitive_F","C_man_p_shorts_1_F","C_man_polo_1_F","C_man_polo_2_F","C_man_polo_3_F","C_man_polo_4_F","C_man_polo_5_F","C_man_polo_6_F","C_man_shorts_1_F","C_man_shorts_2_F","C_man_shorts_3_F","C_man_shorts_4_F","C_man_w_worker_F"]; faces = ["GreekHead_A3_01", "GreekHead_A3_02", "GreekHead_A3_03", "GreekHead_A3_04", "GreekHead_A3_05", "GreekHead_A3_06", "GreekHead_A3_07", "GreekHead_A3_08", "GreekHead_A3_09"]; addSpy = { _playerName = _this select 0; _player = _this select 1; _spy = _this select 2; spies = spies + [_playerName, _player, _spy]; }; removeSpy = { private ["_location", "_wasSpy"]; _playerName = _this; _wasSpy = false; //hint format ["%1", _playerName]; { if (_playerName isEqualType _x) then { if (_playerName == _x) then /////////// REMOVE SPY is called but this if isn't working. Test upper if. { _location = _forEachIndex; _wasSpy = true; hint "spy to be removed found!"; }; }; }forEach spies; if (wasSpy) then { _playerName = spies select _location; _oldUnit = spies select (_location + 1); _spy = spies select (_location + 2); spies = spies - [_playerName, _oldUnit, _spy]; }; }; getPossibleSpies = { [player, "savePossibleSpy", false] call bis_fnc_MP; }; savePossibleSpy = { _player = _this; possibleSpies pushBack _player; }; selectSpy = { possibleSpies = []; [[], "getPossibleSpies", resistance] call bis_fnc_MP; sleep 2; if !(possibleSpies isEqualTo []) then { hint format ['possibleSpies is not empty, selecting spy from %1', possibleSpies]; sleep 4; _spy = selectRandom possibleSpies; hint format ["%1 selected as spy.", _spy]; sleep 2; _spy; } else { hint 'No possible spies found'; sleep 2; _spy = objNull; _spy; }; }; newSpy = { _player = _this select 0; _playerName = _this select 1; _civilian = selectRandom civilians; _face = selectRandom faces; _group = createGroup civilian; _civilian createUnit [getMarkerPos "spy_hq_marker", _group, "newUnit = this;"]; //Maybe format a spyName each time for unique names. [newUnit, "selectPlayer", _player] call BIS_fnc_MP; _player setpos (getMarkerPos "limbo_marker"); _newSpy = newUnit; [[_newSpy, _face], "setFace", true, true] call BIS_fnc_MP; [_playerName, _player, _newSpy] call addSpy; _message = format ["%1 has been compromised and is now operating for MI6!", _playerName]; //[_message, "hint", true] call BIS_fnc_MP; _newSpy addMPEventHandler ["MPRespawn", {_respawnedUnit = _this select 0; _corpse = _this select 1; [[profileName, _respawnedUnit, _corpse], "deadSpy", false] call BIS_fnc_MP;}]; //["insertion", "selectLocation", _newSpy] call BIS_fnc_MP; [[], "spyMissionsUpdate", _newSpy] call BIS_fnc_MP; [[], "giveGun", _newSpy] call BIS_fnc_MP; }; spyMissionsUpdate = { [player, "updateObjectives", false] call BIS_fnc_MP; }; spyMenu = { createDialog "SPY_SELECTED_DIALOG"; _time = 9; _count = 10; hint "You should see a dialog now, if you don't tell Tom you saw this hint but no dialog."; sleep 5; while {dialog isEqualTo true && _count > 0} do { sleep 1; ctrlSetText [1001, (str _time)]; _time = _time - 1; _count = _count - 1; }; closeDialog 212; }; deadSpy = { private ["_location"]; _playerName = _this select 0; _respawnedSpy = _this select 1; _corpse = _this select 2; _wasSpy = false; { if (_playerName isEqualType _x) then { if (_playerName == _x) then { _location = _forEachIndex; _wasSpy = true; }; }; }forEach spies; if (_wasSpy) then { _playerName = spies select _location; _oldUnit = spies select (_location + 1); _spy = spies select (_location + 2); spies = spies - [_playerName, _oldUnit, _spy]; hint format ["%1", _corpse]; [_oldUnit, "selectPlayer", _respawnedSpy] call BIS_fnc_MP; [_oldUnit, "findStartLocation", _oldUnit] call BIS_fnc_MP; [_corpse, "removeHolster", _oldUnit] call BIS_fnc_MP; //_message = format ["%1 was eliminated and is no longer working for MI6.", _playerName]; //[_message, "hint", true] call BIS_fnc_MP; sleep 1; deleteVehicle _respawnedSpy; }; }; while {gameInProgress isEqualTo true} do { sleep selectSpyIntervalTime; if ((count spies) < maximumSpies) then { _newSpy = call selectSpy; if !(isNull _newSpy) then { sleep 2; hint 'creating dialog on spy'; sleep 2; [[], "spyMenu", _newSpy] call BIS_fnc_MP; //["SPY_SELECTED_DIALOG", "createDialog", _newSpy] call BIS_fnc_MP; }; }; };
  16. Rather than try to get that previous method to work I tried to make another fix, I'm pretty confident it will work but haven't fully tested it yet. I'm just requesting all players on the side I target send their 'player' object to the server which then adds it into possibleSpies. possibleSpies = []; [[], "getPossibleSpies", resistance] call bis_fnc_MP; getPossibleSpies = { [player, "savePossibleSpy", false] call bis_fnc_MP; }; savePossibleSpy = { _player = _this; possibleSpies pushBack _player; };
  17. The issue is that playableUnit's is returning a different object name for objects that aren't the server. Where a player object name would normally be: "unitname (profile name)" It instead returns: "unitname (profile name) REMOTE". This happens for any 'player' who isn't the server host. This means when I put the returned object into a target parameter, it isn't called on the intended object because that object has a different name. I'm not sure if this should cause a conflict, do object names actually matter or do they just represent unseen data that never changes?
  18. Thanks that's a useful command to know, I look forward to any solutions.
  19. I know the problem it's to do with the returns of playableUnits as explained above. It's difficult to show because it's all in functions but here's the one where playableUnits is used. Ignore the hints and sleep's they were just for troubleshooting. selectSpy = { possibleSpies = []; { if ((side _x) isEqualTo resistance) then { possibleSpies = possibleSpies + [_x]; hint format ["Adding %1 to possible spies.", _x]; sleep 2; }; } forEach playableUnits; hint 'removing spies from possibleSpies'; possibleSpies = possibleSpies - spies; sleep 2; if !(possibleSpies isEqualTo []) then { hint format ['possibleSpies is not empty, selecting spy from %1', possibleSpies]; sleep 4; _spy = selectRandom possibleSpies; hint format ["%1 selected as spy.", _spy]; sleep 2; _spy; } else { hint 'No possible spies found'; sleep 2; _spy = objNull; _spy; }; _spy is later assigned to _newSpy which is where the code in the last post is supposed to be run local. [[], "spyMenu", _newSpy] call BIS_fnc_MP; To make what I've said in the last post short and sweet, Function "spyMenu" is run successfully when _newSpy is the server host, if _newSpy is a client it isn't run locally at all on that client. playableUnits is adding " REMOTE" to clients who are not the server.
  20. Sorry, I sent this code after alot of experimentation with it so alot of the values are incorrect and different from when I started with it and should have reverted them all. That's why there's some weird errors, I'm pretty sure I've found another way to solve my problem now so don't worry, thanks anyways.
  21. I'm having some trouble with some code I'm trying to write. This function starts with the object of a player '_oldUnit', the idea is that it will then continue to make a civilian spawn, then select that unit while storing the object of the old one. When that civilian respawns I need to return the player into the unit it was at the beginning of the function. I plan to run a function to return the player to it's old unit from the MPRespawn event handler, but somehow I need to get the client to store the it's old unit locally so that it can use it as a parameter for the second function. This is important because multiple players may be running this function. _oldUnit = _this; _group = createGroup civilian; "c_man_polo_1_f" createUnit [getMarkerPos "spy_hq_marker", _group, "newUnit = this; private ['_myOldUnit']"]; //Civilian is spawned. [newUnit, "selectPlayer", _oldUnit] call BIS_fnc_MP; //Player selects the new civilian. _newUnit = newUnit; //The new unit is stored. _oldUnit call addSpy; //Not important. _newUnit setVariable ["_oldUnit", _oldUnit, false]; //My attempt to store the functions _oldUnit variable on the client. _newUnit addMPEventHandler ["MPRespawn", {}]; //This will run a function with the parameters of it's current unit and that of the _oldUnit. Any help would be appreciated, this current code doesn't work. When I test it and check the value of _myOldUnit on the client it's undefined.
  22. In this case I need it to remain local. I removed the _ from "oldObject" while testing and forgot to put it back.
  23. When an object respawns, is it still the same object? I've having trouble handling an object after respawn.
  24. Thanks that did the trick. Still very bizarre that it worked with 'CIV' and 'civilians' on the other script.
×