Jump to content

Search the Community

Showing results for tags 'SQF'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • BOHEMIA INTERACTIVE
    • BOHEMIA INTERACTIVE - NEWS
    • BOHEMIA INTERACTIVE - JOBS
    • BOHEMIA INTERACTIVE - GENERAL
  • FEATURED GAMES
    • Arma Reforger
    • Vigor
    • DAYZ
    • ARMA 3
    • ARMA 2
    • YLANDS
  • MOBILE GAMES
    • ARMA MOBILE OPS
    • MINIDAYZ
    • ARMA TACTICS
    • ARMA 2 FIRING RANGE
  • BI MILITARY GAMES FORUMS
  • BOHEMIA INCUBATOR
    • PROJECT LUCIE
  • OTHER BOHEMIA GAMES
    • ARGO
    • TAKE ON MARS
    • TAKE ON HELICOPTERS
    • CARRIER COMMAND: GAEA MISSION
    • ARMA: ARMED ASSAULT / COMBAT OPERATIONS
    • ARMA: COLD WAR ASSAULT / OPERATION FLASHPOINT
    • IRON FRONT: LIBERATION 1944
    • BACK CATALOGUE
  • OFFTOPIC
    • OFFTOPIC
  • 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 Green Sea
  • TKO's Rules
  • TKO's Changelog
  • TKO's Help
  • TKO's What we Need
  • TKO's Cam Lao Nam
  • 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
  • CREATEANDGENERATION's Intoduction
  • CREATEANDGENERATION's HAVEN EMPIRE (NEW CREATORS COMMUNITY)
  • HavenEmpire Gaming community's HavenEmpire Gaming community
  • Polska_Rodzina's Polska_Rodzina-ARGO
  • Carrier command tips and tricks's Tips and tricks
  • Carrier command tips and tricks's Talk about carrier command
  • ItzChaos's Community's Socials
  • Photography club of Arma 3's Epic photos
  • Photography club of Arma 3's Team pics
  • Photography club of Arma 3's Vehicle pics
  • Photography club of Arma 3's Other
  • Spartan Gamers DayZ's Baneados del Servidor
  • Warriors Waging War's Vigor
  • Tales of the Republic's Republic News
  • Operazioni Arma Italia's CHI SIAMO
  • [GER] HUSKY-GAMING.CC / Roleplay at its best!'s Starte deine Reise noch heute!
  • empire brotherhood occult +2349082603448's empire money +2349082603448
  • NET88's Twitter
  • DayZ Italia's Lista Server
  • DayZ Italia's Forum Generale

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Jabber (xmpp)


Skype


Biography


Twitter


Google+


Youtube


Vimeo


Xfire


Steam url id


Raptr


MySpace


Linkedin


Tumblr


Flickr


XBOX Live


PlayStation PSN


Origin


PlayFire


SoundCloud


Pinterest


Reddit


Twitch.Tv


Ustream.Tv


Duxter


Instagram


Location


Interests


Interests


Occupation

