-
Content Count
9181 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by kylania
-
Other than indestructible bridges? :)
-
How to turn off "hc"'s map markers
kylania replied to Ilias48rus's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ahh, neat ok. Custom HC incoming! :) -
Ah, much better command. :)
-
Custom mission loading screen
kylania replied to nkenny's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You could use a titleCard but that still shows the initial loading screen. -
You can use getCargoIndex to save their place and moveInCargo and assignAsCargoIndex to move them back. Use all the other driver, gunner, turret commands as needed for the rest of the crew. unit1 assignAsCargoIndex [heli, 3]; unit1 moveInCargo heli; You might also want to look into a caching script such as SSSC instead of manually doing it.
-
How to turn off "hc"'s map markers
kylania replied to Ilias48rus's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You might be able to use some kind of allMapMarkers loop to delete them, but they weren't showing up as normal markers when I tested it, instead some array frame value. Maybe use Teamswitch instead of HC with extendedmapinfo turned off if you wanted to play completely blindly but still control multiple groups of AI? -
[ = 26 and ] = 27 on my US QWERTY keyboard. Slap this in your debug console then type away to see what works for you. moduleName_keyDownEHId = findDisplay 46 displayAddEventHandler ["KeyDown", {hint str _this}];
-
Mission Complete Says I Cheated
kylania replied to mandaloin's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Either will work as an editor placed trigger is present on all clients so when it activates every client (and server) will run the end mission function. However remoteExec takes an array as it's right side argument, so it would have to be: "end1" remoteExec ["BIS_fnc_endMission"]; -
How to turn off "hc"'s map markers
kylania replied to Ilias48rus's topic in ARMA 3 - MISSION EDITING & SCRIPTING
So you want HC without the ability to see where they are or where they are going? That makes no sense. You interact with them via markers. -
Oh, you can delete one of them, they are redundant. Here's a really quick demo of how you can set it up. The Create Task module (set to Assigned) can be anywhere. Synched with a Set Task Destination module (where the hostage will be) and two Set Task State module (set to Succeeded and Failed). Four triggers will control the logic. One to make the hostage join your group (or you can use addAction). One to detect if the hostage is back home. That will activate the Succeeded module and the delayed cleanup trigger to delete the hostage. The final trigger is to test if the hostage is dead but the rescue trigger hasn't gone off. That will fail the task.
-
So the problem are your task modules. Change the hosres1 createTask module to start as Created instead of Succeeded. Also unsynch it from the end trigger. Then create a new setTaskState module and place it somewhere on the map. Synch that to your end trigger and the hosres1 createTask module. Doing that will make it work as expected. Actually, oddly the way it was originally is working, sometimes... but changing to use the setTaskState module is working every time. :)
-
Yeah, but that's OK. I have Dev Branch loaded and some issues we might be able to see/fix without even loading the mission. :)
-
That's odd, sounds like you have it all setup correctly. Don't suppose you could upload the mission somewhere so we could take a look if something else was incorrect? Also, the Condition field of the trigger reads this exactly? h1 in thisList
-
And is the hostage BLUFOR? If he's still setCaptive he'll be considered Civilian.
-
What are the other settings on your trigger? Depending on the side they might be to be ANYBODY PRESENT or something similar.
-
deleteAt and _forEachIndex clarification needed.
kylania replied to Fiddi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
What are you trying to do with that? The original code already would just remove 5 from that array. I also feel that forEachIndex would be reset to the proper next loop count value for each loop, or else it kind of loses it's purpose right? How can you have a "current index" if you're able to adjust it all willy nilly. :) -
Stance adjustment for AI via SetUnitPos?
kylania replied to pappmensch's topic in ARMA 3 - MISSION EDITING & SCRIPTING
For player's it's LCtrl+W or LCtrl+S (A and D work as well) for the "+ and -" variations of prone, kneel, stand. I don't believe that AI have access to those stances unless you directly apply the animations to them perhaps? -
JBOY to the rescue!
- 1 reply
-
- 1
-
[SOLVED] How to make AI opens the rear ramp of an helicopter ?
kylania replied to braker's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Totally fails if you copy it from that quote for some reason, but typing it out works fine. Maybe the font formatting from the forums? unit1 animateDoor ["Door_1_source", 1]; -
Adding a Weapon then Adding attachments or more ammo makes it disappear..
kylania replied to daza's topic in ARMA 3 - EDEN EDITOR
I don't think you're supposed to "create" weapons like that. Those objects are basically set dressing, not a 3D weapon building system. People have had plenty of problems with what you're trying to do. It's really best to either just let players use Arsenal to build their weapons on the fly, or place the parts they'll need in an ammo box and let them pick and choose. Weapon objects don't have an inventory so can't be used as an ammo box. -
That sure sounds like a ton of repeated code. :) No idea what you mean by lobby based spawnpoints, and voting on things is a bit beyond the scope of this demo, but here's a mission showing how to do random mission using the Functions Library to minimize repeated code as much as possible. You can download the demo mission to follow along. This mission example is pretty basic so lends itself to functions. In each mission we'll have a marker, a vehicle and a task involving that vehicle. We'll either steal, destroy or paint the vehicle. Since each mission has basically everything the same we're able to have a single function handle multiple missions. We'll start by declaring some basics in the init.sqf. Here we'll create a variable to keep track of when the missions are in progress, an array of mission options and a trigger to end the mission when we're complete. Here's that file: init.sqf: // Set variable to mark when missions are in progress. missionNamespace setVariable ["gagi_missionInProgress", false, true]; // Array of possible missions, objects, marker name and task details availableMissions = [ ["steal", "C_Offroad_01_F", "markerStealCar", "Steal the car in town, bring it back here!"], ["destroy", "C_Offroad_01_repair_F", "markerDestroyCar", "Destroy the car on the road!"], ["paint", "C_SUV_01_F", "markerPaintCar", "Paint the car in the woods!"] ]; // End mission trigger to end the mission when out of missions and none in progress. _endTrigger = createTrigger ["EmptyDetector", [0,0,0]]; _endTrigger setTriggerStatements ["((count availableMissions) < 1) && !(missionNameSpace getVariable 'gagi_missionInProgress')", "['end1'] call BIS_fnc_endMission", ""]; The real processing will come within our functions. The next step is to declare the functions. We'll use the folder method for this example. That means we'll have a functions folder in our mission and inside that folder will be individual files for each function we need - four in all this time. These function files will be called fn_functionName.sqf. The name is important, it must be fn_<nameoffunction>.sqf. We'll declare our functions in the mission config file. description.ext: class CfgFunctions { class gagi // Functions tag. Functions will be called as [] call gagi_fnc_chooseMission { class functions { file = "functions"; // Folder where individual function files are stored. class chooseMission {}; // File name is functions\fn_chooseMission.sqf class spawnObjectAtMarker {}; class startMission {}; class missionCleanUp {}; }; }; }; So the first class will declare the "tag" we'll use. The function we created under the file fn_chooseMission.sqf will be called by gagi_fnc_chooseMission based on the tag and the filename. Next up we'll declare our functions, each in their own file. gagi_fnc_chooseMission function will be our starting point. It'll check if missions are in progress or no longer available. If missions are available it will pick a random mission, remove it from the pool of available missions and start the mission. fn_choosemission.sqf: /* Author: kylania Description: Selects random mission from availableMissions, removes it from the array, starts mission. Parameter(s): NONE Returns: BOOLEAN - returns true on completion. Example: this addAction ["Request Mission", {[] call gagi_fnc_chooseMission}]; */ // If a mission is in progress, exit with message. if (missionNameSpace getVariable "gagi_missionInProgress") exitWith {systemChat "Mission still in progress!"}; // If there are no more missions available, exit with message. if ((count availableMissions) < 1) exitWith {systemChat "No more missions!"}; // Select random mission from global availableMissions array. private _currentMissionParams = selectRandom availableMissions; // Remove the selected mission from the array. { if (_x isEqualTo _currentMissionParams) exitWith { availableMissions deleteAt _forEachIndex; }; } forEach availableMissions; // Start selected mission. _currentMission = _currentMissionParams call gagi_fnc_startMission; The next function is a quick one simply to spawn an object at a marker. fn_spawnObjectAtMarker.sqf: /* Author: kylania Description: Spawns an object on a marker. Parameter(s): 0: STRING - Classname of the object to spawn. 1: STRING - Marker name to spawn the object on. Returns: OBJECT - returns the spawned object. Example: _objectSpawned = [_className, _markerName] call gagi_fnc_spawnObjectAtMarker; _objectSpawned = ["C_Offroad_01_F", "markerStealCar"] call gagi_fnc_spawnObjectAtMarker; */ params ["_className", "_markerName"]; // Spawn object on marker. _object = _className createVehicle getMarkerPos _markerName; // Name object gagi_missionTarget missionNamespace setVariable ["gagi_missionTarget",_object, true]; // Return object _object The next function is the big one. This is the function that creates the missions and any special rules we want for each mission, such as triggers to detect when they are complete or addActions to help paint the car for example. fn_startMission.sqf: /* Author: kylania Description: Starts a mission by spawning a custom object, creating a task, performs and custom code for mission and starts clean up function. Parameter(s): 0: STRING - Misson type, used as taskID. 1: STRING - Classname of object to spawn. 2: STRING - Marker name of object spawn location. 3: STRING - Task description for mission. 4: ARRAY - empty array for use with trigger statements Returns: BOOLEAN - true upon completion. Example: _currentMission = _currentMissionParams call gagi_fnc_startMission; _currentMission = ["steal", "C_Offroad_01_F", "markerStealCar", "Steal the car in town, bring it back here!"] call gagi_fnc_startMission; */ params["_type", "_className", "_markerName", "_description", ["_trigger",[]]]; // Mark mission in progress. missionNamespace setVariable ["gagi_missionInProgress", true, true]; // Spawn selected object at marker. _objectSpawned = [_className, _markerName] call gagi_fnc_spawnObjectAtMarker; // Trim first three words from description for task title. _sDesc = _description splitString " "; _sDesc resize 3; _title = format["%1", _sDesc joinString " "]; // Create task [ west, [_type], [_description,_title,_markerName], getMarkerPos _markerName, true, 1, true ] call BIS_fnc_taskCreate; // Custom code for each mission. switch (_type) do { // For the steal task we create a marker to return the car to and delete it within the onAct of the trigger statement. case "steal": { _marker = createMarker ["gagi_extractMarker", getPos player]; _marker setMarkerShape "RECTANGLE"; _marker setMarkerSize [10,10]; // Mission is complete when the vehicle is within the return area marker. _trigger = ["position gagi_missionTarget inArea 'gagi_extractMarker'", "deleteMarker 'gagi_extractMarker'", ""]; }; // For the destroy mission we just test for the vehicle to be destroyed. case "destroy": { _trigger = ["!(alive gagi_missionTarget)", "", ""]; }; // For the paint mission we create an addAction on the vehicle which will "paint" the car for us and remove the option upon painting. case "paint": { //"#(argb,8,8,3)color(0,0,0,0.6)" [ _objectSpawned, [ "Paint this car!", { [ _this select 0, [0,"#(argb,8,8,3)color(0,0,0,0.6)"] ] remoteExec ["setObjectTexture", 0, true]; [ _this select 0, _this select 2 ] remoteExec ["removeAction", 0, true]; } ] ] remoteExec ["addAction", 0, true]; // The trigger looks for the car to be painted. _trigger = ["((getObjectTextures gagi_missionTarget) select 0) == '#(argb,8,8,3)color(0,0,0,0.6)'", "", ""]; }; default {}; }; // Start mission cleanup based on marker, task and trigger statements. [_markerName, _type, _trigger] call gagi_fnc_missionCleanUp; true The final function is called at the end of gagi_fnc_startMission and creates a trigger to detect when each mission is finished and cleans up after the mission succeeds. fn_missionCleanUp.sqf: /* Author: kylania Description: Cleans up mission by creating a custom condition trigger, succeeds task and deletes mission object and marker. Marks mission as no longer in progress. Parameter(s): 0: STRING - Marker name of task location. 1: STRING - Task name to succeed. 2: ARRAY - Custom triggerStatements Returns: BOOLEAN - true upon completion. Example: [_markerName, _type, _trigger] call gagi_fnc_missionCleanUp; ["markerStealCar", "steal", ["position gagi_missionTarget inArea 'gagi_extractMarker'", "deleteMarker 'gagi_extractMarker'", ""]] call gagi_fnc_missionCleanUp; */ params["_markerName", "_task", "_triggerCondition"]; _trigger = createTrigger ["EmptyDetector", [0,0,0]]; _trigger setTriggerStatements _triggerCondition; waitUntil {triggerActivated _trigger}; [_task, "SUCCEEDED", true] spawn BIS_fnc_taskSetState; sleep 4; deleteVehicle gagi_missionTarget; deleteMarker _markerName; missionNamespace setVariable ["gagi_missionInProgress", false, true]; true Hopefully you can see how you might take all the common aspects of your mission and turn them into functions to reduce redundant code.
-
https://community.bistudio.com/wiki/switchCamera with "Internal" I think?
-
setowner and setgroupowner. is the server ALWAYS 2?
kylania replied to Tankbuster's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Judging by the description of remoteExec I'm gonna say yes, 2 always = server? :) -
Need help with addAction...
kylania replied to Yolo Joe's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If you're using my code you'd need to change it like this: _smokeTrail attachTo [_plane, _x]; _smokes pushBack _smokeTrail; } forEach [["SmokeShellRed", [-4, 0.5, -0.2]], ["SmokeShellRed", [4, 0.5, -0.2]], ["SmokeShellBlue", [-5, 0.5, -0.2]], ["SmokeShellBlue", [5, 0.5, -0.2]]]; -
If only such technology existed. :)