Jump to content

Larrow

Member
  • Content Count

    3586
  • Joined

  • Last visited

  • Medals

Everything posted by Larrow

  1. You are adding to the wrong idc. This comes from the lbSetData, data can only be STRING you're trying to add an OBJECT _x. Give the player a varName and use that instead. lbSetData [11500, _forEachIndex, _x call BIS_fnc_objectVar]; To tele to them... _player = lbData[ 11500, _index ]; player setPosATL getPosATL ( missionNamespace getVariable _player );
  2. /* Prevents dedicated server running script */ if (isDedicated) exitWith {}; //Never going to be dedicated if calling from an action /* Private variables */ private ["_cqcLiveTargets","_cqcSpawns","_azimuth"]; /* createGroup [side, deleteWhenEmpty] needed for createUnit function later */ private _cqcLiveTargets = createGroup east; /* Define spawn locations using variable names of leaflets as markers */ private _cqcSpawns = [cqcspawn_001,cqcspawn_002,cqcspawn_003,cqcspawn_004,cqcspawn_005,cqcspawn_006,cqcspawn_007]; /* type createUnit [position, group, init, skill, rank] function for spawning a unit */ //Would recommend using the other syntax of create unit { "O_G_Soldier_lite_F" createUnit [ getPosATL _cqcSpawns, //Passing whole array, should be _x current forEach element _cqcLiveTargets, //STRING in STRING notice color of MOVE //Unit is this not _this //again dir of _cqcspawns array not _x "call{_this disableAI "MOVE"; _azimuth = getDir _cqcspawns; _this setDir _azimuth;}", 0.1, "PRIVATE" ];} forEach _cqcSpawns;  So...
  3. Should be possible. All task information ( Task Framework tasks ) have their info stored in a set of missionNamespace variables "@taskID.INDEX" . See... \a3\functions_f\tasks\defines.inc ( for handy macros and INDEX values ) \a3\functions_f\tasks\fn_createTask.sqf ( all this func does is processes params and passes it to below func ) \a3\functions_f\tasks\fn_setTask.sqf ( task information is processed here, which then calls the below based on task owners ) <<This one should give you most of what you need to know \a3\functions_f\tasks\fn_setTaskLocal.sqf ( this is where each TASK is actually created per client/task owner ) So should be something like using missionNamespace vars to collect tasks info, save it off to profile, on mission reload check for saved tasks, gather info from profile and pass them back through taskCreate. Most likely need a few tweaks like making sure any parent tasks are handled first, any objects destination/task owner etc are saved and restored as objectVar's etc. Dont expect the below to work, its just some rough code to get the point across...
  4. Really, even if you make sure to overwrite TextureList[] and AnimationList[] ? Seems odd. For instance the Huron has... textureList[] = {"Green",1}; So, if you inherit from this unless you overwrite it then it will always apply the textureSource "green" no matter what you put in hiddenSelectionsTextures. It already has a postInit EH telling initVehicle to choose by weighted selection. // (_this select 0): the vehicle // """" Random texture source (pick one from the property textureList[]) // []: randomize the animation sources (accordingly to the property animationList[]) // false: Don't change the mass even if an animation source has a defined mass postinit = "if (local (_this select 0)) then {[(_this select 0), """", [], false] call bis_fnc_initVehicle;};"; This... textureList[] = {"USAF_Woodland_APC_Tracked_01_AA"}; ...that you have inside the textureSources class in your OP example, should be outside in the main class and include a weight. Arma 3: Vehicle Customization
  5. Surely you just use hiddenSelectionsTextures to apply the default textures to your modded vehicle, much like the original B_APC_Tracked_01_AA_F has ... hiddenSelectionsTextures[]= { "A3\Armor_F_Beta\APC_Tracked_01\Data\apc_tracked_01_aa_body_co.paa", "A3\Armor_F_Beta\APC_Tracked_01\Data\mbt_01_body_co.paa", "A3\Armor_F_Beta\APC_Tracked_01\Data\apc_tracked_01_aa_tower_co.paa", "a3\Armor_F\Data\camonet_NATO_Desert_CO.paa" }; You overwrite it with the default textures you want applied... hiddenSelectionsTextures[]= { "A3\Armor_F_exp\APC_Tracked_01\Data\apc_tracked_01_aa_body_olive_co.paa", "A3\Armor_F_exp\APC_Tracked_01\Data\mbt_01_body_olive_co.paa", "A3\Armor_F_exp\APC_Tracked_01\Data\apc_tracked_01_aa_tower_olive_co.paa", "a3\Armor_F\Data\camonet_NATO_Green_CO.paa" };
  6. init = "[this, "Woodland", nil] call bis_fnc_initVehicle;"; STRING in a STRING, you need to either use double quotes or single quotes around Woodland. Otherwise, it thinks the quotes at the start of woodland is the end of the init string causing the rest of the line to throw the error. init = "[this, ""Woodland"", nil] call bis_fnc_initVehicle;"; init = "[this, 'Woodland', nil] call bis_fnc_initVehicle;"; Notice the difference between the colourization of the above two lines to your original.
  7. Eden Composition Spawning Been working my way through this problem every time i have 5 mins between other stuff. Looking for testers willing to test out compositions. I have put it through some simple testing and the test mission comes with some examples as player actions. DOWNLOAD Save a composition in Eden and then in your profiles folder (usually MyDocuments\Arma 3\) in the compositions folder find its composition.sqe. Copy its .sqe and place it in your mission folder in a folder called Compositions and rename it to something remember-able. Copy the LARs folder to your mission. Add to your description.ext.. class CfgFunctions { #include "LARs\spawnComp\functions\functions.cpp" }; #include "compositions\compositions.cfg" Create a file called compositions.cfg in your missions composition folder that you created above and add a class for your composition. e.g //LARs_spawnComp_debug = 1; //1 = RPT output, 2 = RPT output and ingame visual positioning info class CfgCompositions { class Walk { //Name that the composition is spawned by #include "walk.sqe" //Renamed composition.sqe }; }; Then when you want to spawn a composition.. _compReference = [ COMP_NAME, POS_ATL, OFFSET, DIR, ALIGN_TERRAIN, ALIGN_WATER, IGNORE_ATLOFFSET ] call LARs_fnc_spawnComp; Where.. COMP_NAME - Classname given to composition in CfgCompositions POS_ATL( optional, default compositions saved position ) - Position to spawn composition If not given or empty array passed then original saved composition position is used Also accepts OBJECT, MARKER, LOCATION OFFSET( optional, default none ) - ARRAY [ x, y, z ] ammount to offset composition, as a compositions base pos can vary from what you want when its saved DIR( optional, deafault 0 ) - Direction to face composition in, If POS_ATL is of type OBJECT, MARKER, LOCATION passing TRUE for direction will use objects direction ALIGN_TERRAIN( optional, default True ) - BOOL, Whether composition objects should align themselves to their positions surface normal ALIGN_WATER( optional, default True ) - BOOL, If a composition objects position is over water should they align themselves to sea level IGNORE_ATLOFFSET( optional, default False ) - BOOL, If True each item in the composition will ignore its ATLOffset that usually gets added to its Z(height) !FUCNTIONALITY CHANGED! The function call will also return a reference string for the composition. Which can be used with some of the provided utility functions. [ _compReference ] call LARs_fnc_deleteComp; Will delete the composition. [ _compReference ] call LARs_fnc_getCompObjects Will return an array of all the compositions items. [ _compReference, _item ] call Lars_fnc_getCompItem Passing an Object will return its composition ID or -1 if not found. Passing an ID will return the object or objNull if not found. [ _item ] call LARs_fnc_getItemComp Will return a the reference to the composition the item belongs to or "". Checking the RPT with LARs_spawnComp_debug = 1 set in the composition.cfg when spawning a composition will display info on the objects spawned. e.g 12:29:04 "spawning - Object B_Soldier_A_F - ID: 51, VarName target1" Where it displays.. Type being Group, Object, Trigger, Logic, Marker or Waypoint Classname of object ie B_Soldier_A_F Composition ID 51 For Object, Trigger, Logic it will show its VehcileVarName if it was spawned with one. For Group it will display the groupID For Marker its given name and Waypoints their waypointName ('identified' option in Eden) Priority order of which composition items are spawned in. You may need to get funky with object names, especially markers as they cannot exist twice and things like task names in modules. Although you can use the utility functions to get a reference to objects and link out side resources yourself as another possible solution. Again has been put through very limited testing. As you can see by the examples I have a... Camp Ant spawning with added foot patrol and a vehicle that executes a waypoint synced to one of the patrols waypoints. A man that will cycle his route. A working sector. A simple task using modules. A simple mission using modules, a random vehicle spawning at grouped markers with a unit init to moveIn and blowing it up via a trigger when it reaches a waypoint to complete task. Set up Roadblock, if near a road will spawn a checkpoint aligned with the roads direction. There are several others that i have written short description for in the CfgCompositions. Most likely missed loads of stuff 😕 and I know I have not test trigger and waypoint effects. So if you feel like testing it out and supplying feedback of what is/isnt working(a small example .sqe would be handy for tracking problems down) ... DOWNLOAD as I just do not have the time to test every conceivable permutation myself. Updates:
  8. Done, updated parameter info and added an example.
  9. That example is correct, add the magazine "SmokeLauncherMag" to the turret at path [0,0]. AmmoCount was a later edition to the command after those examples were written, as such neither example shows using ammoCount.
  10. No need to format or localize the text yourself the Task Framework already handles all this for you, for both the Description and Title. <Key ID="STR_CID_FREE_CITY_TASK_DESCRIPTION"> <English>Clear %1 of %2</English> <!-- more languages --> </Key> <Key ID="STR_CID_FREE_CITY_TASK_TITLE"> <English>Clear %1</English> <!-- more languages --> </Key> _objective = "enemies"; [ _side, _taskID, [ //Format array, string to be localised, parameters for format %1, %2 ... [ "STR_CID_FREE_CITY_TASK_DESCRIPTION", _cityName, _objective ], [ "STR_CID_FREE_CITY_TASK_TITLE", _cityName ], "" ] ] call BIS_fnc_taskCreate; The localisation in the Task Framework happens on each client, so it will be different based on the client's language. The only thing not localised is the format parameters. Excerpt from BIS_fnc_setTaskLocal.. I have put in a ticket for a tweak to allow the localisation of format parameters as well.
  11. Informant test mission Should give you something to go on. Read along with these... Conversation System How To Conversation Biki
  12. Larrow

    Group tasks in multiplayer

    No need to remoteExec anything, BI Task Framework already handles all this for you.
  13. BIS_fnc_taskSetDestination Just set the destination using the framework functions rather than trying to update a destination module.
  14. Larrow

    Respawn Expressions Issue(s)

    Opps yep you caught this one, its just missing the local underscore. This should be the same variable _pylonMags instead, its your original _x#3 from the _respawnList( getPylonMagazines ) data structure. Fix both of these errors in my previous post.
  15. Larrow

    Respawn Expressions Issue(s)

    I just browsed through it to clean it up a bit. I don't understand why you have the EH contained within a BIS_fnc_initVehicle. It should just be... Added in a check to ensure the event code is not already sleeping due to explosive ammo having been used previously, so as not to queue up loads of setVehicleAmmo commands in the scheduler if someone is spam firing explosives. The only detriment this will have is if someone has fired explosive ammo and then unleashes lots of projectiles( machine guns etc ) then those won't refill until explosives refill, but it's only five seconds so not really a bother, better than the possibility of suddenly having setVehicleAmmo spam over and over again. All are untested and you will likely need to remove the comments depending on where you are pasting these scripts. Hope it helps.
  16. Your params for BIS_fnc_MP are wrong... so... [ [2024, 10, 10, _BR_Time, 0], "setDate" ] call BIS_fnc_MP; BUT BIS_fnc_MP is deprecated, you should use remoteExec instead... so... [ 2024, 10, 10, _BR_Time, 0 ] remoteExec[ "setDate" ];
  17. That is not actually true, the scheduler has a fixed amount of time it runs for, 3ms each frame. It will do as many schedule codes as it can in this time, each piece done is moved to the back of the queue, next time the scheduler starts it will pull the next from the front of the queue. So each schedule code gets as long as it needs to process( up to 3ms, if a particular code takes longer than 3ms it will be paused where it got to and sent to the back of the queue, the next time it is run by the scheduler it will continue where it left off ). Adding more code to scheduler than can be done in the 3ms just means it may take more frames before that piece of code is run again. e.g you have three pieces of code scheduled that each take 1ms to process, so each code will be processed every frame. If you have four pieces that each take 1ms then first frame 1,2 and 3 will be done, next frame 4,1 and 2, next frame 3,4 and 1 etc etc So they don't get less time, they get processed less frequently if the scheduler has more stuff in it than can be processed each frame( 3ms ).
  18. this addAction[ "Try Elevator Controls", { [ "EscapeCargo", "FAILED", true ] call BIS_fnc_taskSetState; hint "The Elevator Controls don't seemn to have any power"; }];
  19. ExecVM will be more expensive than spawn, as execVM always compiles the script every time the command is used( best for one-off, rarely used code ), whereas spawn-ing a function which is registered in CfgFunctions( or globally defined in some init script ) the function is compiled once at mission load.
  20. Update to allow emptying of sub-containers and weapons attachments into the main container, rather than copying them over as is.
  21. Just change this line in TAG_fnc_setContents to... [ _container, _contents ] call TAG_fnc_setContents; So the original container ( the crate ) rather than the added sub-container.
  22. This would likely be a good candidate for the relatively new UI to texture/advanced using procedural textures, of which you place the texture on the board with setObjectTexture/Global? Whenever you need to update the texture use displayUpdate command. I have not experimented with these new procedural textures yet, so I have no example to show, but presume this is the sort of thing they were implemented for?
  23. What module specifically? Some can be de/activated via triggers.
  24. You can always change it to reference anything you like out of the BIS_fnc_addCommMenuItem_menu arrays, doesn't have to be the index. For instance, you could reference them by their title "Call Reinforcements" etc. Write it how you need it, the main point was to show that the menus are just an array of arrays stored on the player that can be edited and refreshed using BIS_fnc_refreshCommMenu
×