Jump to content

Search the Community

Showing results for tags 'function'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


    • Vigor
    • DAYZ
    • ARMA 3
    • ARMA 2
    • YLANDS
    • ARGO
  • Die Hard OFP Lovers' Club's Topics
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Japan in Arma's Topics
  • Arma 3 Photography Club's Discussions
  • The Order Of the Wolfs- Unit's Topics
  • 4th Infantry Brigade's Recruitment
  • 11th Marine Expeditionary Unit OFFICIAL | 11th MEU(SOC)'s 11th MEU(SOC) Recruitment Status - OPEN
  • Legion latina semper fi's New Server Legion latina next wick
  • Legion latina semper fi's https://www.facebook.com/groups/legionlatinasemperfidelis/
  • Legion latina semper fi's Server VPN LEGION LATINA SEMPER FI
  • Team Nederland's Welkom bij ons club
  • Team Nederland's Facebook
  • [H.S.O.] Hellenic Special Operations's Infos
  • BI Forum Ravage Club's Forum Topics
  • Exilemod (Unofficial)'s General Discussion
  • Exilemod (Unofficial)'s Scripts
  • Exilemod (Unofficial)'s Addons
  • Exilemod (Unofficial)'s Problems & Bugs
  • Exilemod (Unofficial)'s Exilemod Tweaks
  • Exilemod (Unofficial)'s Promotion
  • Exilemod (Unofficial)'s Maps - Mission Files
  • TKO's Weferlingen
  • TKO's Virolahti
  • TKO's Livonia
  • TKO's Rules
  • TKO's Changelog
  • TKO's Help
  • TKO's What we Need
  • TKO's Australia
  • MSOF A3 Wasteland's Server Game Play Features
  • MSOF A3 Wasteland's Problems & Bugs
  • MSOF A3 Wasteland's Maps in Rotation
  • SOS GAMING's Server
  • SOS GAMING's News on Server
  • SOS GAMING's Regeln / Rules
  • SOS GAMING's Ghost-Town-Team
  • SOS GAMING's Steuerung / Keys
  • SOS GAMING's Div. Infos
  • SOS GAMING's Small Talk
  • NAMC's Topics
  • NTC's New Members
  • NTC's Enlisted Members
  • The STATE's Topics

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL


Jabber (xmpp)








Steam url id







PlayStation PSN














