Jump to content

kylania

Member
  • Content Count

    9181
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by kylania

  1. Here's a post showing how to do it with remoteExec and a direct engine command. So, I was trying to do this with using the task modules, but how are you supposed to reference a taskID set in a module within a script? I can't seem to figure out how to make it a Task type and while I can get it to use currentTask to succeed, there's no guarenteeing that's the right task. This is probably why I never use tasks or use Shuko's taskmaster instead. :)
  2. Oh I see, the lights look on, but don't actually cast light. Had NVGs on and didn't notice a difference heh.
  3. kylania

    Tanoa discussion (Dev-Branch)

    He has the Supporter edition, so prepurchased the game way back before Alpha.
  4. What p3d path are you using for the createSimpleObject? There's one for on and one for off.
  5. What exactly are you trying to do? A publicVariableEventHandler is just to monitor the value of a given variable and run some code each time it changes. It's used usually, in my experience, to execute code by only having to transmit a single value across the network instead of a full script. So like for a helicopter transport system you'd set it up so that the server is waiting for a variable named needsPickup to change from false to true and when it does it executes the script that spawns a helicopter, flies to where it was requested from and brings them back to base and then despawns. So the true value of needsPickup is transmitted rather than the several potential kilobytes of scripts. Or used to switch day to night on a server by only one client. You can setup an addAction that only the moderator of a mission has access to that sets a variable and publicizes it. The other clients are all waiting to see that value change and run setDate locally via PVEH to change to night since the effects of setDate are local. So knowing what you're trying to do would help to explain how to do it.
  6. You can use createSimpleObject to make a new one but I wasn't able to detect the lampposts with nearestTerrainObjects. I think they are still actual objects so you'd need to use nearestObjects to find them. However in my tests I think it was creating them underground since I couldn't see them. It wasn't till I added in the vectorAdd stuff from the example before I could see the objects however they were like 10m in the air!
  7. kylania

    Helicopter Not Flying at start

    Which mod and which helicopter?
  8. Very cool! You can use the Splendid Camera to take screenshots too btw. ESC -> Camera while in the editor. It's usually either h or Backspace to clear the UI while in the Camera Mode.
  9. Not sure what the difference between just having units marked as playable and that would be but you might want to try asking on the ACE thread directly.
  10. {!(_x in _heli)} count (units group player) == {(alive _x)} count (units group player)
  11. Just have something like that happen automatically. Run a script from the helo transport unload waypoint activation maybe.
  12. kylania

    Campaign Missions GONE after 1.60

    From SITREP #00152:
  13. Got an idea how, but do you have a sample of where one of these lamps are? All the ones I can find turn on at night automatically.
  14. Darn good question and I can't seem to figure that one out. You could use this to point at a soldier in your group and get him to go patrol on his own. //player addAction ["Patrol", {null = [player, cursorTarget] execVM "patrolscript.sqf"}]; params ["_caller", "_unit"]; if !(group _unit == group player) exitwith {}; _caller groupchat "Where should the unit patrol?"; openMap true; mapclick = false; onMapSingleClick "clickpos = _pos; mapclick = true; onMapSingleClick """";true;"; waituntil {mapclick or !(visiblemap)}; if !(visibleMap) exitwith { _unit groupchat "Sticking with you boss!"; }; _pos = clickpos; openMap false; [_unit] join grpNull; [group _unit, _pos, 100] call BIS_fnc_TaskPatrol; [_unit, "Heading out!"] remoteExec ["sidechat"];
  15. player addAction ["Say hello", "script.sqf", ["Hello World"]]; If you include that third parameter (["Hello World"] in this example) to addAction, an array, you can pass those values to the the script as _this select 3. Inside script.sqf for this example: params ["_object", "_caller", "_actionID", "_args"]; // Player single player could you get away with just this. Player says "Hello World" on sidechat //_caller sideChat (_args select 0); // For MP it would be: [_caller, (_args select 0)] remoteExec ["sidechat"];
  16. Gonna post the tweaks you made or?
  17. As long as your OA install is patched to at least 1.62 publicVariableServer/Client should work. BIS_fnc_MP, and this particular forum, is only for ArmA 3 but for the same type of usage for ArmA 2 you can check out the Multiplayer Framework.
  18. You can change the first line to: params [["_marker", "center"], ["_area", 50], ["_types", ["HIDE"]]]; and the last line to: } foreach nearestTerrainObjects [markerpos _marker, _types, _area]; Then if you need the extra types you can call it with: null = ["myMarker", 30, ["HIDE", "HOUSE"]] execVM "clean.sqf"; or just this if you're happy with just HIDE objects and a 50 meter range: null = ["myMarker"] execVM "clean.sqf";
  19. "FENCE" and "WALL" should work it seems. You can see the full list of options on the Biki.
  20. If you mean the rusty ones that's because those are considered "HOUSE" rather than "HIDE". So to capture things like that change the last line of the script to read: } foreach nearestTerrainObjects [markerpos _marker, ["HIDE", "HOUSE"], _area];
  21. You're checking _toCheck your ascending sort of units but then acting upon _toCheck2 your descending list of units (using useful names for things helps :P). Is that intended?
  22. Here's what the return of nearestTerrainObjects looks like: [ 1571177: garbagewashingmachine_f.p3d, 1571174: garbage_square3_f.p3d, 1571206: wreck_offroad_f.p3d, 1571179: lampshabby_off_f.p3d, 1571178: garbagepallet_f.p3d, 1571207: wreck_offroad2_f.p3d, 1571172: junkpile_f.p3d, 1570414: powerpolewooden_small_f.p3d, 51195: signt_dangerbendsr.p3d ] So you'd place it _junk capitalized unique parts of what you'd want to remote from that list. So like putting "GARBAGE" would clean up the garbagewashingmachine, garbage square and garbagepallet. If you added in "POWERPOLE" you'd also remove the small wooden power pole that's nearby. If you changed "GARBAGE" to "GARBAGE_" you'd only remove the square of garbage but leave behind the washing machine and pallet. So in the editor you might play around with it to get a list of objects first to see what to filter from. Here's my debug console from while I'd been testing the mission. You'll see I was able to test the script in the top execute field on demand. I had the list of objects around me in the first watch field. I had a gamelogic near the left wreck I used to create the bob object which I could then check the distance from the custom marker I had and check if it was in the area of my area marker too. Debug console is pretty useful. You can bring it up in the editor by pressing ESC. Make sense?
  23. {_x in _heli} count (units group player) == {(alive _x)} count (units group player)
  24. Here's a demo mission. The demo mission has an info stand with three actions on it. First is default using the 50x70 area "center" marker which will miss the wreck to the left and the washing machine even though they within 70m of the center of the marker they are on the 50m side so out of range of the area of the marker. Second action is using a custom non-area marker and default radius of 50m. So it'll pick up the washing machine but not the wreck on the left. Third action is that same custom marker but with a specified 70m range which will clear the washing machine and the wreck (and more!). The code has been changed to take into account marker area even if it's not symmetrical. The marker name is optional (defaults to "center") and the area is optional as well (defaults to 50m or the area of a marker). Here's the improved code: /* Ex: null = [] execVM "clean.sqf // Defaults to marker named "center" and 50m radius (unless it's an area marker). null = ["myOtherMarker"] execVM "clean.sqf // Cleans around a marker named "myOtherMarker" with 50m radius (unless it's an area marker). null = ["myUglyBackyard", 200] execVM "clean.sqf // Cleans 200m around a marker named "myUglyBackyard" (unless it's an area marker). */ // Defaults params [["_marker", "center"], ["_area", 50]]; // Types of junk to clean. _junk = ["GARBAGE", "WRECK", "TOILET", "TYRES", "JUNKPILE"]; // Area marker flag _markerArea = false; // If we're an area marker sort sizes to get the largest size and set the area flag for later. if (markerShape _marker in ["ELLIPSE", "RECTANGLE"]) then { _shape = markerSize _marker; // Returns the size, ie [50, 70] _shape sort false; // Sort the area array, ie now [70, 50] _area = _shape select 0; // Set area to the largest size _markerArea = true; // Set flag for later }; { _item = _x; // Current item in search area list // If we're an area marker check that the object is actually within the marker. Ie, 65m away from the 50m side for example. if (_markerArea && !(getPosWorld _item inArea _marker)) exitWith {}; // If we're in the area compare the object name to the _junk list. If we match hide the object. if ({(toUpper(str _item) find _x >=0)} count _junk > 0) then { hideObjectGlobal _item; }; } foreach nearestTerrainObjects [markerpos _marker, ["HIDE"], _area];
  25. Nothing you wrote was wrong at all! Just not as elegant as it could be. :)
×