Jump to content

Harzach

Member
  • Content Count

    4933
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by Harzach

  1. Harzach

    Markers for current side

    I may have made a locality error - try unchecking the "server only" box on the triggers. You might also have to edit initPlayerLocal.sqf slightly, by changing setMarkerAlpha to setMarkerAlphaLocal. Sorry, I'm in the process of moving, so I can't test anything.
  2. Your syntax is broken by all of the unnecessary commas.
  3. If you have fewer than 25 units existing at mission start, all of the conditions will return true, yes. Functions are ideal for repeated calls, so yes.
  4. https://community.bistudio.com/wiki/addAction this addAction [ "title", // title { params ["_target", "_caller", "_actionId", "_arguments"]; // script }, nil, // arguments 1.5, // priority true, // showWindow true, // hideOnUse "", // shortcut "true", // condition 50, // radius <<===== CHANGE THIS false, // unconscious "", // selection "" // memoryPoint ]; So: this addAction [ "Hands up!", { params ["_target", "_caller", "_actionId", "_arguments"]; _target playmove "AmovpercMstpSsurWnonDnon" }, nil, 1.5, true, true, "", "true", 1 ]; Notice that the last three parameters are missing from my code. When you need to change a param for a command that takes many params, you need to include all params up to the one you are changing. If the following params have default values, then you can omit them.
  5. This addaction ["Get down"', {(_this select Switch move "Surrender";}]; Thoroughly broken syntax. Extra single quote after "Get Down" Missing 0) after select Switch move should be switchMove Corrupt character after move switchMove takes an animation state, not an action This addaction ["Get down", {(_this select 0) switchMove "AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon"}]; *edit* - found the transition animation name
  6. Harzach

    Type 22 Manta UGV

    unitIsUAV detects all drone-type units. I don't know of any UGV-specific commands (there are none on the Biki).
  7. Harzach

    Markers for current side

    An easy way to do this: Place your markers in the editor, making them whatever color you want for the "clear" state (probably black or grey). Name your markers appropriately. Set the markers' alpha to 0% (maybe do this after the next step.) Place a trigger for each marker such that they cover the same area as their associated marker. Set your triggers to detect OPFOR PRESENT, Repeatable, server only . In each trigger's On Activation field: "<markername>" setMarkerColor "ColorOPFOR"; Where "markername" is the name of the trigger's associated marker. Make sure the marker's name is in quotes. In each trigger's On Deactivation field: "markername" setMarkerColor "ColorGrey"; Marker color names can be found in the config name column here: https://community.bistudio.com/wiki/Arma_3:_CfgMarkerColors When OPFOR enters a trigger, the associated marker will turn OPFOR red. When a trigger is clear of OPFOR, the associated marker will turn grey. But the markers are still invisible! We can fix that by placing this little bit in initPlayerLocal.sqf: private _markers = ["markername1","markername21","markername3","markername4"]; if (side player == west) then { { _x setMarkerAlpha 1 } forEach _markers }; Now, each marker is still invisible (alpha 0) for everyone except WEST. You could do it the other way around (leave the markers visible in editor, then make them invisble for everyone but WEST at init) but then everyone will see the markers during the briefing stage.
  8. Harzach

    Markers for current side

    So, you want these gray markers to only be visible by WEST, and when EAST enters the marker area(s), they change color to red?
  9. Paste in the expression field, not the init. Code in the expression field will execute when the vehicle respawns, and in reference to that vehicle. params [_newVeh,_oldVeh]; [_newVeh, ["DA",1], ["showeod",1,"turretshieldhide",1,"showCamonetHull",1] ] call BIS_fnc_initVehicle;
  10. My funny cat pictures! NOOOO
  11. @za0 - OK, a couple of items: Assuming you have placed your code in the init of your server object, "this" refers to the object, so your type check is redundant. It will only - can only - ever be the correct object. In the hitPart EH, the params array is actually a sub-array, as seen in the Wiki example. So _target would be (_this select 0) select 0. this addEventHandler ["HitPart", { (_this select 0) params ["_target", "_shooter", "_projectile", "_position", "_velocity", "_selection", "_ammo", "_vector", "_radius", "_surfaceType", "_isDirect"]; _target setDamage 1; }];
  12. Syntax is incorrect, see the wiki link I provided.
  13. See @Larrow's comments here:
  14. You might want to also read the ACE team's page regarding scheduling: https://ace3.acemod.org/wiki/development/arma-3-scheduler-and-our-practices I'm trying to formulate a simple analogy for how it all works, but it keeps getting more complicated than I'd like. However, it's essentially as it sounds. Scheduled work is processed in order. Each piece of work gets the same amount of time as every other piece. EDIT: The scheduler only has so much time, so it is possible that not all work will be done in each frame. Sometimes, pieces that are not on the schedule must be processed immediately, to completion, and without delay. This is unscheduled work. EDIT: While it might seem like a good idea to schedule all of your work, you must remember that some work may not run on each frame. This can lead to timing issues/errors. On the other hand, running lots of complex unscheduled work can increase frametime/decrease framerate. It is a balancing act. I absolutely welcome any additions/corrections/clarifications to the above, as I am clearly not an authority on the subject! EDIT: Thanks to Larrow for the correction below!
  15. You don't need the trigger. In the "Condition Show" field, replace true with: obj1 distance2D obj2 <=5 Change the "5' to whatever number of meters you wish.
  16. Harzach

    showGPS false

    Since it references "player", it should be run wherever the intended player is local. In SP, that's basically anywhere. In MP, initPlayerLocal.sqf might be the best option.
  17. Create a boolean variable at mission start, for example: soundPlayable = true; In your trigger, add this variable as a condition: this && soundPlayable In the code where you play the sound, set the variable to false, and add a timer that waits for the the amount of time that it takes the sound to play. When the timer finishes, set the variable to true again. soundPlayable = false; <play sound> nul = [] spawn { sleep 10; // time in seconds to wait soundPlayable = true; }; If your mission is for multiplayer, there may be some locality issues to work out.
  18. Harzach

    Trigger help

    OK, so after some research, I have come up with this, but I have a feeling it could be simplified further. In trigger CONDITION: private _array = []; (nearestObjects [thisTrigger, ["WeaponHolder"], 5]) inAreaArray thisTrigger apply { _array append (magazineCargo _x)}; {_x == "vn_prop_food_sack_01"} count _array >= 5 External script: private _area = RiceDropoffArea; private _array = []; (nearestObjects [_area, ["WeaponHolder"], 5]) inAreaArray _area apply { _array append (magazineCargo _x)}; if ({_x == "vn_prop_food_sack_01"} count _array >= 5) then { //CODE HERE };
  19. Harzach

    Trigger help

    No, it's one of these: "GroundWeaponHolder", "GroundWeaponHolder_Scripted", "Library_WeaponHolder", "WeaponHolder", "WeaponHolder_Single_F", "WeaponHolder_Single_limited_item_F", "WeaponHolder_Single_limited_magazine_F", "WeaponHolder_Single_limited_weapon_F", "WeaponHolderSimulated", "WeaponHolderSimulated_Scripted" It's an invisible container. *edit* - It's a "WeaponHolder"
  20. Harzach

    Trigger help

    That gets even more complicated, as many objects (like weapons and magazines) are placed into parent containers called "weapon holders" when dropped on the ground. So you would need to find all weapon holders in the given area then check their contents. If this is for multiplayer, that might complicate things further, as these objects are not necessarily owned by the player that dropped them. There are a few solutions to this problem, though. Gotta do some work, I'll look into this later if no one else has.
  21. Harzach

    Trigger help

    I'm no expert, but I think the magazine class allows modders to imbue their objects with certain properties that they can't otherwise, like stacking.
  22. Harzach

    Trigger help

    It might be a magazine instead of an item, which is why I chose the command itemsWithMagazines. {_x == "vn_prop_food_sack_01_gh"} count magazines player >= 5 AND player distance mkt1_seller_10 < 10;
  23. Harzach

    Trigger help

    So, make sure you are using the correct classname. copyToClipboard str itemsWithMagazines player;
  24. @pierremgi gave you the in-trigger solution in his reply. He copy/pasted your incorrect animation name though, so you need to fix that: {_x playMoveNow "AmovPercMstpSnonWnonDnon_exercisePushup"} count (allUnits select {_x inArea thisTrigger}); Works great.
×