Found 84 results

  1. I am surprised no one has asked the question. There is a LINQ for JavaScript, and even with the nuances and inconsistencies in the Arma 3 SQF specification, and it seems to me as though SQF is at least a neighbor if not a cousin of JavaScript. There are times when it seems like it might benefit from LINQ. Particularly with the ability to easily ad-hoc functions and such. Thoughts?
  2. Hello there, I have been trying to delete an ammo crate with sqf if its inventory is empty (the one I'm using is "Box_NATO_Wps_F"). But I can't seem to figure it out. Any and all help is appreciated thanks :). I have tried things such as using getWeaponCargo and counting it to see if I can check if the array is empty but it always stays at 2 even if there is nothing inside the box.
  3. Hello folks, I am currently working on a mission designed for training puposes. The mission is build upon the OlsenFramework, a mission making framework. Links are to either githubs. I am running into the following problem: a) If I test the mission in the Eden Editors host environment and singleplayer, all code executes flawslessly when addEventHandler is used (obviously no MP). b) When tested on a dedicated server, the EventHandlers (addEventHandler and addMPEventhandler) will not fire at all. This was tested via systemChat messages. The code: (All code can be viewed on the github linked, its the latest changes made and the last version tested on the server) A few months back I was given a script by my units training officer to work with popup targets but it was split in a multitude of files and also only worked partially on dedicated, which I did not like so I rewrote it into a single script. The origin of that code is not known to me, so forgive me for the missing credits. In the init.sqf of the mission, I call code which adds a line of code to each targets which apparently is supposed to 'fix' swivel targets not working in multiplayer dedicated environments. This can be found here. As far as I unterstand this is supposed to disable animation control on all clients (including non dedicated servers and HC), but sofar the targets still behave crappy. if (!isDedicated) then { _localTargets = (entities "Target_Swivel_01_ground_F") + (entities "Land_Target_Swivel_01_F"); { _x setVariable ["BIS_exitScript", false]; } forEach _localTargets; }; later I call my script which is mainly in control of the targets: popup.sqf once via the init.sqf to get all targets into a down position at mission start. This works flawless. Fnc_popup is the same as popup.sqf just processed via: Fnc_popup = compile preprocessFileLineNumbers "customization\popups.sqf"; if (isServer) then { [false,"init",500,initCenter] remoteExec ["Fnc_popup", 2]; }; Players being Instructors are makred via a variable "isInstructor" only players with this restriction will have access to the popup addAction ... actions. Which are placed on landBoards in the mission. en example from the addAction.sqf looks like this: Fnc_popup = compile preprocessFileLineNumbers "customization\popups.sqf"; if (!isDedicated) then { waitUntil { (player == player) }; if (player getVariable "isInstructor") then { arBoard addAction ["<t color='#FF0000'>Raise Bunker Targets",{[true,"setup",15,bnkTgts] remoteExec ["Fnc_popup", 2];}]; arBoard addAction ["<t color='#FF0000'>Lower Bunker Targets",{[false,"reset",15,bnkTgts] remoteExec ["Fnc_popup", 2];}]; }; }; This calls a precompiled form of popup.sqf and now the problöem occurs that everything in that popup.sqf works, except for the damn eventHandlers place on the trainingTargets. case init and case reset work, and throw no script errors. This is the popup.sqf file content: /////////////////////////////////////////////////////////////////////////////////////////// //Script to be called by inits or scripts for operating swivel and popup //targets around a specified object "_center". //params: [ShouldTargetsAutoPop?,WhichSwitchShouldRun?,WhatDistanceFromObject?,WhatObject?] //By PaxJaromeMalues /////////////////////////////////////////////////////////////////////////////////////////// params [["_popenabled",false],["_execution","init"],["_dist",25],["_center",initCenter]]; _targets = nearestObjects [position _center, ["TargetBase"], _dist]; _SwivelTargets = nearestObjects [position _center, ["Target_Swivel_01_base_F"], _dist]; switch (_execution) do { case "init": { { _x setVariable ["nopop", true]; _x animateSource ["terc",1] } forEach _targets; { _x setVariable ["BIS_poppingEnabled", false]; _x animateSource ["terc",1]; } forEach _SwivelTargets; }; case "setup": { "setup called" remoteExec ["systemChat"]; if (_popenabled) then { "popup first condition" remoteExec ["systemChat"]; { _x animateSource ["terc",0]; _x addMPEventHandler [ "MPHit", { "popup first condition EH before CBA" remoteExec ["systemChat"]; (_this select 0) animateSource ["terc",1]; [{ (_this select 0) animateSource ["terc",0]; "popup first condition EH in CBA" remoteExec ["systemChat"]; }, _this, 2 + (random 3)] call CBA_fnc_waitAndExecute; } ] } forEach _targets; } else { "popup second condition" remoteExec ["systemChat"]; { _x animateSource ["terc",0]; _x addMPEventHandler [ "MPHit", { (_this select 0) animateSource ["terc",1]; (_this select 0) removeEventHandler ["MPHit",0]; } ] } forEach _targets; }; if (_popenabled) then { "swivel first condition" remoteExec ["systemChat"]; { _x animateSource ["terc",0]; _x addMPEventHandler [ "MPHitPart", { ((_this select 0) select 0) animateSource ["terc",1]; [{ ((_this select 0) select 0) animateSource ["terc",0]; }, _this, 2 + (random 3)] call CBA_fnc_waitAndExecute; } ] } forEach _SwivelTargets; } else { "swivel second condition" remoteExec ["systemChat"]; { _x animateSource ["terc",0]; _x addMPEventHandler [ "MPHitPart", { ((_this select 0) select 0) animateSource ["terc",1]; ((_this select 0) select 0) removeEventHandler ["MPHit",0]; } ] } forEach _SwivelTargets; }; }; case "reset": { "reset called" remoteExec ["systemChat"]; { _x removeEventHandler ["MPHit",0]; _x animateSource ["terc",1]; } forEach _targets; { _x animateSource ["terc",1]; _x RemoveEventHandler ["MPHitPart",0]; } forEach _SwivelTargets; }; }; I have been sitting at this problem for over a month now, and have no idea what I am doing wrong here. Pls help.
  4. Hello, I'm incredibly new to scripting and have no idea really what I'm doing but by reading forums I've gotten this far. So, I play OPTRE with some friends a lot. We decided that the default armaments on the Pelican weren't really all that hot, so we used commands in the Pelican's init in EDEN to spawn it with some extra firepower. The problem lies in the fact that I have the vehicles sync'd to the Vehicle Respawn module. Whenever they automatically respawn at base, they respawn with default armaments, not the 30mm cannons nor JIAN missiles we added in EDEN. Is it possible to add the custom weapons every time they spawn via a script? What I use currently for them is the following: "this addWeaponTurret ["gatling_30mm",[0]]; this addMagazineTurret ["250Rnd_30mm_HE_shells",[0]]; this addMagazineTurret ["250Rnd_30mm_HE_shells",[0]]; this addMagazineTurret ["250Rnd_30mm_APDS_shells",[0]]; this addMagazineTurret ["250Rnd_30mm_APDS_shells",[0]]; this addMagazineTurret ["250Rnd_30mm_APDS_shells",[0]]; this addMagazineTurret ["250Rnd_30mm_APDS_shells",[0]]; this addWeaponTurret ["missiles_Jian",[0]]; this addMagazineTurret ["4Rnd_LG_Jian",[0]]; this addMagazineTurret ["4Rnd_LG_Jian",[0]]; this addMagazineTurret ["4Rnd_LG_Jian",[0]]; this addMagazineTurret ["4Rnd_LG_Jian",[0]]; this addMagazineTurret ["4Rnd_LG_Jian",[0]];" Any help on compiling an SQF to spawn the vehicles with these armaments would be much appreciated. Thank you!
  5. Reserved slot script for arma 3 mission working on mp and sp https://github.com/alezm00/AZM_Functions/tree/master/res_slot.Tanoa https://github.com/alezm00/AZM_Functions/ put [] execVM "Reservedslots.sqf"; in the init.sqf then open the file reservedslots.sqf and edit the main functions [Arma3 UID, slot variable name] call AZM_RESERVED_SLOT;
  6. Hi there can anyone assist me with using layers to hide a selection of entities using boolean logic or variables for example. Right now I want to make a ship appear depending on the faction selected in the parameter screen. The wiki describes its many uses for the 3DEN layers like remove,add and set, it also describes the syntax but I'm finding it hard to get working correctly. Another thing I don't understand is, are the entities "linked" to the value -1 or is it "linked" to the "Enemy Base" String?
  7. I was wondering if there is any way to require data from .json files inside q .sqf file. Or anything that covers that functionallity. The thing is: when a player buy a new custom loadout on the website, a post request is made with his ID to a file. Then, the if statemant checks the json file to watch for the player ID instead to watch for it on the array. the execVM function can do this? there is other way? Thank you all. //Default way for doing this if ((getPlayerUID player) in ["456789123"]) then { //Donators: Nobody DefaultMagazines = [{custom_items}]; DefaultWeapons = [{custom_items}]; DefaultBackpack = "{custom_item}"; DefaultBackpackWeapon = "{custom_item}"; }; //Exepected way loadout.sqf if ((getPlayerUID player) in {file.json} ) then { //Donators: Nobody DefaultMagazines = [{custom_items}]; DefaultWeapons = [{custom_items}]; DefaultBackpack = "{custom_item}"; DefaultBackpackWeapon = "{custom_item}"; }; //JSON with the buyers ID's file.json {[ '123456789','987654321', '159753468',..... ]}
  8. edit: completely replaced the code so no longer interested in help. Trying to find the delete button vOv
  9. Hello, developers! As I see SQF having more and more functions added, this came to my mind. The title explains everything. Obviously the engine has the path finding algorithm built in, as it finds paths for AIs all the time. Other mission/mod creators might find it useful. Would it be possible to expose it to the SQF scripting language? Or are there huge problems, like it must be called asynchronously because it takes a lot of time? There are some solutions implemented already in SQF but the engine-based solution will work faster for obvious reasons. Thanks!
  10. I couldn't find any script/tool/addon which would provide such a basic functionality: how much is ARMA's SQF scheduler loaded right now? Can I run a check every X milliseconds, with the given other scripts running in background? When we are spawning many different SQF scripts with infinite loops we want to know how much the SQF scheduler is loaded with these scripts. Typically we would try to force the scheduler to execute a simple script and observe the delay between spawning the script and its output. For instance you could spawn a lightning with Zeus and estimate the delay. How it works: The script I suggest uses the same idea: it runs an infinite loop, where it tries to execute a piece of code as often as the scheduler lets and measuring time intervals between executions. If the scheduler is flooded with many heavy scripts then sequential executions of our tiny script will happen less often. The script also performs exponential averaging of measured intervals. What it shows: It shows the delay between executions described above. The delay can help us understand the maximum frequency at which your loops can run(average). It also outputs the overload, measured in percents, which is equal to: overload=100*game FPS*delay=100*game_FPS/SQF_FPS. So if the "overload" is around100%, SQF scripts are running at roughly the game's frame rate. If it is 200%, then spawned SQF scripts are running at half the game's frame rate, and so on. Why not just measure performance of single scripts with standard methods? Maybe you are running other people's scripts in the mission, or you want to get an overview, how much load all the scripts produce. How to use it: Run this locally: Measurements will be output to system chat. You can fine-tune _a to perform smaller or bigger averaging (smaller _a -> bigger averaging). [] spawn { sl_prev = time; private _i = 0; private _ds = 0; // Smoothed value of delta private _a = 0.009; // private _N = 30; while {true} do { sleep 0.001; private _t = time; // Get current time private _delta = _t - sl_prev; // Calculate time passed since previous measurement sl_prev = _t; // Store the new time back _ds = _a * _delta + (1-_a)*_ds; // Exponential averaging //Output value every N measurements _i = _i + 1; if (_i == _N) then { _i = 0; private _overloadPercent = round(100*diag_fps*_ds); systemChat ((format ["Scheduler delay: %1 ms, overload: %2", round(_ds*1000), _overloadPercent]) + "%"); // Calculate new value for N to produce outputs every 0.5 seconds _N = ceil(0.5/_ds); }; }; If you want to quickly test the script here's a dummy load you can use. Just run it a few times: for [{_i=0}, {_i<5}, {_i=_i+1}] do { [] spawn { sleep random 1; while {true} do { sleep 0.5; private _a = []; //6 ms @ Core i7 3770 _a set [70, 0]; _a = _a apply {2}; { private _sum = 0; { _sum = _sum + _x; }forEach _a; } forEach _a; }; }; }; Please share what you think about this!
  11. hello guys, is there any *.sqs to *.sqf converter program ? i tried to do it manually, but its a mess...i'm not used to "goto" command and have lot of troubles re-thinking the logic behind the script ! thanks for any help!
  12. class b_textScrollBox: RscControlsGroup { idc = -1; text = ""; //--- ToDo: Localize; x = 0.371094 * safezoneW + safezoneX; y = 0.654 * safezoneH + safezoneY; w = 0.381563 * safezoneW; h = 0.341 * safezoneH; class Controls { class b_textBox: RscStructuredText { idc = 1000; text = "b_textBox"; //--- ToDo: Localize; x = 0.291094 * safezoneW + safezoneX; y = 0.22 * safezoneH + safezoneY; w = 0.381563 * safezoneW; h = 0.341 * safezoneH; }; }; }; Hi, I'm trying to create a script that will expand the RscStructuredText text box above's height dynamically based on the text passed to the script. For example: 0 = ["this is some test text..."] execVM "addText.sqf"; So far Ive figured out how to expand and shrink the height of the text box. For an example of what I mean this script would double the height of the RscStructuredText control: _t = _this select 0; (_display displayCtrl 1000) ctrlSetStructuredText (parseText _t); _pos = ctrlPosition (_display displayCtrl 1000); _height = 2 * (_pos select 3); (_display displayCtrl 1000) ctrlSetPosition [(_pos select 0),(_pos select 1),(_pos select 2),_height]; (_display displayCtrl 1000) ctrlCommit 0; However I'd like to expand the height with precision so the scroll bar only goes to the bottom on the text. Could anyone point me in the right direction? Thanks.
  13. Hello! As ARMA's scripts spawned inside the scheduler behave as separate threads, it seems logical to me to have a way to estimate how much percents of total scheduler run time is taken by every spawned script, similar to what a task manager in any OS shows for started processes. Am I missing something, or is there really no such feature in ARMA? Thanks!
  14. Hello, I'm trying to make heads or tails of getting around an error that I'm getting when attempting to make Radio Channels to specific units to private communication between Zeus to Squad Leaders. The error is that the variables are undefined for the radioChannelCreate when the unit with the variable does not exist. I'm thinking I will need a !isnull check to an array but I'm unsure how to implement this as I am still very new to Arma scripting. Here is the code I am using, Most of this is from a script I found on another post: if(isServer) then { west_channel = radioChannelCreate [[0, 0.2, 1, 1], "GM-Bluefor", "Game Master", [bz1,bz2,mz1,mz2]]; east_channel = radioChannelCreate [[1, 0, 0.2, 1], "GM-Redfor", "Game Master", [rz1,mz1,mz2]]; independent_channel = radioChannelCreate [[0, 1, 0.2, 1], "GM-Independent", "Game Master", [iz1,mz1,mz2]]; RADIO_fnc_manage = { private["_unit","_channel","_bool"]; _unit = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param; _bool = [_this,1,false,[false]] call BIS_fnc_param; _channel = [_this,2,0,[0]] call BIS_fnc_param; //Series of checks? if(isNull _unit) exitWith {}; //Null unit if(_channel < 1) exitWith {}; //No channels below 1 should be passed. switch (_channel) do { case 1: { if(_bool) then {west_channel radioChannelAdd [_unit];} else {west_channel radioChannelRemove [_unit];};}; case 2: { if(_bool) then {east_channel radioChannelAdd [_unit];} else {east_channel radioChannelRemove [_unit];};}; case 3: { if(_bool) then {independent_channel radioChannelAdd [_unit];} else {independent_channel radioChannelRemove [_unit];};}; }; }; }; Variables "bz1, bz2, mz1, mz2, iz1, rz1" is referencing unit's I've placed within Eden Editor with those variables tagged to them. E.g, "bz1" = Blufor Zeus or "mz1" = Master Zeus The intention of this script is to allow private communication from Squad leaders. (In this case bz1,bz2,iz1,rz1) to have separate channels to the two Master Zeus's which will be acting as "game masters" That is not seen by anyone outside of the units aforementioned. > I am using RHS, ACE, CBA Pack, ARES:Achilles and TFAR mod's as well.
  15. Website > Server Code | Execution System (Node.JS) Made By Optix Special Thanks to KilzoneKid for his release of the URL_Fetch DLL's V0.0.1 For those of you who do not understand or know what this is, in basic, it is a system of executing code on a server without physically being on it. How this works essentially it uses node.js to handle specific commands and does stuff with them. I personally use Glitch.Io to host my node.js server. it is a free service that allows you host your node.js project online and develop upon it live. This system contains one mod folder @Optix_WebExec which contains the necessary files that hold the Arma functions that use KK's URL_Fetch dll. This is required to make the connection to the Node.js server and pull the content that is due to be executed. BEFORE ANYONE STARTS THINKING THIS CAN BE USED MALICIOUSLY IT CANNOT ITS FULLY SERVER SIDED AND CAN ONLY BE USED IF PEOPLE HAVE THE SERVERS CORRECT LINK DEFINED IN A CONFIG! How to Use: your Node.js server link here / exec / sqf code here - This is what is used to add code to the file which Arma server checks every x amount of seconds, This can be defined in the config file found in Optix_WebExecConfig.pbo. Please note that in the case you pass any code containing irrelevant content to sqf or code containing any syntax errors currently will stop the server loop from executing correctly (Due to the errors), I have been working on a system to automatically handle and log this but had issues during the process and wanted to release asap so currently this version does not contain this feature, but stay tuned for updates in the future. your Node.js server link here / log - This is what is used to view the systems logs. The system logs events such as server connections, code added to be executed and exec list clearing. your Node.js server link here / v - This returns the current version of Arma code exec. Setup: 1) Host your node.js server using the code provided using your prefered method of hosting. 2) Install the Arma Addon onto your Server NOT Client. (This is a server sided add-on and is by no means needed on any clients) 3) Configure the config found in the Optix_WebExecConfig.pbo 4) Use the above commands to carry out the desired process. Video Showcase: Files: Download the Project here: GitHub Kind Regards, Conner 'Optix' Add me on Steam :)
  16. Hi Guys, I am working on a huge Tanoan mission framework project, part of which there is a combat arena which I would like to be part of the 'story' as such. The overall concept is, a singular player walks up to Object, addactions 'Enter Arena', this creates a playable AI unit, the caller becomes the AI unit, once this unit is killed the player returns back to their previous unit. (The reason I am creating an AI unit: I cannot see a way to remove a players gear and then put it into a box or similar, so when they respawn the gear can be retrieved [This gear wouldn't necessarily be a normal load out]). I have been playing around and I think these commands are kind've what I am looking for, could anyone advice below?
  17. Hi, long time reader, first time poster. I've been getting into scripting a lot lately, I was always in and around it but recently trying to step it up a bit. I'm trying to write an IED script myself (i know there's a million out there) that searches for roads and places IEDs, IF there's x distance between this point and the last IED placed. This script has taken several forms as I try get it working properly, but this is my latest: Currently it will place IEDs (VR blocks) at very odd distanced from each other, some as little as 20m away. I also made up a script that will place IEDs on markers chosen at random and randomly choose the IED type - ultimately I want to merge these 2 together, but for now it's getting the spacing constraints to work that's my issue. Random marker + IED type script for anyone interested: Thanks for any input on this, I've been staring at it so long its becoming a blur of words :P
  18. Hey guys, I have a real strange problem. I'm not sure how to describe it exactly, and what is causing it, so I don't post a script snippet yet, until you tell me what you need to see. I hope someone can point me into the right direction. I wrote a few scripts which are simply "simulating" a conversation between the player and the civilian unit. It's executed by an "addaction" command added to all civilians. Finally the conversation leads whether to some intel, like an HVT, a weapons cache or hostages, which is being marked on the map after the conversation has been ended. It works very well so far. Also these side missions are working fine. The only and very strange thing is: After finishing such a mission (i.e. destroyed a weapons cache which intel was given by a civilian via conversation), everything is fine - EXCEPT when talking to a civilian then, there's no dialog visible anymore. Lips are moving (setrandomlip true;), sometimes intel is gathered (depends on players reputation and random selection), so to say: Everything is still working - except there's no chat (between player and civilian) visible anymore! And there's NO error in the log, "show script errors" startup commandline doesn't show anything, nothing can be found inside the RPT files, just nothing! I have to mention that the dialogs are visible as long as I don't finish any of the mission from collected intel. In example: When I talk to civilian, luckily get some intel about sth (i.e. hostages somewhere), then I can talk to any civilian and the dialogs (siechat) are visible AS LONG AS I don't rescue the hostages, But as soon as the hostages are rescued, dialogs will not be shown anymore when talking to civilians. I'm really at the end of knowledge..... no error messages, no possibitlity to debug this... What could be the rason for this behavior? Thank you very much in advance!
  19. Hi, I am using a function for conversations. It's defined in CfgFunctions and called via spawn command. Now I want to archive that conversation stops if the unit (conversation partner) gets killed. The units with the conversation action are civilians, spawned dynamically via Engima's Civilians script. I could do that with: // inside attached action to all civilian units: /* ...some code... */ handle = [params] spawn createConversation; // And this in unit's eventhandler: if (not isNil {handle} and {not scriptDone handle}) then { terminate handle}; The problem is, when I want to start another conversation now with a different unit, the conversation (or better saying: the createConversation function) doesn't execute anymore. How can I make sure that the function gets executed again? As I understand, the terminate command fires when the spawned script is processed the next time by the scheduler. In my case it immediately stops the conversation when the civilian gets killed, but it seems to also terminating the next started conversation, and so on. I also tried it without the "killed" eventhandler, and instead in units callback (like init field) did this: // No conversations with dead civs waitUntil { // exit when unit gets deleted if (isNull _unit) exitWith {true}; !alive _unit; }; sleep 1; _unit removeAction talk; if (not isNil {handle} and {not scriptDone handle}) then { terminate handle}; I couldn't find anything helpful... could someone help me, please? Thx in advance
  20. Hello everyone. I don't know how to desribe my problem in the title, my English isn't good enough on that.. I want let the script to randomly pick a marker. My problem is that the markers are being created dependant on the amount of towns on the map. It detects all towns and creates an invisible marker at each, with name "Mark_1", "Mark_2", etc... I need to know how can I let my script at first count all created markers (as each map has a different amount of villages) and then randomly pick one of these markers. The markers are being created as follows (a part of the script): towns.sqf /* Location finder for towns, villages and cities Places triggers and/or markers at these locations */ // Get each locations of villages or cities and create trigger/marker // Original script for finding locations by BrotherhoodOfHam // Final script by Godis if (!isServer) exitWith {}; //#define MARK #define OFFSET 0 _locations = (nearestLocations [[0,0,0], ["NameCity", "NameVillage", "NameCityCapital"], 40000]); { _xy = size _x; _trig = createTrigger ["EmptyDetector", position _x]; _trig setTriggerArea [ (_xy select 0) + OFFSET, (_xy select 1) + OFFSET, direction _x, false ]; _trig setTriggerActivation [ "WEST", "PRESENT", true ]; _trig setTriggerStatements [ "this", "hint 'Entered Village: Watch out in this area';", "hint 'Leaving Village...';" ]; //#ifdef MARK _mkr = createMarker [format ["Mark_%1", _forEachIndex], position _x]; _mkr setMarkerShape "ELLIPSE"; _mkr setMarkerAlpha 0.0; _mkr setMarkerSize [ (_xy select 0) + OFFSET, (_xy select 1) + OFFSET ]; //#endif } forEach _locations; // Now place units I thought I could just add a counter to towns.sqf, so I would get the total amount of all created markers stored in a variable, like: all_markers = 0; // Content of towns.sqf here (create markers) all_markers = all_markers + 1; // count each marker and store number in 'all_markers' But this would need another check for this variable's value, and also another code to select one of them according to the amount of created markers. I think it's kind of inconvenient. There must be another easier way to archive that, I guess. Is there any code I can use to get that in only a few lines? At the end I just need to: 1. find the amount of markers with name Mark_1, Mark_2, Mark_3, etc, etc 2. Randomly select one of these (i.e. to make it visible by setMarkerAlpha or sth else) Thanks in advance.
  21. Hi, I am working on my first mod which is supposed to add a new support module for zeus that works like the mortar or howitzer one but drop a huge smoke for cover purpose. My idea was to pop a first particle effect above the module placed (40 or 20 meters above) to simulate the shell detonating and the smoke falling to the ground. Then pop up a second particle effect on the ground to simulate the smoke coming back up and creating an effective cover (a wall of smoke). I used this mission and this wiki to test the different particles effects and then writing the correct "ParticleArray" in my script : I have the first part ready, I can place the module with zeus and the script is executed without any error but no smoke is displayed at all and I can't figure out why. Can anybody please take a look at my code? Config.cpp class CfgPatches { class rcdc_SmokeBarrage { name = "Smoke Barrage"; author = "Redleouf"; url = "https://github.com/boulayb/"; // author[] = { "Redleouf" }; // authorUrl = "https://github.com/boulayb/"; // version = 1.0.0; // versionStr = "1.0.0"; // versionAr[] = {1,0,0}; requiredVersion = 1.60; requiredAddons[] = { "A3_Modules_F", "A3_Modules_F_Curator" }; weapons[] = {}; units[] = { "rcdc_Module_SmokeBarrage" }; }; }; class CfgVehicles { class Logic; class Module_F : Logic { class ModuleDescription { class Anything; class EmptyDetector; }; }; class rcdc_Module_SmokeBarrage : Module_F { scope = 1; scopeCurator = 2; category = "Supports"; displayName = "Smoke Barrage"; // icon = "\rcdc_SmokeBarrage\data\iconBarrage.paa"; function = "rcdc_fnc_moduleSmokeBarrage"; functionPriority = 1; isGlobal = 1; isTriggerActivated = 1; isDisposable = 1; is3DEN = 0; side = 7; class ModuleDescription: ModuleDescription { description = "Smoke Barrage"; }; }; }; class CfgFunctions { class rcdc { class Supports { tag = "rcdc"; file = "\rcdc_SmokeBarrage\functions"; class moduleSmokeBarrage {}; }; }; }; fn_moduleSmokeBarrage.sqf _logic = param[0, objNull, [objNull]]; _activated = param[2, true, [true]]; if (_activated) then { hint "smoke dropped"; _pos = [position _logic select 0, position _logic select 1, 40]; _source = "#particlesource" createVehicleLocal _pos; _source setParticleCircle [ 0, // circle radius [0, 0, 0] // x y z velocity ]; _source setParticleRandom [ 0, // lifetime 0 for no random [0.25, 0.25, 0], // x y z position [0.175, 0.175, 0], // x y z velocity 0, // rotation velocity 0.5, // scale [0, 0, 0, 0], // r g b a color 0, // direction period 0, // direction intensity 0 // angle ]; _source setParticleParams [ ["\A3\data_f\cl_basic.p3d", 1, 0, 1, 1], // sprite, scale, anim start, nb of frames to play, loop "", // deprecated anim name "Billboard", // particle type 1, // timer period for onTimer script 5, // particle lifetime _pos, // x y z position [0, 0, 0], // x y z velocity 0, // rotation velocity 1, // weight -1, // volume (-1 makes the smoke go down without velocity) 0.1, // rubbing (bigger value makes the smoke move more) [2, 10, 4], // scale [[1, 1, 1, 1]], // r g b a color changing along the lifetime [0.08], // animation speed for each anim state 1, // random direction period 0, // random direction intensity "", // onTimerScript "", // DestroyScript _logic, // follow 0, // angle true, // on surface -1, // bounce on surface (disabled to save performance) [[0, 0, 0, 0]] // emissive color ]; _source setDropInterval 0.05; _source attachto [_logic, [0,0,0]]; hint "done"; }; true
  22. OFP LANGUAGE DEFINITIONS FOR NOTEPAD++ Language definitions for: SQS, SQF, EXT and CSV Comes in three different color schemes: black, orange and blue Notepad++ is a free, open source text editor with several and powerful built-in tools. I've been coding for OFP/CWA (and anything, really) with this text editor for years now, but it lacked a complete and updated SQS, SQF, etc language definition. That's why I decided to create one myself and sharing it with other OFP scripters. DOWNLOAD: - http://www.mediafire.com/download.php?cp6h9od9t24296y - http://www.multiupload.nl/183S10NIHH INSTALLATION 1. Decompress the zip file 2. Open Notepad++ 3. Click on "Language" (at the top menu) 4. Select "Define your language..." 5. Click on the "Import..." button, browse to the directory you decompressed the zip file and select one of the xml files of the scheme you want to use 6. Repeat step 5 until all the xml files of that scheme are imported 7. Restart Notepad++ 8. Open any SQS, SQF, EXT or CSV file. You'll see that now the syntax is correctly highlighted You can download Notepad++ from here: http://notepad-plus-plus.org/ -- I'm not sure if this is really the right place to post something like this. But being it related to scripting I thought it'd fit better here. Feel free to move this to wherever it should be if this isn't the right place. -- I just realized two things: I totally forgot about .ext syntax. And there's quite a lot of this stuff already posted, but all for Arma 2. Oh, well. I hope this is useful for someone else anyway. I'll update this with the .ext support later -- Ext suppport added. File updated
  23. Hi All Im making a script for a milsim unit i play with, and the script i made causes infinite loading screens, so far i havent been able to uncover the issue. So i hope someone here on A3 forum is able to help. Here is the ammobox init: this addAction ["<t color='#FF7722'>Recruit</t>", "loadouts\Recruit.sqf"]; this addAction ["<t color='#FF7722'>Rifleman UCP</t>", "loadouts\RiflemanUCP.sqf"]; this addAction ["<t color='#FF7722'>Rifleman</t>", "loadouts\Rifleman.sqf"]; this addAction ["<t color='#FF7722'>Anti Tank</t>", "loadouts\AntiTank.sqf"]; this addAction ["<t color='#FF7722'>Combat Engineer</t>", "loadouts\CombatEngineer.sqf"]; this addAction ["<t color='#FF7722'>Combat Medic</t>", "loadouts\CombatMedic.sqf"]; this addAction ["<t color='#FF7722'>Fire Team Leader</t>", "loadouts\FireTeamLeader.sqf"]; this addAction ["<t color='#FF7722'>Squad Leader</t>", "loadouts\SquadLeader.sqf"]; this addAction ["<t color='#FF7722'>Platoon Leader / 2IC</t>", "loadouts\PlatoonLeader.sqf"]; this addAction ["<t color='#FF7722'>MG M249</t>", "loadouts\MGM249.sqf"]; this addAction ["<t color='#FF7722'>MG M240</t>", "loadouts\MGM240.sqf"]; this addAction ["<t color='#FF7722'>Marksman</t>", "loadouts\Marksman.sqf"]; this addAction ["<t color='#FF7722'>Flight Medic</t>", "loadouts\FlightMedic.sqf"]; this addAction ["<t color='#FF7722'>Heli Pilot</t>", "loadouts\Pilot.sqf"]; this addAction ["<t color='#FF7722'>Jet Pilot</t>", "loadouts\JetPilot.sqf"]; The pupose is to make a box will all loadouts preset so a new player just have to mousewheel select class then boom all the required equipment to survive an operation. Here is the script for RiflemanUCP.sqf clearAllItemsFromBackpack player; clearBackpackCargo player; removeAllWeapons player; removeAllItems player; removeAllAssignedItems player; removeUniform player; removeVest player; removeBackpack player; removeHeadgear player; removeGoggles player; {player unassignItem _x;player removeItem _x} forEach assignedItems player; comment "Add containers"; player forceAddUniform "rhs_uniform_cu_ucp_101st"; for "_i" from 1 to 6 do {player addItemToUniform "ACE_fieldDressing";}; for "_i" from 1 to 6 do {player addItemToUniform "ACE_elasticBandage";}; for "_i" from 1 to 2 do {player addItemToUniform "ACE_CableTie";}; player addItemToUniform "ACE_EarPlugs"; for "_i" from 1 to 2 do {player addItemToUniform "ACE_epinephrine";}; player addItemToUniform "ACE_Flashlight_MX991"; player addItemToUniform "ItemcTabHCam"; player addItemToUniform "ACE_IR_Strobe_Item"; player addItemToUniform "ACE_MapTools"; for "_i" from 1 to 2 do {player addItemToUniform "ACE_morphine";}; for "_i" from 1 to 8 do {player addItemToUniform "ACE_packingBandage";}; for "_i" from 1 to 4 do {player addItemToUniform "ACE_tourniquet";}; player addVest "rhsusf_iotv_ucp_Rifleman"; for "_i" from 1 to 8 do {player addItemToVest "rhs_mag_30Rnd_556x45_Mk318_Stanag";}; for "_i" from 1 to 2 do {player addItemToVest "rhsusf_mag_15Rnd_9x19_JHP";}; for "_i" from 1 to 4 do {player addItemToVest "rhs_mag_an_m8hc";}; player addItemToVest "rhs_mag_m18_green"; player addItemToVest "rhs_mag_m18_red"; for "_i" from 1 to 2 do {player addItemToVest "rhs_mag_m67";}; for "_i" from 1 to 2 do {player addItemToVest "Chemlight_green";}; for "_i" from 1 to 2 do {player addItemToVest "ACE_Chemlight_HiRed";}; player addItemToVest "ACE_HandFlare_Green"; player addItemToVest "ACE_HandFlare_Red"; player addBackpack "rhsusf_assault_eagleaiii_ucp"; player addItemToBackpack "rhsusf_ANPVS_14"; player addItemToBackpack "Mask_M50"; player addItemToBackpack "murshun_cigs_cigpack"; player addItemToBackpack "murshun_cigs_matches"; player addHeadgear "rhsusf_ach_helmet_ucp"; player addGoggles "rhs_googles_clear"; comment "Add weapons"; player addWeapon "rhs_weap_m4a1_grip3"; player addPrimaryWeaponItem "rhsusf_acc_SF3P556"; player addPrimaryWeaponItem "rhsusf_acc_anpeq15_bk"; player addPrimaryWeaponItem "rhsusf_acc_ACOG"; player addPrimaryWeaponItem "rhsusf_acc_grip3"; player addWeapon "rhsusf_weap_m9"; player addWeapon "Binocular"; comment "Add items"; player linkItem "ItemMap"; player linkItem "ItemCompass"; player linkItem "ItemWatch"; player linkItem "tf_anprc152_3"; player linkItem "ItemAndroid"; comment "Set identity"; player setSpeaker "ACE_NoVoice"; Hope someone is able to find my error. Looking forward to your response.
  24. Greetings, I am encoutering a very strange problem and I wonder if anyone has a solution. The problem I have is that task manipulation via SQF (task functions) wont work inside triggers. For example, lets say that a trigger on activation does: hint "Activated"; task1 setTaskState "Suceeded"; Upon activating the trigger, the hint will appear but the task wont complete. If I do this via modules and sync it all works. This time, this failed with the setTaskState function, but I remember this happening with other task related functions. Does anyone have a solution to this problem? Cheers, Tansvanio
  25. Greetings everyone, I am sorry if my question is not apropriated here but I have searched and I have not found that which I seek. Is there any plugin, mod or custom settings that improves Arma 3's ingame editor scripting capabilities (the code windows in init, triggers etc) ? It would be great if it was possible to make those text boxes behave more like a normal text editor, with line droping, bracket completion and other things. Does anyone know something of the sort? Cheers, Tansvanio
×