Found 40 results

  1. Hey guys! First script I've ever put up on the forums, but as far as I know no one has posted a hostage script using the new HoldAction function. I needed it for a mission and figured it may be helpful to some! I'm not sure if it works in MP yet, 2 AM so I haven't gotten to test.Tested and working in MP! For me anyway. Any bugs or blatant mis-coding, let me know! Features: Random hostage animation. AI joins player group after release. Uses Arma 3 Hostage Icons. Multiplayer Compatible (JIP should work too) Random interruption and completion dialogue from hostage. Nothing too fancy! Just simple. INSTRUCTIONS/CODE: SCRIPT: For use on units spawned via script, see @davidoss's wonderful example right here. Changelogs: For those who just want a download link: DOWNLOAD HERE (Google Drive)
  2. Hey all, just came up with an idea of a function and implemented it. I kinda liked the idea and thought it would be nice to share it here :). So, the function takes as arguments the desired duration of the ArmA day in real-life hours, the day-to-night ratio (how many times the day is bigger than the night) and the (ArmA) date. It returns the needed multipliers (for the desired day and night duration in respect to the total duration of the day) as well as the sunrise and sunset times for that specific day (this is somewhat redundant since you could get them from BIS_fnc_sunriseSunsetTime, but since this function is used inside my function I thought it would be nice to return them). A simple use example would be // The function will be called myTag_fnc_timeVals for this example but you can name it whatever you want // Set variables (most probably you will get them from somewhere such as a mission parameter with "BIS_fnc_getParamValue" private _dayDur = 0.3; // Duration of ArmA day in real-life hours (half an hour in real life corresponds to one full ArmA day) private _dnFac = 1.5; // Day lasts 1.5 times the duration of the night // Get day multiplier, night multiplier, sunrise (ArmA) time and sunset (ArmA) time for the current (ArmA) day given by command "date" _timeVals = [_dayDur, _dnFac, date] call myTag_fnc_timeVals; // Handle the time in a "continuous" manner while{true} do { // Check time of day if(daytime > (_timeVals select 3) || {daytime < (_timeVals select 2)}) then { setTimeMultiplier (_timeVals select 1); // Use night multiplier } else { setTimeMultiplier (_timeVals select 0); // Use day multiplier }; // Sleep (a lot...) sleep 120; }; Below is the implementation of the function. I would like to apologise in advance though, for the cluttering with posting all the code here. I thought it could be a convenience for anyone who would like to use it. The function can also be found in this GitLab repository. In the code posted here, I have skipped parameter checks which you can implement yourself or copy the code from the provided link. NOTE: Due to the fact that the function will force the day and the night to have the given relation (given by the fraction), and due to the fact that possibly the "natural" day has different duration than the "natural" night, setting the ratio to 1 does not mean that the time multipliers will be 1. If you want to return to "normal" time use directly setTimeMultiplier command. Finally, please feel free to suggest (or implement yourself and share back) any improvements, or changes :). /* ---------------------------------------------------------------------------------------------------- * Inputs * ---------- * dayDur [Number] (Optional): Duration of the whole day in real hours (defaults to 24) * dnFac [Number] (Optional): The day-to-night ratio (defaults to 1) * dayOfYear [date] (Optional): The day of the year for which the multipliers will be * calculated (defaults to the current ArmA date) * ---------------------------------------------------------------------------------------------------- * Output * ---------- * data [Array]: - _this select 0 [Number]: Day multiplier * - _this select 1 [Number]: Night multiplier * - _this select 2 [Number]: Sunrise time * - _this select 3 [Number]: Sunset time * * ---------------------------------------------------------------------------------------------------- */ // Get input variables params[["_dayDur", 24, [24]], // Total duration of day ["_dnFac", 1, [1]], // Day-to-Night factor ["_dayOfYear", date, [date]]]; // Asked date // Declare some variables private _riseSet = _dayOfYear call BIS_fnc_sunriseSunsetTime; // Get the sunrise and sunset times of the day private _durs = [nil, nil]; // Calculate day and night duration (in real life hours) _durs set[0, (_riseSet select 1) - (_riseSet select 0)]; // Calculate day duration _durs set[1, 24 - (_durs select 0)]; // Calculate night duration // Calculate multipliers /* Solve simultaneously: * * dayDur * dayMul + nightDur * nightMul = 24 (1) * (dayDur * dayMul)/(nightDur * nightMul) = dayNightFrac (2) * * The result is: * * dayMul = 24/(nightDur * (1 + dayNightFrac)) * nightMul = (nightDur * dayNightFrac * dayMul)/dayDur */ private _dMul = 24/((_durs select 1) * (1 + _dnFac)); // Calculate the day multiplier private _nMul = ((_durs select 1) * _dnFac * _dMul)/(_durs select 0); // Calculate the night multiplier // Multiply with "global multiplier" _dMul = _dMul * 24/_dayDur; // Final day multiplier _nMul = _nMul * 24/_dayDur; // Final night multiplier // Return and exit [_dMul, _nMul, _riseSet select 0, _riseSet select 1] Hope this will be useful to someone. Take care, have fun and ArmA a lot :). EDIT: Corrected the code. A "total multiplier" was missing and day and night multipliers needed corrections. Now works correctly (I hope)... EDIT: A couple of bug fixes... Sorry ;(
  3. Hello everyone, Here is a small project that may be helpful to everyone that doesn't always have access to internet/the wiki, or to everyone needing the biki when it is down. With the support of peeps in the #community_wiki Arma 3 Discord channel, I managed to extract wiki data to make a COMREF (Operation Flashpoint flashbacks intensify) This is basically offline documentation for commands and functions in all Arma titles - note that some glitches are still present, but the data is pretty much usable. newest version: 2020-06-12 COMREF (added messagebox colours and better parsing) old version: 2020-06-10 COMREF (first version) My little helpers: @Grezvany13, @Dedmen, @x39, @optix, @Heyoxe, @A3_Stickie
  4. Hi everyone ! So I have a really simple question that I'm sure you have already seen before. It's about skip time, but more like "X hours and Y minutes. I'm searching for hours now, I keep trying again and again, without any success. Even the BIKI can't make me do things correctly ! :( So here I am ! I have made 2 samples to my function : cutText ["", "BLACK FADED", 600]; private ["_hoursToSkip","_minutesToSkip"]; _msg = [[" _hoursToSkip HEURES AND _minutesToSkip MINNUTES LATER ... ","<t align = 'center' shadow = '1' size = '1.0'>%1</t><br/>"]]spawn BIS_fnc_typeText; _hoursToSkip = _this select 0; _minutesToSkip= _this select 1; skipTime (_hoursToSkip + 0._minutesToSkip - daytime + 24 ) % 24; waitUntil{scriptDone _msg}; cutText ["", "BLACK IN", 5]; cutText ["", "BLACK FADED", 600]; private ["_hoursToSkip","_minutesToSkip"]; _msg = [[" _hoursToSkip HEURES ET _minutesToSkip MINNUTES PLUS TARD ... ","<t align = 'center' shadow = '1' size = '1.0'>%1</t><br/>"]]spawn BIS_fnc_typeText; return date = _actualDate; _actualDateN = dateToNumber _actualDate; _actualDateN + _hoursToSkip*0.00274 + _minutesToSkip*0.000046 = _newDateN; _finalDate = numberToDate _newDateN; setDate _finalDate; waitUntil{scriptDone _msg}; cutText ["", "BLACK IN", 5]; Declared in the "description.ext" file : class CfgFunctions { class Y { class timeSkip { file = "functions"; class timeSkip {}; ext = ".sqf"; }; }; }; Saved as "functions\fn_timeSkip.sqf" and detected in the InGame function menu aswell. None of them works with this command : [["5","5"],"Y_fnc_timeSkip",true,true] call BIS_fnc_MP; I need to make it work in multiplayer. The beginning of the function work great, I got a black screen. But nothing else. Sometimes, the _msg appears (with [5,5] as array instead of ["5","5"]), sometimes not. Can you help me with that ? Thanks a lot ! :) Full working code here (link to reply on this topic)
  5. Dear follow Arma addicts, can anyone point me towards a performance conscious script for: 1) Replacing all the non tracer ammunition from both player and ai with tracer ammunition, both at their weapons and inventories. 2) I believe tracer ammunition effects only happens when the magazine is almost empty. Is there any way to make every round have (or simulate) tracer effects? Basically I want to simulate old school battlefield games (BF2, BF3) were all rounds have tracer like effects that help players identify the origin and location that fire is coming from. (I need to up the feedback and gameplay friendliness of my mission while compromising some realism). Thank you in advanced!
  6. Hey guys just tested a mission and came up with an issue. I am using this code: ["init", [y, "images\spoilers.jpg", "Spoilers"]] call BIS_fnc_initLeaflet; ["init", [x, "images\spoilers.jpg", "Spoilers"]] call BIS_fnc_initLeaflet; in an MP mission. All worked fine but one thing. The action to see the leaflet both times was only visible to the host. Clients could not even see the action. How can I make the above action visible to all in MP please?
  7. Hi everyone and happy new year! Introduction This is my first script in 2020. @Ori150418 posted a request about a marker searching system and this piqued my interest so I got to work. This script adds a searchable list with all markers to the right side of the map (see video below). Features Adds list with all markers Markers are searchable by their text Updates positions periodically Updates markers when opening the map Includes user made markers List is hideable Note: The performance might suffer in missions with a lot of markers. The example mission has a small test built into it which generates 100 markers randomly on the map. I'd appreciate feedback about the performance as I have a good enough system to not notice a difference. Usage Copy the file "fn_markersearch.sqf" to your mission directory Add the following line to your init.sqf/initPlayerLocal.sqf: ["init"] execVM "path\to\file\fn_markersearch.sqf" Video Downloads https://github.com/7erra/marker_search Have fun!
  8. Hello everyone, I need a little help I try to create, through a script, a combination of modules to add a civilian presence to the cities crossed by the player. The problem is that at the launch of the mission, despite the generation of three modules (visible and existing in Zeus mode) the main module (ModuleCivilianPresence_F) does not link with the other two modules (ModuleCivilianPresenceSafeSpot_F and ModuleCivilianPresenceUnit_F), and I have the following error message : "bis_fnc_moduleCivilianPresence [x] Civilian Presence L-Alpha 1-2: 1 terminated." There are at least 1 spawnpoint and 1 position module. " How to make dialogue, synchronize the three modules, created via a script, ingame ? This is just a piece of extracted code; the rest of my project works perfectly : Do not pay attention to the two ways to create a unit, both ways work exactly the same, I put the necessary characters to hide the text for reading the script > /* and */ _townLoc = nearestLocations [getPos player, ["NameVillage","NameCity","NameCityCapital","NameLocal","CityCenter","Airport"], 2500]; if ((count _townLoc) > 0) then { sleep 0.01; _townPos = locationPosition (_townLoc select 0); /* sleep 0.50; _MCP_Spawn = (createGroup sideLogic) createUnit ["ModuleCivilianPresenceUnit_F",_townPos,[],0,"NONE"]; _MCP_Spawn setvariable ['BIS_fnc_initModules_disableAutoActivation', false]; sleep 0.50; _MCP_SafeSpot = (createGroup sideLogic) createUnit ["ModuleCivilianPresenceSafeSpot_F",_townPos,[],0,"NONE"]; _MCP_SafeSpot setvariable ['BIS_fnc_initModules_disableAutoActivation', false]; sleep 0.50; _MCP_Module = (createGroup sideLogic) createUnit ["ModuleCivilianPresence_F",_townPos,[],0,"NONE"]; _MCP_Module setvariable ['BIS_fnc_initModules_disableAutoActivation', false]; */ sleep 0.50; _MCP_SafeSpot = "ModuleCivilianPresenceSafeSpot_F" createUnit [_townPos, createGroup sideLogic, "this setVariable ['BIS_fnc_initModules_disableAutoActivation', false];", 0.6, "PRIVATE"]; sleep 0.50; _MCP_Spawn = "ModuleCivilianPresenceUnit_F" createUnit [_townPos, createGroup sideLogic, "this setVariable ['BIS_fnc_initModules_disableAutoActivation', false];", 0.6, "PRIVATE"]; sleep 0.50; _MCP_Module = "ModuleCivilianPresence_F" createUnit [_townPos, createGroup sideLogic, "this setVariable ['BIS_fnc_initModules_disableAutoActivation', false];", 0.6, "PRIVATE"]; }; Otherwise I also tried another method : I to place the necessary modules in the 3den editor, then move them by script when the player is near a locality. The modules change position, but the created civil entities always go to the moduleCivilianPresenceSafeSpot module's initial position, ie the position of the module when it was placed in the editor, even if it was changed position. :/
  9. Does anyone have any idea how to use the function "BIS_fnc_isCuratorEditable" to kill curator editable units when they enter a trigger. I am trying to create a restriction zone around my map which kills the player and curator units when they enter the zone but will allow none curator units to pass through (so I can simulate reinforcements entering the region after a certain amount of time). I have been running some tests to get an idea on how the "BIS_fnc_isCuratorEditable" function works. I currently have four triggers around the map which tell me through a hint whether a unit is curator editable or not. I am now trying to work out how to change it from giving me a hint which is either true or false, to killing the unit if true or allow the unit through if false. Something along the lines of... Just can not seem to work it out. Also tried this to no avail...
  10. So I have made "script" for myself that I put in the Player Init. This only executes once. But I want it to execute every time I spawn/respawn (so everytime the player starts existing). The script works great if I put it in the Init of the Player. But i wanted to make a .sqf file I could call/execute so I wont have to put everything in every Player. But the scipt is not working/compiling. The code I put in to the Init: varPlayer=this; spawnPos=getPos varPlayer; telePos=getPos varPlayer; [varPlayer, 3] call BIS_fnc_traceBullets; varPlayer addAction["<t color='#59b300'>Arsenal</t>", {["Open",true] spawn BIS_fnc_arsenal;}]; varPlayer addAction["<t color='#d9006c'>Go to Spawn</t>", {varPlayer setPos spawnPos;}]; varPlayer addAction["<t color='#bfff00'>Teleport</t>", {varPlayer setPos telePos;}]; varPlayer addAction["<t color='#4cffff'>set Teleport</t>", {telePos=getPos varPlayer;}]; varPlayer addAction["<t color='#0080ff'>Teleport with Map</t>", "teleport.sqf"]; The code I put in to the .sqf: _spawnPos=getPos _this; _telePos=getPos _this; [_this, 3] call BIS_fnc_traceBullets; _this addAction["<t color='#59b300'>Arsenal</t>", {["Open",true] spawn BIS_fnc_arsenal;}]; _this addAction["<t color='#d9006c'>Go to Spawn</t>", {_this setPos _spawnPos;}]; _this addAction["<t color='#bfff00'>Teleport</t>", {_this setPos _telePos;}]; _this addAction["<t color='#4cffff'>set Teleport</t>", {telePos=getPos _this;}]; _this addAction["<t color='#0080ff'>Teleport with Map</t>", "teleport.sqf"]; How I called it in the Init: _nul = []execVM "myFunction.sqf"; It wont run, but why? So for short. What i need help with is: finding the problem with the sqf executing the sqf every time the player starts existing Thx for reading my crap and I hope you can help me. :)
  11. You know the vehicles I'm talking about - the HEMTT ammo / fuel / repair truck, the Huron containers, Taru pods, Zamaks, etc... you drive up to it and it just automatically repairs / refuels or rearms you, as is the case. I've searched high and low through the functions and config files, and I can't find the scripting that is making this effect happen. Does anyone know what it is, or where it can be found? Please don't answer with references to your own or other's Rearm / Refuel / Repair scripts, I have a ton of those but that's not what I'm asking - thank you! Why am I looking for this, specifically? 1. Vehicle rearming, with turrets and especially with dynamic loadouts, is especially problematic. I challenge you to reload 13 out of 19 rockets, exactly, on a rocket pod that's not on the vanilla configuration of a dynamic loadout aircraft. The vehicle rearm script on the Huron pod just works, it an cosmetically appealing way: the numbers just increase while you're next to the rearming source, until you're fully reloaded, and it doesn't seem to care whether it's a vanilla loadout or a dynamic one, whether the turret is local or not, etc. 2. There's no way to adjust the "flow rate" of vehicle rearming, repairs, or refueling. 3. The effect itself is capricious. Sometimes it works as intended (drive up to the box/ car/ whatever) and the vehicle resupplies as intended. Sometimes it doesn't, but it provides you with an action (complete with a lovely icon) to perform it. And sometimes it doesn't work at all. Thank you in advance! Ryko
  12. Is there a way to change BIS' jukebox function so that it selects the tracks from a custom array instead of the whole cfgMusic? Here's the function:
  13. Hi, I am currently trying to find a way to check if local player is function caller in sqf file. I have civilian with addAction, which calls this script: _caller = _this select 2; if (local player == _caller) then { _handle = createdialog "Interaction"; } I need to show the GUI only to player using the action. Sorry if it's somewhere on these forums, but I was unable to find it. Thanks for your answers 🙂 WendAF
  14. Hi everyone, I found this topic And in it there is a code given by Larrow : //initPlayerLocal.sqf //Start custom loading screen aswell [] spawn { [ "MyLoadingScreen" ] call BIS_fnc_startLoadingScreen; uiSleep 20; [ "MyLoadingScreen" ] call BIS_fnc_endLoadingScreen; }; waitUntil { //If there are no current loading screens if ( missionnamespace getvariable ["BIS_fnc_startLoadingScreen_ids",[]] isEqualTo [] ) then { //Continue true }else{ //Otherwise log current loading screens to RPT diag_log str ( missionnamespace getvariable ["BIS_fnc_startLoadingScreen_ids",[]] ); false }; }; _loadedTime = time; uiSleep 1; hint format[ "Finished loaded %1 seconds ago", time - _loadedTime ]; It works fine but the problem is that with the function BIS_fnc_startLoadingScreen my loading screen doesn't appears and if i use the command startLoadingScreen it appears. But i need to use the function for the following waitUntil. So : startLoadingScreen ["", "begin_dialog"]; Works fine but can't use with the waitUntil. ["begin_dialog"] call BIS_fnc_startLoadingScreen; Doesn't works! Can anyone help me?
  15. HI. Maybe someone can find this usable. Iterate trough config weapon classes and returns array of weapons/ammo according to given parameters /* file : fnc_getWeapon.sqf author: DaVidoSS description: Iterate trough config weapon classes and returns array of weapons/ammo according to given parameters parameters: 0: STRING one from listed below "assault" "handgun" "submachine" "rocket launcher" "missile launcher" "grenade launcher" "light machine" "medium machine" "marksman" "sniper" "all" 1: SCALAR or STRING "all" for all available classes of param 0 NUMBER classes of param 0 2: BOOLEAN true - for return ammo classes too in form ["weapon",["ammo","ammo"...]] false - for return without ammo classes in form ["weapon","weapon"...] Return: ARRAY Usage: fnc_getWeapon = compileFinal preprocessFileLineNumbers "fnc_getWeapon.sqf"; _10assaultGunsWithAmmo = ["assault" ,10,true] call fnc_getWeapon; _1MarksmanGunWithoutAmmo = ["marksman" ,1,false] call fnc_getWeapon; _allGunsofAllTypeWithAmmo = ["all","all",true] call fnc_getWeapon; */ private _paramsCheck = params [["_type","all",[""]],["_allof","all",["",0]],["_withMags",false,[true]]]; if (!_paramsCheck) exitWith {["***********ERROR:fnc_getWeapon - exiting due wrong params given %1",str _this] call BIS_fnc_error; false}; private _array = []; private _return = []; { private _class = (configName _x); if (getNumber (configfile >> "CfgWeapons" >> _class >> "type") < 5) then { private _magazines = getArray (configfile >> "CfgWeapons" >> _class >> "magazines"); private _name = toLower (getText (configfile >> "CfgWeapons" >> _class >> "descriptionShort")); if !(_magazines isEqualTo []) then { if (toLower _type != "all") then { if ((_name find (toLower _type)) > -1) then { if (_withMags) then { _array pushBack [_class,_magazines]; } else { _array pushBack _class; }; }; } else { if (_withMags) then { _array pushBack [_class,_magazines]; } else { _array pushBack _class; }; }; }; }; } forEach ("isClass _x && {(getNumber (_x >> 'scope')) isEqualTo 2}" configClasses (configfile >> "CfgWeapons")); switch (true) do { case (_allof isEqualType 0): { if (_allof isEqualTo 1) exitWith { _return pushBack (selectRandom _array); }; if (_allof > 1 && {count _array >= _allof}) then { for "_i" from 1 to _allof do { _return pushBackUnique (selectRandom (_array - _return)); }; } else { if (_allof < 1) exitWith {_return pushBack (selectRandom _array)}; _return = _array; }; }; case (_allof isEqualType ""): { _return = _array; }; default {}; }; (_return) Enjoy :-)
  16. Helo. I have a seeding problem with the random function that I just can't figure out. while { surfaceIsWater _suitable || count _list > 0} do { while {_spot distance officer_jeff < 1000 || surfaceIsWater _spot} do { _prevStep = _center getPos[ (random 2000), (random 350)]; for "_i" from 0 to 2 do { _step = _prevStep getPos[ (random 2001), (random 351)]; _prevStep = _step; }; _spot = [_step select 0,_step select 1,0]; }; _suitable = [_spot, 0, 300, 20, 0, 0.7, 0] call BIS_fnc_findSafePos; _list = nearestTerrainObjects [_suitable,["TREE","BUILDING","RUIN","ROCK","HOUSE"], _howBig,false]; }; If the script can't find a position that is not a water surface, it restarts BUT the RANDOM functions just keeps giving me the same position every time the cycle ends. I don't understand, is it not supposed to be random? I also tried this with seed using the alternate syntax of random: while { surfaceIsWater _suitable || count _list > 0} do { while {_spot distance officer_jeff < 1000 || surfaceIsWater _spot} do { _prevStep = _center getPos[ (time random 2000), (time random 350)]; for "_i" from 0 to 2 do { _step = _prevStep getPos[ (time random 2001), (time random 351)]; _prevStep = _step; }; _spot = [_step select 0,_step select 1,0]; }; _suitable = [_spot, 0, 300, 20, 0, 0.7, 0] call BIS_fnc_findSafePos; _list = nearestTerrainObjects [_suitable,["TREE","BUILDING","RUIN","ROCK","HOUSE"], _howBig,false]; }; Here is an example output: 15:12:48 "[823.795,10712.5] as _suitable, 56 as count _list, [816.133,10551.5,0] as _spot " 15:12:49 "[820.423,10745.8] as _suitable, 46 as count _list, [816.133,10551.5,0] as _spot " 15:12:50 "[828.004,10684.4] as _suitable, 76 as count _list, [816.133,10551.5,0] as _spot " Any help would be much appreciated.
  17. Hi to everyone. My problem is that I wanna fill my dialog by calling a funcion after creating it, but it doesn't work at all. I mean, the dialog is created but empty. Here's my code: When I wanna create the dialog I use ["INIT"] call my_function; disableSerialization; private _ui = uiNamespace getVariable "MyDialog"; private _list = _ui displayCtrl 1600; private _cat = _ui displayCtrl 1601; private _categories = "true" configClasses (getMissionConfig "HG_DefaultShop"); actDialog = { lbClear _list; _num = _this select 0; private _object = getText( _categories select _numCat >> "displayName"); _cat ctrlSetText _objeto; //Some lb commands. }; switch (_this select 0) do { case "INIT": { createDialog "MyDialog"; _num = 0; [_num] call actDialog; }; }; I hope u guys can help me! Thanks!!
  18. I was wondering how one could go about using a Trigger to Spawn a Function once a player enters a Trigger's area. Then delete the Function once the player leaves the Trigger? While having that process repeatable. So far I have tried using the Trigger's Activation field to call the Function (BIS_fnc_Crows), and then the Trigger's Deativation field to delete that Function. However that's where my problem is. As everything I have tired..including searching the internet and using script commands such as deleteVehicle and other similar commands has all failed! I know it's possible as I have done similar things in the past but it dont help that I have not scripted anything since early A2 days, and A3 is seemingly more complex.
  19. hello guys, i've run into a strange problem and really have no idea where start to look for a solution! i've my big function container (its a big read, i post it just for the records...): ...it contains all my functions for this mission, but...when i launch mission, it start say that FUNCTION_NAME is not defined (where "FUNCTION_NAME" is the name of one of my functions, that as you can see are defined. i pre-load the file containing the functions in my initServer.sqf : call compile preprocessFile "DDscripts\DWARfunctions.sqf"; null = [] spawn SPAWNERconvoyB; null = [] spawn SPAWNERconvoyR; null = [] spawn SPAWNERciv; null = [] spawn SPAWNERind; null = [] spawn SPAWNERmine; even more strange, i noticed adding >> uiSleep 10; between a function spawn and another, some start to work!! i even started to think its like the functions are not pre-loaded, and server dont recognize them ! but isnt supposed to do this the >> calling compile preProcessFile ... ?? i'm seriously confused....any light on this? thanks !
  20. Ok, that's a bit of a complex problem. As far as I know arma uses 2 kinds of variables: private and global and that will be the biggest problem here. I'm trying to call a script from a object (Data Transmiter) that will add a Hold Action to it. No problem for now and works as intended for a single Data Transmiter. But when I use the same script for a second Data Transmiter only the second one will work. Why that happens? Because some parts of the code requires global variables. So, how can I fix it? I honestly have no idea. That's the code for reference, just call it with a handle = [this] execvm "name of the file.sqf" and should work. //select object name and apply to global _datalinkname = this select 0; datalinkname = _datalinkname; //params ["_datalinkname"]; //Set Datalink Color [datalinkname,"blue","orange","red"] call BIS_fnc_DataTerminalColor; //open/arm function fn_potato = { [ datalinkname , "Hack DataLink", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "_this distance _target < 3", "_caller distance _target < 3", { systemChat "Start Hacking"; }, { playSound3D ["a3\sounds_f\sfx\beep_target.wss", datalinkname, false, getPosASL datalinkname, 1, 1, 0] }, { [datalinkname, 3] call BIS_fnc_DataTerminalAnimate; sleep 5; hint "after 5 sec..."; playSound3D ["A3\Sounds_F\sfx\alarm.wss", datalinkname, false, getPosASL datalinkname, 1, 1, 0]; datalinkname call fn_potato2 }, {}, [], 3, 0, true, false ] remoteExec ["BIS_fnc_holdActionAdd", 0, datalinkname]; }; //close/disarm function fn_potato2 = { [ datalinkname , "Hack DataLink", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "_this distance _target < 3", "_caller distance _target < 3", { systemChat "Start Hacking"; }, { playSound3D ["a3\sounds_f\sfx\beep_target.wss", datalinkname, false, getPosASL datalinkname, 1, 1, 0] }, { [datalinkname, 0] call BIS_fnc_DataTerminalAnimate; sleep 5; hint "after 5 sec..."; playSound3D ["A3\Sounds_F\sfx\alarm.wss", datalinkname, false, getPosASL datalinkname, 1, 1, 0]; datalinkname call fn_potato }, {}, [], 3, 0, true, false ] remoteExec ["BIS_fnc_holdActionAdd", 0, datalinkname]; }; //calls first function datalinkname call fn_potato;
  21. edit: completely replaced the code so no longer interested in help. Trying to find the delete button vOv
  22. [“$STR_HGY_ID_Frost”,“$STR_HGY_kb_MeetCivilian_Frost_1”] spawn BIS_fnc_showSubtitle; not work。 how to display Written words?
  23. I have a function that i need to call when all the opfor is dead in a dynamically created trigger area. This function contains a sleep. I have tried all sorts of diff delays, all caused issues because i was using call in the dynamically created trigger statements. I have tried using a dynamically created trigger to create another trigger but for some reason it just kept creating triggers on load rather than after the opfor were dead. I have tried using spawn in both the int and the dynamically created trigger to fire the function for the first time. In the statement for the dynamically created trigger i used spawn to call the function that inevitably dynamically creates a new trigger. but for some reason like in my previous tests the trigger statement is getting activated on creation. i have been at this Arma 3 scripting for a week now and i keep running in to issues like this. I really could use some help on this.
  24. I keep getting a "zero divisor" error when trying to select from an array after using the find command. The basic situation is; 16 people each with their own individual waypoints. When the units reach the waypoint, the following is executed: For units in group 1: nul = [this,1] execVM 'law\setRotation.sqf'; For units in group 2: nul = [this,2] execVM 'law\setRotation.sqf'; setRotation.sqf contains the following: params [["_subject", objNull],["_typeCode", 0]]; if (_typeCode == 0) then { //Insert Code to generate error report here }; if (_typeCode == 1) then { _unitsAlpha = [ pak_mainyu1_2, pak_mainyu1_3, pak_mainyu1_4, pak_mainyu1_5, pak_mainyu1_6, pak_mainyu1_7, pak_mainyu1_1, pak_mainyu1_8 ]; _positionInQueue = _unitsAlpha find _subject; _bearingsBriefing_alpha = [ 271.587, 250.801, 225.084, 202.869, 172.511, 147.108, 26.615, 20.786 ]; _bearingFrom = _bearingsBriefing_alpha select _positionInQueue; _startPos = getPosAtl _subject; _watchTarget = [_startPos,3,_bearingFrom] call BIS_fnc_relPos; _watchTarget set [2,1.8]; _subject doWatch _watchTarget; }; if (_typeCode == 2) then { _unitsBravo = [ pak_mainyu2_2, pak_mainyu2_3, pak_mainyu2_4, pak_mainyu2_5, pak_mainyu2_6, pak_mainyu2_7, pak_mainyu2_1, pak_mainyu2_8 ]; _positionInQueue = _unitsBravo find _subject; _bearingsBriefing_bravo = [ 271.587, 250.801, 225.084, 202.869, 172.511, 147.108, 26.615, 20.786 ]; _bearingFrom = _bearingsBriefing_bravo select _positionInQueue; _startPos = getPosAtl _subject; _watchTarget = [_startPos,3,_bearingFrom] call BIS_fnc_relPos; _watchTarget set [2,1.8]; _subject doWatch _watchTarget; }; What i can't figure out is why it's trying to select a value that's out of range. There are 8 units in each group, a matching set of 8 names in the _unitsX arrays, and 8 entries within the bearing array. Should be a simple case of 1 - obtain unit name from waypoint completion 2 - find name within array 3 - select corresponding bearing from the bearing array I ran a separate test to go through the same process 1 by 1 which passed without error, so I'm guessing it's to do with some of these waypoints being completed at the same time: _testGroup = [ pak_mainyu2_1, pak_mainyu2_2, pak_mainyu2_3, pak_mainyu2_4, pak_mainyu2_5, pak_mainyu2_6, pak_mainyu2_7, pak_mainyu2_8 ]; { player sideChat (format ["Subject: %1",_x]); _subject = _x; _unitsBravo = [ pak_mainyu2_2, pak_mainyu2_3, pak_mainyu2_4, pak_mainyu2_5, pak_mainyu2_6, pak_mainyu2_7, pak_mainyu2_1, pak_mainyu2_8 ]; _positionInQueue = _unitsBravo find _subject; player sideChat (format ["PosInQ: %1",_positionInQueue]); _bearingsBriefing_bravo = [ 271.587, 250.801, 225.084, 202.869, 172.511, 147.108, 26.615, 20.786 ]; //player sideChat (format ["Subject: %1, Position: %2",_subject,_positionInQueue]); _bearingFrom = _bearingsBriefing_bravo select _positionInQueue; player sideChat (format ["BearingFrom: %1",_bearingFrom]); _startPos = getPosAtl _subject; _watchTarget = [_startPos,3,_bearingFrom] call BIS_fnc_relPos; _watchTarget set [2,1.8]; _subject doWatch _watchTarget; sleep 3; } forEach _testGroup; Maybe there's something to do with using local variable handles that I'm not understanding here. Thanks, Law
  25. Hello. I am pretty sure this is a question that has been answered many many times but I really can't make differences between each of the forums topics that I have found so far. Everyone tells the same, yet for a totally different question. So I thought I might as well just create a topic and ask my questions here. Pretty sure someone will answer it sooner or later. 1. When I have multiple functions, in multiple SQFs, is it better to call them 1 by 1 with ExecVM or call them with compile or should I create functions.hpp ? -I want to use all of the scripts, and most of them are going to be used later in the mission. -Most of the scripts have a return value -Is there going to be any performance difference? 2. If I have a really huge script, (literally a random mission spawner with multiple arrays and public variables) is it better to compile it or execVM it? -The script is called each time a mission is finished. -It contains loops and many scopes -It doesn't return anything 3. If I have scripts that I want to run only on the client side, and not on the server side, do I still need to execVM it on the server? -Respawn scripts / spawn protection / addactions -Contains loops Furthermore, I want to know what is the time difference between execVM and Call? If I run bug functions multiple times, do they have a performance impact on the server? For example in the case of creating private arrays again, etc.