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
    • 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 Server tweaks
  • Exilemod (Unofficial)'s Promotion
  • Exilemod (Unofficial)'s Maps - Mission Files
  • TKO's Weferlingen
  • TKO's Chernarus
  • TKO's Livonia
  • TKO's Rules
  • TKO's Changelog
  • TKO's Help
  • TKO's What we Need
  • 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

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 48 results

  1. TypeSqf Editor 0.68 by Engima Overview The TypeSqf Editor is a script editor for Arma 3. The most important features are: Syntax Highlighting Syntax Checking Auto Completion Folding Object Oriented Scripting (SQX Syntax) CPack Service (like nuGets in Visual Studio) Description The TypeSqf editor is a developer's tool for scripting in Arma 3. Besides using it to write SQF code with syntax highlighting and auto completion, it analyzes your syntax in real time, alerting you if something is erroneous or suspicious. Object Oriented Scripting The editor comes with an optional extended functionality for SQF syntax, called SQX. In a convenient way, and with as many similarities to SQF as possible, SQX enables object oriented scripting (classes) and adds type handling. Classes may contain a constructor, fields, properties and methods. It works because the .sqx files are compiled into corresponding .sqf files before executed by Arma 3. The CPack Service The CPack Service is a service for sharing content with other script editors as well as to organize your own code. In short a CPack is a content bundle (a .zip file) that you upload and label with a name and a version number. Then they are very easy for anyone to download and include in any mission. Download Download at Official TypeSqf Site. Installation / Usage 1. Open the zip file and run the installer. 2. Run TypeSqf from the start menu. (See the video "Getting started with the TypeSqf editor" below.) Code Code is shared at Github: https://github.com/XEngima/Apps-TypeSqfEdit Media: Getting started with the TypeSqf editor. Creating and using an SQX Crowd class in Arma 3 using the TypeSqf Editor. More videos: TypeSqf Features Part 1 - Getting started with TypeSqf TypeSqf Features Part 2 - Main Features TypeSqf Features Part 3 - The Power Of CPacks TypeSqf Features Part 4 - The CPack Console You can find all videos here. Feedback and error reports I will gladly receive any feedback. Please tell me good things, bad things, errors, whishes etc. Please use this forum thread for comments, but email all error reports to typesqf@outlook.com. Thanks to Josef - The main man on auto completion for script commands. Changelog Version 0.68 -Separated the analyzer window and the SQX build result window into two tabs in the editor (big thanks to Josef!). -Fixed: protected methods were not possible to collapse and expand. -Minor improvements and fixes. -SQX: Fixed serious issue when referencing properties in class inheritance with more than two levels. -SQX: Minor improvements and fixes. Version 0.67 -Added feature to create and deploy a PBO file directly from the TypeSqf editor to Arma's Missions or MPMissions (or a custom) folder. -Added support for all script commands up until Arma 3 version 1.94 (into ScriptCommands.xml). -Updated the file templates so that all methods now include parameters in the method header. -Minor fixes and improvements. -SQX: Added true inheritance. -SQX: Class properties can now be protected (and not only public like earlier), and have a protected setter. -SQX: Class methods can now be protected (and not only public or private like earlier). -SQX: Added the "return" statement. -SQX: Extended the method log tool to include return values (and not only calls like earlier). -SQX: Updated color themes - Go to Tools and reset the color themes for the changes to take effect. -SQX: Minor fixes and improvements. Version 0.66 -Minor GUI fixes. -SQX: Added settings option to enable logging of all method calls in the RPT log file. -SQX: Made it possible to reference private setters on private static properties from within class. Version 0.65 -Minor GUI fixes. -SQX: Fixed: Unwanted semicolons sometimes appeared during compilation. -SQX: Fixed: Sometimes the dot (.) had not highest precedence during compile. -SQX: Various fixes and improvements. Version 0.64 -Fixed: Parameters declared with "params" no longer generate a warning of not being used. -Minor fixes and improvements. -SQX: Made it possible to compile the current open file instead of the whole project. -SQX: Interface method declarations now require complete parameter list, e.g. "method String GetName("_unit" as Object);" -SQX: Class method declarations now allow alternative syntax for explicitly specified parameters, e.g. "public method Scalar GetAge("_unit" as Object) { ... };" -SQX: Added parameter check in calls to interface methods. Verson 0.63 -SQX: Fixed: Interfaces returning custom types not recognized as implemented in interfaced classes. Version 0.62 -SQX: Fixed: Type names no longer case sensitive. -SQX: Fixed: Parameters (params) with default value got wrong type. -Added all script commands for Arma 3 version 1.84 to ScriptCommands.xml. Version 0.61 -SQX: Added parameter check in calls to constructors (if first command in constructor is "params"). Version 0.60 -Added parameter check in calls to functions (if first command in function is "params"). -SQX: Added parameter check in calls to methods (if first command in method is "params"). -SQX: Added support for static fields in classes. -SQX: Added support for static properties in classes. -SQX: Fixed: Some Operators compiled incorrectly (e.g. the lookup operators >> and /). -SQX: Fixed: Compiler adds faulty semicolons at end of array elements. Version 0.59 -Added all script commands in Arma 3 version 1.76. -It is now possible for CPack authors to add a line to the top of description.ext. -Fixed: Crasch if the CPack installer tries to write to a file that is open by another process. -Fixed: Stability issues. -SQX: Analyzer improvements. Requirements Microsoft Windows. Other releases Engima's Traffic Engima's Civilians Engima's Simple Tasks
  2. I need a easier way to spawn random units instead of individually pulling all classes from the in game editor and pasting it while adding quotations and commas like this: ["B_mas_med_Army_ENG_F", "B_mas_med_Army_EXP_F", "B_mas_med_Army_GL_F",]. I want to use a script that when called it will pull a random unit from a given side of a given type (infantry, land, air) and spawn them in a group. The group will be filled with random units. I also want it to pull units from mods that I download. I dont want to have to keep updating the script every time I download another unit mod. The mod MMC sandbox has no problem in doing this but I dont know how they did it.
  3. Hellow, I found an intersting function BIS_fnc_3DENExportSQF in Eden editor. (link: https://community.bistudio.com/wiki/BIS_fnc_3DENExportSQF). I cant figure out how to use black list units or layers. Can someone help with it ? For example I have mission with layers witn names BASE and MISSION. How I can convert to sqf only MISSION layer and not convert BASE layer. Code: [ true, true, [0,0,0], true ] call BIS_fnc_3DENExportSQF;. Thanks.
  4. Generic error in expression! If you have had enough of these or similar log entries during the code development then this post is exactly for you! I'd like to use this post in order to present you a plugin I have written for the Eclipse IDE. It's named "SQDev" and it aims for providing the possibility to develop Arma projects from within Eclipse. But the goal is not only to simply provide the ability to do so, but rather give the developer as many tools as possible in order to facilitate the developing process. The live syntax check is only one example for such a facilitation. I am now working for about 3 years on this plugin and I now have the feeling that it is good enough to share it with you guys. Features Editors: There are editors included for the following file types: .sqf, .ext, .cpp, .hpp, .sqm and for a Stringtable.xml Basic syntax highlighting and content-assist for all editors Full macro support in all file types (highlighting + content-assist) Advanced syntax highlighting and content-assist for the SQF-Editor Live syntax-check and type checking for the SQF-Editor with basically no restrictions (in terms of the syntax-checking; Type checking still has some restrictions) - Just code in a way the Arma-engine understands and the plugin will get it too (minor exceptions aside) Project-wide syntax check - No need to open each file and check it for errors as the plugin will do that for you in the background Hover-Information for SQF commands including the majority of the information listed on the respective BIKI page The BIKI page of each command is only one click away when using the SQF-Editor Graphical user interface for editing the Stringtable.xml Wizards: NewProjectWizard - Creates a new mission with the needed folder infrastructure so you can start coding right away Import- and ExportWizard - Import and export your missions to and from eclipse NewFileWizard - Creates a new SQF-file with a generic header containing the name of the project, of the script itself and the author. Miscellaneous: A big settings framework allowing you to customize the plugin to your needs and preferences (Window -> Preferences) Integrated RPT-Viewer - No more switching between the editor and the file explorer in order to look into the local log files Custom SQDev perspective in eclipse that adapts the UI to the needs of a SQF scripter Parse tree visualization - See how the engine will interpret your code Supports both: Windows and Linux You are not dependent on me updating the plugin if a new SQF command is introduced as the plugin has a command-update functionality that reads all commands and the corresponding information from the BIKI itself. That means you can update the used commands whenever you feel the need for it (Can be done from within the preferences) Documentation A complete documentation of the plugin can be found here. It contains everything there is to know about the plugin. Part of it is of course how to install the plugin and how to get started with it. If you have any questions or need some help with the plugin you can join my discord channel (see Feedback and contact). Source code + Issue tracker The plugin is maintained on GitHub. That means you can at any time take a look into the source code of it. But it does also mean that all bug reports and feature requests have to be created there. If you experience a bug please follow the following steps: Make sure no one else has filed this bug before by having a look at the list of known bugs Try to reproduce the error - The more detail you can provide on this the likelier it is that the bug gets fixed Create a new issue on GitHub and describe the bug with as many details as possible Attach some general system information to your bug report. You can do so by using the "Plugin info creator" of the plugin itself that is accessible through the toolbar (red exclamation mark on a green circle) There is also a list of known feature requests, so please try to avoid duplicates. But you are more than welcome to comment on these requests so I can see what you are thinking about them. Feedback and contact You can leave your feedback here in this thread. However for faster responses and a more direct contact to me I'd suggest you to join my discord channel. Do not get confused because of my second Nickname (Raven) there. Media
  5. FuRixX Lamborghini

    Code question

    Any one can help my with this code that is a name filtering. script example: _letrasFuRixX = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","ñ","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","Ñ","O","P","Q","R","S","T","U","V","W","X","Y","Z"]; jugadorFu = name player; { checkeoFuRixX = [_x, jugadorFu, false] call BIS_fnc_inString; if (!checkeoFuRixX) exitWith { sleep 2; hint "You name is not valid in this server"; endMission "END1"; }; } count _letrasFuRixX; The problem is that I need to sparete the name player letter to letter like a string or anything: ["P","e","t","e","r"];
  6. FuRixX Lamborghini

    Arma 3 Code Question

    Hi I wanna to do a BadWords script so i need a code that check if any word are in the message Example code: _badwords = ["Bitch", "Fuck", "Fuck You"]; _message = "You are a Bitch"; //(imagine that this message was recover in a dialog that was the chat). // next code is the wrong if (_message in _badwords) then { hint "You said a bad word"; }; // 😧 that cant becouse to give true need that the badword contain all the message, is imposible so any can help me? Pd: thats not the code, this is and example, sorry if the code is very wrong but im writing in my iPhone the script :,o
  7. Test Lab Workshop for ARMA III, ver. BETA 0001 (2019) This download is compatible with APEX game version 1.7 and higher Drive Link Download: Test Lab New Live readMe file This download includes mission editor files. When my mission folder began to overflow with script test scenarios and VR compositions, I decided to create a master workshop file to use in the future. I considered what features should be built in. Hopefully this tool will be helpful for you, too. INSTALLATION Install the folder 0_testLAB.VR to your ArmA 3 mission folder (usually in Documents). Examples included: Images: Video: THANKS to everybody at: Bohemia Forums Check out our Patreon page Ascina Illustration & Design Arma Public License No Derivatives (APL-ND)
  8. SQF-VM The SQF emulator A fully working, open-source Virtual Machine for the scripting language of the ArmA Games. Links GitHub Repository Discord Invite Discord Bot Authorization Panel (for adding to your server) FAQ How to use this thing? To start using the SQF-VM, you just have to double click the executable. What can it be used for (examples)? Most obvious example is: you are using a laptop while traveling and wanna test some SQF code. More advanced users might even use this for unit-testing their code. Are there command line parameters available to eg. use this for unit-testing? Yes, there are. To get all, start the tool via command line and the parameter -? How to use the debug interface? There is documentation available on the github page inside of Documentation/Debugger. What is supported? To check what currently is supported and what is not, you can use the `help__ "name"` command. If it outputs proper descriptions, the command is fully supported. If it does not, then the command is not yet implemented sadly. I found a bug, what shall i do now? Try to narrow down the problem as much as you can and then head over to the github issues section to report the bug. I got a question that is not answered in here, what to do? Ask your question in this thread or in the discord channel and i might add it to this list :) Downloads All releases can also be found inside of the releases section of the github repository. 1.0-RC1 Alpha 0.1.4 Alpha 0.1.3 Alpha 0.1.2 Alpha 0.1.1 Alpha 0.1.0 Changelog 1.0-RC1 -/-
  9. Lint Summary SQFLint is command line tool, that checks specified files for syntax errors. It can output those errors in human readable format, or JSON for some futher processing. Homepage: http://sqflint.zipek.cz/ Releases: https://github.com/SkaceKamen/sqflint/releases Github: https://github.com/SkaceKamen/sqflint (extension moved to separate thread) Changelog You can find changelog at releases page Features Syntax error checking Undefined variable warnings Exports some info about file for futher processing by external tools
  10. Arma IntelliJ Plugin Current version: 2.0.2 (Released June 21, 2018) Index 1. Introduction 2. Features 3. Feature Spotlight 4. Planned Features 5. Download and Installation 6. Source Code 7. Donate 8. Wiki, Bug Reporting, Discord 1. Introduction Arma Intellij Plugin is a plugin developed by K-Town (me) for Intellij IDEA. Intellij IDEA is a Java IDE developed by Jetbrains and offers many amazing API's for creating support for custom languages to be used inside the Intellij editor. Intellij is free, but I recommend reading the license agreement regardless. 2. Features Arma Intellij Plugin has many features with more on the way. The plugin currently has: Syntax checking for Header files (*.h, *.hh, *.sqm, *.ext, *.hpp) and SQF files Description.ext Function lookup (See feature Spotlight a.) Documentation 'tags' which can link to command wiki documentation without opening the browser. Finding usages of variables and commands Syntax highlighting Rename refactoring for functions and variables Auto-completion (ctrl + space) Wiki documentation on commands and BIS functions via ctrl+Q Complete type checking (including arrays) Full preprocessor support for Header/Config files Partial preprocessor support for SQF Files 3. Feature Spotlight a. Auto-completion (more detail here) b. Syntax Checking c. Documentation Tags - detail here 4. Planned Features Automatic code formatting for SQF and Header Creating new mission files from scratch More code inspecting functionalities Other secret features ;) 5. Download and Installation Download: IntelliJ IDEA: Jetbrains Website Plugin (Optional download. See Install from JetBrains Plugin Repository below): GitHub: https://github.com/kayler-renslow/arma-intellij-plugin/releases JetBrains Plugin Repo: https://plugins.jetbrains.com/idea/plugin/9254-arma-intellij-plugin NOTE: both GitHub and JetBrains Repo include the same .jar files. You only need one plugin jar from one of the repositories to install. Install: To install the plugin, you do one of the following: Install it from disk with the .jar plugin download (see Plugin download above). Step 1: In Settings Dialog, click on "Plugins", click Install plugin from Disk. Step 2: Locate the "Arma Intellij Plugin.jar" (file name may have version info like v1.0.7) Step 3: Click OK button when you located the plugin jar and then Restart IntelliJ IDEA Step 4: You're good to go! Install it from JetBrains Plugin Repository. Step 1: In Settings Dialog, click on "Plugins", click Browse Repositories. Step 2: Search for "Arma Intellij Plugin" Step 3: Click Install and then Restart IntelliJ IDEA Step 4: You're good to go! 6. Source Code This project is open source. The plugin and it's creator (K-Town) aren't affiliated with Jetbrains or Bohemia Interactive. This project (the plugin code) is licensed under the MIT License. You don't need to contact me if you want to create derivatives or publish the project elsewhere. You can download and view the source here: https://github.com/kayler-renslow/arma-intellij-plugin 7. Donate I am accepting donations, but please only donate if you can afford it because I will not give refunds. Donate here. 8. Wiki, Bug Reporting, Discord The Wiki for the plugin is available. If you have been using the plugin already, you may still find something you don't yet know. Also, please report bugs at the Github repo. It's easier to manage than the forums and is specialized towards reporting bugs. You can report bugs here: https://github.com/kayler-renslow/arma-intellij-plugin/issues I have created a Discord server for Arma Dialog Creator and Arma IntelliJ Plugin. Here is the invite (remove the spaces in the link - they are to prevent bots): https://discord.gg/K d u 8 c q e
  11. 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. :)
  12. 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?
  13. Server Transfer System v1.0.3 The Server Transfer System (STS for short) is an addon that allows for the transferring of players from one server to another. STS is based off the code KillZone_Kid shared with his final post here. Expanding on KillZone_Kid's work, STS hides the transfer behind an overlay, making a nearly-flawless transition from one server to another. The transfer overlay will eventually allow customization, but currently is simply a black screen with "Please Wait" up top. This addon does not handle the saving, storing, nor transferring of character data. That will need to be handled by the end user. To transfer a client, the server must remoteExec STS_fnc_Transfer. Here is an example: //TIMEOUT = Transfer timeout (time till it gives up on joining the server in seconds) //AUTOJOIN = Automatically load into servers (mission must have joinUnassigned = false; in description.ext) ["IP","PORT",TIMEOUT,"PASSWORD",AUTOJOIN] remoteExec ["STS_fnc_Transfer",-2]; LICENSING + BI Monetization Rights DOWNLOAD AVAILABLE ON STEAM WORKSHOP CHANGE LOG v1.0.3 Now packed and signed with pboProject. Added: Overlay between transfers Bug: You can NOT transfer to the same server you are connected to. Bug: Transfering to a server without -autoinit will lock the game up. v1.0.2 Tweaked: Transfer script broken down into stages Added: Transfer completed script Added: Transfer failed script Fixed: Bug causing players to autoload into all future servers after Transfer is used. Bug: You can NOT transfer to the same server you are connected to. v1.0.1 Added: Autojoin Parameter ( Automatically loads the player into the server ) ( Server Must Have joinUnassigned = false; in description.ext ) Added: CfgSTS Config for managing code that needs to run on display startup ( This is safe to use with other mods ) v1.0.0 - Original Publish
  14. 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.
  15. Hi everyone i have an issue making a simple money script / function in my mission. I'm finding the syntax of SQF and SQS difficult to understand or comprehend in comparison to languages like java and C#. I used this sample below as a baseline but the guy who responded didn't tell the OP of that forum how edit the value of your "Bank" right now I've created a object of money with an add action that adds money to my Currency variable, but now i want to extend that to the death of 'X' unit and i came up with this. To some this code might be laughable but i don't understand why this doesn't work when executed via a units init. Any input is appreciated. _man = _this select 0; while {alive _this} do { if (!alive _this) then { //GoldCurrency = GoldCurrency + 1000; hint"DEAD"; }; }; Many Thanks -Irish
  16. 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.
  17. 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!
  18. 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;
  19. 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?
  20. 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',..... ]}
  21. edit: completely replaced the code so no longer interested in help. Trying to find the delete button vOv
  22. 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!
  23. 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!
  24. 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!
  25. 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.
×