-
Content Count
9181 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by kylania
-
Blackfish Auto-orbit script?
kylania replied to all3n's topic in ARMA 3 - MISSION EDITING & SCRIPTING
setWaypointLoiterRadius -
Life Mission Porting Question To Tanoa
kylania replied to Big Daddy Grimm's topic in ARMA 3 - MISSION EDITING & SCRIPTING
First step is to open the old mission in your Eden Editor, select everything and Copy. Then open a new scenario on your new island and Paste. Save the mission, in Windows Explorer copy all the scripts and folders (other than mission.sqm) from the old mission folder to the new. Then you can preview and see if there's any critical errors. Then back to the editor where you move any items placed and markers to where you want. Adjust any scripts to match whatever has changed. Repeat till things work. -
Life Mission Porting Question To Tanoa
kylania replied to Big Daddy Grimm's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Apparently it has. Same way you'd port anything over to a new island, copy and fix mistakes. Might want to ask these guys about it. -
Trying to addaction to start/stop a friendly vehicle as it travels along a series of waypoints?
kylania replied to vaguswarrior's topic in ARMA 3 - MISSION EDITING & SCRIPTING
To run on a dedicated server you'd want to do something like: {[vipvic, true] remoteExec ["stop", vipvic]} I'd made a demo mission too, which is far more complex since I didn't note stop was a toggle... :unsure: init.sqf: teamLead setVariable ["APCSTATUS", true, true]; vipHoldAction = teamLead addAction ["<t color='#FF0000'>VIP APC Hold Position</t>", "apcmove.sqf", [vipvicD, "HOLD"], 9, true, true, "", "_this getVariable 'APCSTATUS'"]; vipMoveAction = teamLead addAction ["<t color='#00ff00'>VIP APC Proceed</t>", "apcmove.sqf", [vipvicD, "MOVE"], 9, true, true, "", "!(_this getVariable 'APCSTATUS')"]; apcmove.sqf: params ["_object", "_caller", "_action", "_args"]; _args params["_vehicle", "_mode"]; _command = switch (_mode) do { case "HOLD": { _vehicle remoteExec ["doStop", _vehicle]; false }; case "MOVE": { [_vehicle, (getPos _vehicle)] remoteExec ["doMove", _vehicle]; true }; }; _caller setVariable ["APCSTATUS", _command, true]; Stops on a dime, takes it's sweet time driving off again. -
Anyone got or know of a simple "knife" script
kylania replied to ivan keska's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This post has a ton of extra stuff in it, but does have a simple 'get close and kill' melee thing in it. -
I'll start! Click MultiQuote on the various messages you want to reply to, then click the "Reply to X posts" at the very bottom to condense them all into one post. :)
-
Hide map objects Junk, Garbage and Wrecks with Script [Done]
kylania replied to LoseBummer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The map ID number thing is going away, so don't get used to it. Just use filters like "HOUSE" and "FENCE" and "HIDE" to remove things. This will make it a desert wasteland (except for the stubborn mosque I can't seem to delete...): { hideObjectGlobal _x; _x enableSimulation false; } forEach nearestTerrainObjects [player, ["HOUSE", "FENCE", "HIDE", "POWER LINES"], 1000]; -
A3 music classnames and time
kylania replied to XOSPECTRE's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Woot thanks! -
A3 music classnames and time
kylania replied to XOSPECTRE's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Might be nice to update the Arma 3 Music Config wiki page with this code and duration and Apex music? :) -
How to get object from object init
kylania replied to tissue901's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Maybe a timing thing, like spawnGroup hadn't finished by the time you started trying to remove items from it's unspawned units? Can you put a delay or group size == 5 check or something there? -
We use mrb voice stop and it hilariously stops only BLUFOR voices. We found this out accidentally once when after years of blissful tactical silence all of a sudden we heard Russians sneaking up and talking right behind us. Turns out it was a new guy in our group who thought the Russian voices sounded "totally bad ass". It got even better when someone else switched to a custom female voice. So yeah, the voice stopping mods are pretty key. :)
-
Need help with Zeus Items
kylania replied to taketotheshadows's topic in ARMA 3 - QUESTIONS & ANSWERS
Don't use Zeus much, but either that will make Apex a dependency for the mission and they won't be able to open/join the mission without the DLC or when Zeus spawns the items they'll get a critical error and won't be able to see nor interact with the objects since they won't exist for them. Probably just best to buy Apex while it's on sale and not have to worry about that sort of thing. :) -
Nothing wrong with having multiple functions declared in a single file. I found the original post for this script and it's using allUnits. It's also meant to be called from the init.sqf so it just loads once and not run as an FSM. I can only imagine in his sleep delirium dr death jm remembered that _units can be a special variable and thought it always was, so he tried it? :)
-
What is _Units?
-
Blackfish Auto-orbit script?
kylania replied to all3n's topic in ARMA 3 - MISSION EDITING & SCRIPTING
While the A-10C has bank hold autopilot, Arma does not. I'm sure there's probably some crazy velocity changing method of doing it, but I lack the skills to make that happen. :) Hopefully a script wizard will chime in with some ideas. -
Blackfish Auto-orbit script?
kylania replied to all3n's topic in ARMA 3 - MISSION EDITING & SCRIPTING
A Loiter Counterclockwise Circle waypoint works somewhat OK. But since the cross hairs don't lock on a point like the UAV does targetting is stupid. Also they don't compensate for speed either, so I've never seen a Blackfish attack be on target. -
Horrible script that doesn't work as intended (Edited)
kylania replied to Mynock's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Well, sure... this will give exactly the result he wants without the bounce: this engineOn true; this flyInHeight 0; But.. then he wouldn't have learned about params! :unsure: -
Horrible script that doesn't work as intended (Edited)
kylania replied to Mynock's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That's odd. I didn't test a whole lot, but I also started my helo about 200m up in the air. However I didn't see the bouncing in the air thing you're talking about. I am on Dev build though, and there has been some changes to flyInHeight and AI movement, so maybe that explains it? For the function thing you can just declare it in the init.sqf or go the full route for functions library. I have a demo showing that structure here. Glad you learned a bit more. :) -
I need to know the logic of the sqe/sqf syntax/code of the weapons' box
kylania replied to sunrrrise's topic in ARMA 3 - EDEN EDITOR
Creating a box is Eden is the simplest thing ever. Place down a box. Expand equipment storage. Click + to add however many of whatever you want. Not Scripts needed. Certainly no Python conversions. Did that not work for you? -
Right click on an object in Eden and choose Log Copy class name.
-
Horrible script that doesn't work as intended (Edited)
kylania replied to Mynock's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The big difference is in how you capture the input variables. You were using: _helicopter = _this select 0; _damage = _this select 1; Capturing the [this, true] from the _this input as normal. There's a newish command called params which does that work for you, and more which is what i demonstrated. This is identical to what you had: params["_helicopter", "_damage"]; Both give us _helicopter and _damage variables we can use which match up with the input from _this. So the first "_var" we list will assume the value from _this select 0, the second "_val" will assume the value of _this select 1 and so on. However we can take it a step further and set defaults! params[["_helicopter", objNull], ["_damage", true]]; This now gives us the same variable names to play with however if _helicopter isn't a valid object, it will default to objNull. The next line of the script checks if that happened and exits the script without doing anything. The _damage default is more powerful though. It defaults to true so you can leave it off entirely now when you call the script and it'll still return allowDamage to the unit. You can even expand that out more with detailing what types of data each is allowed to be, but for this script simply defaulting to true to make it optional was enough. So if you wanted to call your script with optional allowDamage False you'd do: 0 = [this, false] execVM "heli_idle.sqf"; While if you wanted to leave the default of allowing damage after a few seconds you leave off the boolean: 0 = [this] execVM "heli_idle.sqf"; Ideally you'd move your code into a function, either by using the function library or just putting this in your init.sqf: fn_startRunning = { params[["_helicopter", objNull], ["_damage", true]]; if (isNull _helicopter) exitWith {}; _helicopter allowdamage false; getPosWorld _helicopter params ["_xpos", "_ypos"]; _helicopter setPosWorld [_xpos, _ypos, 0]; _helicopter flyInHeight 0; sleep 5; _helicopter allowdamage _damage; }; Then you'd call it from an init field as: [this] call fn_startRunning; That way you have a single copy of it in memory instead of compiling the script each time you use it. Following all of that? :) -
How to get object from object init
kylania replied to tissue901's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The error is caused by using () instead of { } around your while condition. For more learning see if any of this makes sense to you: // Called by: _scriptHandle = [this] execVM "enemySpawn.sqf"; // To debug: _scriptHandle = [this, true] execVM "enemySpawn.sqf"; params["_unit", ["_debug", false]]; // We sleep here to make sure all the messages happen in game since this is called via an init line. sleep 1; // In init.sqf or an init field we've previously run this command to initialize the variable: // missionNameSpace setVariable ["numAlive", 0, true]; missionNameSpace setVariable["numAlive", (missionNameSpace getVariable "numAlive") + 1, true]; if (_debug) then { systemChat format["Before while there are currently %1 units active", missionNameSpace getVariable "numAlive"]; }; while {alive _unit} do { // stuffs systemChat format["There are currently %1 units active", missionNameSpace getVariable "numAlive"]; sleep random (10); _unit setDamage 1; }; missionNameSpace setVariable["numAlive", (missionNameSpace getVariable "numAlive") - 1, true]; if (_debug) then { systemChat format["After while there are currently %1 units active", missionNameSpace getVariable "numAlive"]; }; Try it with multiple units and watch the debug messages. -
Horrible script that doesn't work as intended (Edited)
kylania replied to Mynock's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Neat idea! Here's a quick rewrite to use some optional parameter commands to save on typing. // 0 = [this] execVM "heli_idle.sqf"; // true damage after delay // 0 = [this, false] execVM "heli_idle.sqf"; // optional false damage remains. params[["_helicopter", objNull], ["_damage", true]]; if (isNull _helicopter) exitWith {}; _helicopter allowdamage false; getPosWorld _helicopter params ["_xpos", "_ypos"]; _helicopter setPosWorld [_xpos, _ypos, 0]; _helicopter flyInHeight 0; sleep 5; _helicopter allowdamage _damage; -
getItemCargo and addItemCargoGlobal should handle Uniforms and Vests in cargo. // _items = [["FirstAidKit","ToolKit","Medikit","ItemGPS","U_I_C_Soldier_Bandit_4_F","V_PlateCarrierGL_blk"],[8,1,1,1,1,1]] myitems = getItemCargo oldHeli; myitemCount = count (myitems select 0); for "_i" from 0 to (myitemCount - 1) do { newHeli addItemCargoGlobal [(myitems select 0) select _i, (myitems select 1) select _i]; };
-
/* fulLCrew output for a Ghosthawk. [ [oldHeliD,"driver",-1,[],false], [B Alpha 1-2:5,"cargo",0,[],false], [B Alpha 1-3:1,"cargo",6,[],false], [B Alpha 1-2:3,"Turret",-1,[0],false], [oldHeliG,"gunner",-1,[1],false], [B Alpha 1-2:4,"Turret",-1,[2],false] ] */ // Grab original crew positions _crew = fullCrew oldHeli; { _x params["_unit", "_seat", "_index", "_turret"]; // Grab new "cached" unit, just delete this if you're using original crew. Remember to boot them first. // newCrew would be the group name of the replacement crew for this vehicle. _unit = units newCrew select _forEachIndex; switch (toLower(_seat)) do { case "driver": { _unit assignAsDriver newHeli; _unit moveInDriver newHeli; }; case "gunner": { _unit assignAsGunner newHeli; _unit moveInGunner newHeli; }; case "turret": { _unit assignAsTurret [newHeli, _turret]; _unit moveInTurret [newHeli, _turret]; }; case "cargo": { _unit assignAsCargoIndex [newHeli, _index]; _unit moveInCargo [newHeli, _index]; }; }; } foreach _crew; This assumes you're moving in a fresh crew (from being cached beforehand. If you're just moving the same crew you might run into issues moving units out of their spots. Turret users didn't respect a setPos command and hopped out instead of teleporting out.