Jump to content

JCataclisma

Member
  • Content Count

    136
  • Joined

  • Last visited

  • Medals

Everything posted by JCataclisma

  1. JCataclisma

    Error using AddAction

    ...and we didn't noticed that misplaced " right in the middle of the command line... 😳🤦‍♂️ . Thank you!
  2. Are you planning to do that for a specific class, let's say, only for pilots? Or maybe only for a specific SteamID whether in MP? . EDIT: But as you mentioned "one specific playable unit", your idea is to do that for a specific unit name, correct?
  3. JCataclisma

    Error using AddAction

    Oh, I thought you were always executing both, since the beginning, so maybe only use one addAction every try, but you have already clarified that 😉 By the way, you have tried using ONLY this last/new addAction, and the error happens as well, correct? So that could confirm there are no conflicts between the codes from different scripts. Oh, and WHEN do you get that error? Still in the editor? When you try and click OK on the initBox the error appears? Or only during the play, when you execute one of the actions?
  4. JCataclisma

    Error using AddAction

    I think there's nothing to do with those lines in your initBox, especially because you should be able to have as many different actions as you want, regardless have they been created them in the initBox or via script. You will probably need to share here the content of both executed .SQFs, so that the guys can spot where the errors come from. 😎 Also, try and execute each one of them at once, without the other, so it might help you to isolate whether the error is in only one of them or both.
  5. Hello, guys! As the most of script was found gathering information here in forums, the least I could do was to share it here as well. Works in SP and MP dedicated server - as long as you do your tricks to successfully apply the addAction to player.
  6. Ok, by reading another not-so-old topic here in forums, I could make some improvements and managed to find out a way to "kill" the display image, so to free that slot by pressing any chosen inputAction key. The specific topic is linked at the end of this message, and bellow are the lines that are actually working for my landing/parking camera scripts. These are the lines in the script executed specifically for the Kajman: Forum link with the solving help: https://forums.bohemia.net/forums/topic/218524-addaction-to-manual-camera/
  7. Despite the low quality, the video can give the idea of the actual "Landing Camera" being used.
  8. JCataclisma

    Scripting Mentor/Teacher wanted

    I dare to say your request might have more luck if you post it (also) here: https://forums.bohemia.net/forums/forum/200-arma-3-find-or-offer-editing/
  9. JCataclisma

    setDir on vehicle gunner

    Hello, guys! Did any of you have been able to deal with scripted turret position recently? Initially for testing purposes, I have been trying to pass the (firing) position from the turret in one Kajman into another one nearby, but no success at all. My main goal would be to add an init line to some helicopters that would make the turret start in a custom position, so the player doesn't have to manually adjust the position whether they decide to get in as pilot and use manual fire. I know it's not a big deal, just trying to add some bits of "QualityOfLife" features to the server. I know the value I currently need (for Kajman, at least) is rad around rad -0.0025 ( or deg -0.132382), but I haven't been able to make the scripted adjustment at all, using mainly thins like bellow and some variations: this animateSource ["mainTurret", rad -0.0025]; The code bellow is an example of another unsuccessful attempt of passing currently manned turret by player into "heli2", which is another Kajman nearby - returns no errors, but nothing happens as well: _heli = vehicle player; private _mainturretDirection = deg (_heli animationSourcePhase "mainturret"); heli2 animateSource ["mainturret", _mainturretDirection];
  10. JCataclisma

    Haul Cargo

    By saying it only works on ONE BOX, do you mean a specific type/class of box, or that it only works the first time you execute the action, and after that you can click at any other and nothing happens? I don't know if this can actually help you, but this is what I use in some addAction script when I want to "mount" a medium container and a quadbike - whether there's one nearby - upon a pickup truck. It searches whether you have an accepted vehicle nearby, then searches for the container classes and for a quad. Maybe it helps you get some ideas for yours.
  11. JCataclisma

    Pick up an object

    Just to try and make things easier, that part you have already managed to make work, have you used triggers, right? And how was your briefcase created? Did you use "createVehicle" with scripts, or is it an item placed in editor, which is already there since the beginning of the mission? Did you give such a briefcase an entity name in editor, or does it have a command line like "_objCase = createVehicle..." in script?
  12. Oh, so that's where some "undefined variable" warnings have come. 😒 Thank you! P.s.: I will remain trying with EHs, as the addAction has that issue regarding locally vs. globally, which demands much more work for passing the functions into server prior to remote calling them. 😬
  13. Here it is. Hope it offers enough fun to compensate all the brain work. I am posting as "spoiler" because for what I understood people here prefer it to be like this when the code is much longer. Cheers! P.s.: for using it, just spawn a NATO Prowler nearby (EXCEPT the AT version, because its attaching numbers are different, just like armed Hunter is different from unarmed Hunter) and execute this script (starting from "private _nearbyVehicles"). P.s.2: several lines with "QS_" are custom variables from Quiksilver to run within his Apex framework - so they can be either ignored or complete deleted for vanilla use.
  14. This version of the video is a little outdated, but even under such a low-res one can get a better idea of the real use for such a code 😁 . No, there would be no problems when trying to take control of attached turrets, but the addAction (or eventually an EH) does help A LOT for these main reasons, besides several others: 1.) sometimes then the attached weapons are end up being "inside" the vehicle's LOD or whatnot, their simulation/interaction is compromised; 2.) other attached objects that might be "in between" player and attached weapons usually avoid player interaction with the weapons; 3.) in many cases - this included - player might need a mod like Enhanced Movement to be able to climb upon vehicle and reach the weapons, as there a single "edible" vanilla ladder which can somehow be used to help climbing vehicles ("Land_Obstacle_Climb_F" class) Will post it here later on.
  15. Oh... I read and "re-read" quite a few times the variables' stuff, especially after that tip of yours regarding magical _x, but my understanding was going in a COMPLETELY opposite way! And it would take a long, loooong time until (maybe) I realize what was actually going on with "["isRightTurrets", true]". I would not even try anything related to change turrets without leaving the occupied one first, so that possibility is another amusing surprise. Will apply the code to the full version of the rigged-by-scripts vehicle, perform changes and then bring it here. For now, thank you very much! 🍺
  16. Do you mean you'd like holes and craters were created instantly by script when you use some action or radio trigger? Or maybe for some cutscene you'd like to do, so that when a plane attacks the ground, those holes would be created for, let's say, try to stop some tanks on their way? I won't suggest any terrain deformation related stuff, because I cannot deal with that. But at leas for cosmetic purposes, you could create a SQF file with things like: _object1 = createVehicle ["B_T_Static_AT_F",[0,0,0], [], 0, "NONE"]; _object1 allowDamage TRUE; createVehicleCrew _object1; _object1 enableWeaponDisassembly FALSE; _objecth1 = createVehicle ["Land_ShellCrater_02_extralarge_F",[7,-3,0], [], 0, "NONE"]; _objecth1 allowDamage FALSE; _objecth2 = createVehicle ["CraterLong",[-3,2,0], [], 0, "NONE"]; _objecth2 allowDamage FALSE; _objecth2 setDir 45; _objecth3 = createVehicle ["CraterLong_02_small_F",[-4,-7,0], [], 0, "NONE"]; _objecth3 allowDamage FALSE; _objecth3 setDir 45; _objecth4 = createVehicle ["Land_ShellCrater_02_large_F",[4,3,0], [], 0, "NONE"]; _objecth4 allowDamage FALSE; _objecth4 setDir 215; P.s.: for testing purposes, you might had better to add your playable character at the very left-bottom "beginning" of the map, to spawn the props nearby. Some examples of classes for craters: "Land_ShellCrater_02_extralarge_F" "CraterLong" "CraterLong_02_small_F" "Land_ShellCrater_02_large_F" These are some physical anti-vehicle barriers "Land_CzechHedgehog_01_old_F" "Land_ConcreteHedgehog_01_F" "Land_CzechHedgehog_01_new_F" Some sentries/mounted weapons "B_HMG_01_A_F" "B_T_Static_AT_F" This is what you add to a sentry if you want it spawning already manned createVehicleCrew <name of the object here>; This is to avoid players to disassemble the sentry <name of the object here> enableWeaponDisassembly FALSE;
  17. Ok, even after correcting the syntax/params' order I couldn't manage to make it work using EH, so I tried by using a more familiar (to me) approach with addAction. It's working fine ONLY for the right turret (static AT), but player performs "moveInTurret" in same AT even when I click on the other action, for the HMG/left turret. I suspect it's something related to the fact I am using "_x" for both turrets' variables, so the script just pass the first one it reads - in case, the AT/right turret. EDIT: by attaching even more static weapons, I have noticed it doesn't necessarily matters the names, because it always puts the player in the first gun it finds in the list, regardless.... ? Any suggestions about where am I messing and how could I keep different turrets for different addAction' s ? private _nearbyVehicles = nearestObjects[player, ["Car"], 15]; { private _currentVehicle = _x; if (typeName _currentVehicle == "OBJECT" && (typeOf _currentVehicle in ["B_T_LSV_01_unarmed_F", "B_LSV_01_unarmed_F"])) then { _objMidRightGun = "B_T_Static_AT_F" createVehicle [0, 0, 0]; _objMidRightGun attachTo [_currentVehicle, [0.4, -1.6, 0.05]]; _objMidRightGun setDir 30; _objMidRightGun enableWeaponDisassembly FALSE; _objRLeftGun = "B_HMG_01_high_F" createVehicle [0, 0, 0]; _objRLeftGun attachTo [_currentVehicle, [-0.7, -1.4, 0.5]]; _objRLeftGun setDir 210; _objRLeftGun enableWeaponDisassembly FALSE; private _rightTurrets = [_objMidRightGun]; private _leftTurrets = [_objRLeftGun]; { _x setVariable ["isRightTurrets", true]; } forEach _rightTurrets; { _x setVariable ["isLeftTurrets", true]; } forEach _leftTurrets; _currentVehicle addaction ["<t color='#24c048'>AT Torre</t>", { _jipe = _this # 0; private _attachedObjects = attachedObjects _jipe; { private _object = _x; if (_object getVariable ["isRightTurrets", true]) then { player moveInTurret [_x, [0]]; } } forEach _attachedObjects; }, nil, 0, false, true,"User16","_this distance _target < 5"]; _currentVehicle addaction ["<t color='#5a01da'>HMG Torre</t>", { _jipe = _this # 0; private _attachedObjects = attachedObjects _jipe; { private _object = _x; if (_object getVariable ["isLeftTurrets", true]) then { player moveInTurret [_x, [0]]; } } forEach _attachedObjects; }, nil, 0, false, true,"User17","_this distance _target < 5"]; }; } forEach _nearbyVehicles;
  18. Try and take a look at this similar post, I'm almost sure the same solution there works for you as well:
  19. JCataclisma

    3 animations combined in one script

    Hey, BlackFalco, I'd rather answer here instead of your new topic, just because there are already some working codes and videos on previous answers. But another suggestion I can lay here is to watch both videos bellow, because they have helped me a lot in "animations" subject recently. Cheers!
  20. JCataclisma

    (BUG) Tank shooting himself

    I can just add that is very, VERY common to have some or several vehicles from mods, especially those which only replaced the textures, showing up with the weapon's muzzle "lock" with the firing animation "on", and then doing the opposite and disappearing once weapon is shot. It usually also happen regarding the front lights (pilot lights).
  21. JCataclisma

    Bulletproof Windows and Tires

    Nice! Some "small" but effective points to get me on the path. I'll bring the code here once I get the adapted/changed stuff properly working. Thank you!!!
  22. I won't give you a better path because honestly I don't remember exactly how I solved this same issue I had not a long ago. But the thing is: 1.) easiest way, add a removeAllActions command for the unit once the action os executed; 2.) the more professional way would be to give some kind of variable name for this action of yours, and once it's executed, it would remove only the action itself. Please try and take a look from the finished code at the end of this link, but mind you that in that case, Larrow sugested a "loop" of On/Off actions, so that player would turn smoke on and off. In your case, you don't need the action become available again once executed, ever, correct? I'll try to find the topics that helped me a few weeks ago, but in the meantime someone will probably bring here a decent solution.
  23. Just for information, it's nice to no longer having the 2xJ command, because it's the same binding we have for quick view of mission objectives in QS's Invade&Annex framework.
  24. JCataclisma

    Bulletproof Windows and Tires

    Excuse me, PierreMGI, may I ask whether have you been dealing with the related stuff lately? Because that last script from your in this topic works GREAT, especially in dedicated multiplayer server, BUT, when running inside the Quiksilver's Invade&Annex framework, its execution causes a funny glitch: every player that was inside the vehicle which calls that script ended up no longer getting incapacitated, but dead at once. In our scenario, the player applies it by using an addAction in a building, which will search and execute it upon a nearby helicopter.
×