-
Content Count
9181 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by kylania
-
How to make actions global for all players
kylania replied to psychorange's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. :)- 4 replies
-
- Variable
- Multiplayer
- (and 8 more)
-
Hide map objects Junk, Garbage and Wrecks with Script [Done]
kylania replied to LoseBummer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Oh I see, the lights look on, but don't actually cast light. Had NVGs on and didn't notice a difference heh. -
He has the Supporter edition, so prepurchased the game way back before Alpha.
-
Hide map objects Junk, Garbage and Wrecks with Script [Done]
kylania replied to LoseBummer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
What p3d path are you using for the createSimpleObject? There's one for on and one for off. -
Retrieving variables from the server
kylania replied to Kettlewell's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Hide map objects Junk, Garbage and Wrecks with Script [Done]
kylania replied to LoseBummer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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! -
Which mod and which helicopter?
-
Arctic Circle map / project horde
kylania replied to bludski's topic in ARMA 3 - ADDONS & MODS: DISCUSSION
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. -
ACE3 module "ACESwitchUnits" for ARMA3
kylania replied to Raffal's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
How to make the helicopter check all my group is in the helicopter
kylania replied to ruff's topic in ARMA 3 - MISSION EDITING & SCRIPTING
{!(_x in _heli)} count (units group player) == {(alive _x)} count (units group player) -
question about selecting group members then using addAction to make them leave group
kylania replied to jakkob4682's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Just have something like that happen automatically. Run a script from the helo transport unload waypoint activation maybe. -
From SITREP #00152:
-
Hide map objects Junk, Garbage and Wrecks with Script [Done]
kylania replied to LoseBummer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
question about selecting group members then using addAction to make them leave group
kylania replied to jakkob4682's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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"]; -
question about selecting group members then using addAction to make them leave group
kylania replied to jakkob4682's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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"]; -
Tweaked 1.60 lighting for A2 Maps
kylania replied to meaty's topic in ARMA 3 - ADDONS & MODS: DISCUSSION
Gonna post the tweaks you made or? -
Trying to get addPublicVariableEventHandler to work. Very simple example.
kylania replied to spitfire007's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Hide map objects Junk, Garbage and Wrecks with Script [Done]
kylania replied to LoseBummer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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"; -
Hide map objects Junk, Garbage and Wrecks with Script [Done]
kylania replied to LoseBummer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
"FENCE" and "WALL" should work it seems. You can see the full list of options on the Biki. -
Hide map objects Junk, Garbage and Wrecks with Script [Done]
kylania replied to LoseBummer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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]; -
Check distance for each checked unit and apply in specific order?
kylania replied to jcae2798's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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? -
Hide map objects Junk, Garbage and Wrecks with Script [Done]
kylania replied to LoseBummer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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? -
How to make the helicopter check all my group is in the helicopter
kylania replied to ruff's topic in ARMA 3 - MISSION EDITING & SCRIPTING
{_x in _heli} count (units group player) == {(alive _x)} count (units group player) -
Hide map objects Junk, Garbage and Wrecks with Script [Done]
kylania replied to LoseBummer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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]; -
Hide map objects Junk, Garbage and Wrecks with Script [Done]
kylania replied to LoseBummer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Nothing you wrote was wrong at all! Just not as elegant as it could be. :)