Jump to content

sorophx

Member
  • Content Count

    597
  • Joined

  • Last visited

  • Medals

Everything posted by sorophx

  1. so, I wanted to add an action to my character in all missions I play, I cooked up a small mod to do that for me. it works in Arma 2 but doesn't in Arma 3, and I was wondering if someone could tell me what I need to change for it to work in A3 as well. here's the config.cpp: class CfgPatches { class SLAM { units[] = { }; weapons[] = { }; requiredVersion = QUOTE(REQUIRED_VERSION); requiredAddons[] = { }; version = 0.1; versionStr = QUOTE(VERSION); versionAr[] = {VERSION_AR}; }; }; class Extended_PostInit_EventHandlers { class slam { clientInit = "call compile preProcessFileLineNumbers '\slam\init.sqf'"; }; }; this particular setup I took from LEA, because it does pretty much the same thing I need. here's init.sqf: SLAM_ACTION = player addAction [("<t color=""#BC4007"">" + "Execute" + "</t>"),"userconfig\slam\test.sqf","",0,false,false]; so, if anyone has any idea what should be changed for Arma 3 I'd greatly appreciate it
  2. sorophx

    MK18 Mod 1

    finally, thanks for your work! any chance of seeing these in Arma 2?
  3. ok, do you mean it works something like a replacement pack?
  4. these weapons don't have ACE configs, do they?
  5. maybe you're talking about MSO? as long as the server stays up, it saves your progress
  6. thank you both for clearing it u. can't wait for the new version and new mods from you, Hogthar!
  7. couldn't find this mod in my Six-Updater so I downloaded the version hosted on Armaholic, there it says ver. 1.0, is that the most current version? your first post here says you made some updates, but it's not mention on Armaholic anyway, great mod, one of the best weapon mods I've seen in Arma 2. thanks for your work
  8. I agree that the game is unplayable in MP right now. most admins don't bother to adjust AI skill settings, as a result, you shoot a suppressed weapon from cover, drop an enemy soldier, 2 seconds later you're being shot at from all directions, and if your cover isn't solid, you're dead. that's just ridiculous, they didn't see you, they didn't hear you (supposedly), only thing they saw was their buddy dropping dead. and yet they suddenly know my exact location
  9. calling it from a trigger is not an option for me, unfortunately. never mind, though. there are many things mentioned here that would probably work, and I managed to get around the problem.
  10. sorry for bringing this up again, I do remember reading threads about this issue before but Google fails me. anyway, there's this problem: I have a script that creates some objects. and it's being called from another object's init field (I can't do it from init.sqf for certain reasons). every time somebody connects to the dedicated server, this script is being run, creating these objects again. and again. and again. how do I stop it? I tried placing a precondition inside the script, checking for a true/false variable. but that didn't work (probably a problem with my script's logic). tried using diag_tickTime to cut off the script after a few seconds have passed since mission start. didn't work (still can't figure out how many ticks there are in one second). tried deleting the object with the respective line in its init field after the script finished executing for the first time - this broke the whole script for some reason (locality?) so does anyone know of a simple solution? if not I'll post the script and explain what I'm trying to do with it, maybe somebody can tell me a better way of doing it :j:
  11. empty helipad placed in the editor. never mind though, I managed to get it working, it has issues still, players rejoining the server break everything including the respawn, but I don't have any strength left to figure out why
  12. I only run one script from an object's init field. I pass certain parameters to that script. based on these parameters my script creates a certain number of objects, which are stored in a global array for accessing during the mission. simplified example: [2] execVM "script.sqf"; <- in the init field will ask the script to create two objects and stick them into an array, which will be stored on this object (via setVariable). I keep running into trouble with locality, because I can't predict how the script will function on a dedi. originally I didn't bother with checking for server/not server entities, which caused multiple copies of said objects to be created (instead of 2 it would create 2+2n for n connected players). using (isServer) on the whole script breaks it. so I tried using it only for creating these objects. this created a different problem - my array would still get overwritten (it's defined each time as an empty array, so even though it was created and filled once already, when someone connects it is redefined again as an empty array but doesn't get filled because that only happens for the server). I tried experimenting with various ways to stop it from happening (how to store my initial array with objects and keep it from being overwritten), running into trouble at every step. my latest attempt was to use setVariable inside if (isServer) condition, so connecting players wouldn't have any effect on it. and it actually seems to work.
  13. is there a difference between isDedicated and isServer on a dedicated server? doesn't work, of course. but still curious got around to trying this again but this time parsing the results. and oh boy... on a dedicated server "myScriptWasRunOnce" will return true as soon as the mission starts (before the code is even ran for any players), meaning that the part inside the condition will never be executed. this is so confusing... hm, makes me wonder if the problem is with local variables not being recognized by the server. it's not in this code: if (isNil "myScriptWasRunOnce") then { myScriptWasRunOnce = true; publicVariable "myScriptWasRunOnce"; _array = []; }; on my machine values are <ANY ANY> for myScriptWasRunOnce and _array before the execution, they are <TRUE []> after the execution; on the dedicated server they are <TRUE ANY> before *and* after the execution.
  14. hah, figured out why (isServer) breaks my script. turns out this condition stops variables from being defined. testing on a dedi shows that if (isServer) then { myVar = true; }; returns ANY as myVar's value. so, while I can use (isServer) in my loops to create objects for the server only, any other variables will be overwritten when a player joins the server. so now I have to find a way to store these objects created for the server in a variable without overwriting that variable... the fight goes on
  15. sorophx

    Editing Multiplayer Missions?

    I'm using this for all my dePBO-ing needs: https://dev-heaven.net/projects/52/wiki/ExtractPbo
  16. hmmm, that particular check works fine, I mean it adds the action to needed units without fail and works for JIP players (that's why I probably shouldn't try to stop this script from running every time players connect to the server) not sure what you mean by "check that the objects you are creating don't exist", but I think what I'll try to do is delete all objects that are created for clients, thus leaving only objects created for the server so, yeah, a different approach is needed, I can see that trying to stop the script from executing is a dead end
  17. sorophx

    Editing Multiplayer Missions?

    you have to either find an un-PBO-ed version, or unPBO one yourself, place it in your MyDocuments/Arma3/MPMissions folder, launch the game, go to Multiplayer -> New you'll see a list of missions on the right. all unPBOed missions will appear in blue
  18. I can understand why Xeno wouldn't want his mission used for any of it, but what can he do, really? :j:
  19. I don't see it here: https://dev-heaven.net/projects/domination/files I'm still skeptical :j:
  20. yeah, the reason why I can't name these objects is because their number is never known. like I said, how many objects are created is dependent on parameters passed to the script. I could maybe try running a loop and concatenating two strings like ("name" + "_i") for every object ...
  21. that was the first thing I tried, and it didn't do anything for me. I will try again, though, just to be sure. no, that's not what I want to do. but I guess that's what I should want to do. you have to forgive me, locality is so confusing, sometimes I'm not sure what's going on and how to fix it. I'm trying to achieve the following. when the game starts the script creates a number of objects, depending on the parameters passed to the script. that's what it does currently. but on a dedi it creates these objects for every player that connects to the server. so, say, I need 4 objects and 4 players connect, it will create 20 objects instead. first 16 will be unusable copies and the last 4 will be the ones I need. say, now a 5th player connects, it will again create 5 objects, rendering the previous 4 useless and replacing them with these new 4. I could live with that if only it wouldn't keep spamming the server by creating these objects every time a player connects. I could only come up with 2 solutions: (a) stop the script from executing so many times or (b) not create these objects for every player. I can't achieve (a) without breaking something in the script, which leads me to believe my whole approach is inherently wrong and I have to rewrite everything, (b) is tricky, like I said "isServer" checks somehow stop the objects from being created, and "!isServer" doesn't do much either.
  22. (isServer) wouldn't work for me before, but now I tried it again, and it doesn't seem to break anything. I'll test it on a dedi now edit: nope, doesn't work. script isn't being ran at all if I add "if (isServer)"
  23. private [ "_ammo", "_back", "_backpacks", "_crate", "_crates", "_markerstr", "_module", "_units", "_unitsArray", "_ruckArray", "_crateArray" ]; _units = _this select 0; _module = _this select 1; _ammo = _this select 2; _module setVariable ["defineUnits", _units, true]; _unitsArray = _module getVariable "defineUnits"; _backpacks = []; _crates = []; for "_i" from 1 to (count _unitsArray) do { _back = createVehicle ["Misc_Backpackheap_EP1", getPos _module, [], 0, "NONE"]; _backpacks = _backpacks + [_back]; if (_ammo == 1) then { _crate = createVehicle ["USBasicAmmunitionBox_EP1", getPos _module, [], 0, "NONE"]; _crates = _crates + [_crate]; }; }; _module setVariable ["defineRP", _backpacks, true]; _ruckArray = _module getVariable "defineRP"; _module setVariable ["defineCrates", _crates, true]; _crateArray = _module getVariable "defineCrates"; if ((str player) in _unitsArray) then { null = [[("<t color=""#FF0000"">" + ("Set rally point") + "</t>"), "rally.sqf"]] call CBA_fnc_addPlayerAction; }; _markerstr = createMarker ["respawn_west", getPos _module]; _markerstr setMarkerShape "Empty"; "respawn_west" setMarkerType "Empty"; null = player addMPEventHandler [ "mprespawn", { _this execVM "rally_a.sqf" } ];
  24. if you mean the "isServer" command, then it doesn't do me any good inside the script, objects are being created regardless.
×