Jump to content

Search the Community

Showing results for tags 'script'.

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 Rules
  • TKO's Changelog
  • TKO's Help
  • TKO's What we Need
  • TKO's Saint Kapaulio
  • 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
  • SOS GAMING's TS³ Viewer
  • NAMC's Topics
  • NTC's New Members
  • NTC's Enlisted Members
  • The STATE's Topics
  • 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

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

  1. Hi folks I've got an issue with trying to write a script that lets me keep doing an action until the point where I don't want to do the action any longer. A player has a camera in their gear. When they want to take a photo, the script fires up. The script makes them put away their current weapon, and an image of the back of a camera pops up on their screen. picture sharing Now the bit that has me stumped. I want to be able to have the player take as many photos as they want before putting the camera away. The script snippet I have for 'clicking' the camera is this: (The inputAction "Fire" is done by the player holding Left-Ctrl + Left mouse click). This works a treat in my script, but sadly can only be done once at the moment due to my lack of scripting know-how. I then have another script snippet which lets the rest of the script continue, thus closing the camera and letting the player get his weapon out again: (The inputAction "toggleRaiseWeapon" by default is a double tap of the Left-Ctrl key). The other problem here is that the player has to take a photo before the script continues on to the part where the player can put the camera away. What if the player opens the camera, but then decides to put it away without taking any shots. He/she can't in the script's current state. Here's the whole script currently: So in summery, I want the player to be able to point and 'click' the camera as many times and at as many objects as they want, then when they're ready, put the camera away. I hope that all makes sense. Any help with this is appreciated. Thanks heaps. Vapour
  2. Hello :) I have this type of code in one of my missions. for "_i" from 1 to 100 do { _nil = [_cs,_hpfirst,_hpsecond,_dest] execVM "scripts\carspawn.sqf"; _number = floor (random 941) + 60; sleep _number; }; In the script different cars with a different amount of passengers are generated. They get waypoints etc. But i think does once the script startet twice it affect the other script. Is it possible to start the script multiple times without having any influence on each other? I´m new into scripting. Thanks guys.
  3. Hi, I am actually working on a personnal script to run in singleplayer to simulate a respawn when I should die. What I do is that when I take a sufficient amount of damage, I disable damage, teleport myself to spawn, clean my damage amount and renable damage. It works fine, but the mission also use the ACE and it's basic medical system. I want to keep it that way but if I don't erase all the HandleDamage handlers before putting mine, my script still run but I die anyway when I "respawn" because of ACE. Is there any way I can tell ACE that I do not want to die when taking a certain amount of damage? I tried calling the ace_medical_fnc_treatmentAdvanced_fullHeal function in my script after setting allowDamage to false but it doesn't work. Here is my code so far : SPR_HandleDamage_EH = { private ["_unit", "_killer", "_amountOfDamage"]; _unit = _this select 0; _amountOfDamage = _this select 2; _killer = _this select 3; if (alive _unit && _amountOfDamage >= 0.9) then { hint "Respawning"; _unit allowDamage false; if (hayACE) then { [_unit, _unit] call ace_medical_fnc_treatmentAdvanced_fullHeal; } _unit setPos(getMarkerPos("respawn_west")); _unit setDamage 0; _amountOfDamage = 0; _unit allowDamage true; }; _amountOfDamage }; [] spawn { waitUntil { !isNull player }; [] spawn SPR_Player_Init; hintSilent format["SP Respawn Script Loaded"]; }; SPR_Player_Init = { //player removeAllEventHandlers "HandleDamage"; player addEventHandler ["HandleDamage", SPR_HandleDamage_EH]; }; pastebin
  4. Dynamix I'll try to keep this thread as short as I find suitable and on point. No promises... I'll start with giving ya'll little background on the system. I've been developing this script for a good many weeks now, and have come up with what I'm calling the Dynamix System. The system is a set of only a few scripts that act quite similar to EOS, but are structured much differently to allow the beloved functionality to be presented in a very up-to-date and optimized manner. This is actually my first script I'm releasing to the public, so please expect bugs that need squished. Prior to me creating the script, I barely had any SQF know-how. The only knowledge that I had was of JavaScript, which seemed to be the most relatable language. I went ahead and found up the BI Wiki, and spent a good bit of my time to create this puppy. The system has went through some of my very "newbie" stages of development, such as where I had first implemented a matrix system to handle marker and unit status, but I found that to be obsolete after I matured it into simply getting the status from the map, and not throwing around the amount of enemies for each marker from the client and server. Performance Demo As I continued to roam around in the demo video, you could clearly tell that the system was performing at a pretty swell level. Apologies that the FPS wasn't overlayed for you to watch, but I can admit it was a constant 50+ frames - despite all of those active enemy AI and the DS being ran on the same machine. Now, please take in mind that my system is not built for something as bada## as Arma 3. Or, at least I would say it isn't. OS : Windows 7 Ultimate 64-Bit Motherboard : MSI 970A-G43 AM3 ATX GPU : AMD R9 270 925MHz 2GB GDDR5 (Crimson ReLive Software Version 16.12.1) CPU : AMD FX-6300 (Six-Core) 3.5GHz (Overclocking to 4.19GHz (Yes, the damn thing is stable)) Memory : Kingston HyperX Fury 240-pin (2x4)GB DDR3 (Overclocking to 1866 w/ HyperTransport) Storage : (OS Internal) Seagate HDD 1TB 64MB Cache, (Secondary Internal (Arma 3 Installed Here)) Samsumg EVO 850 250GB Last thing to note and wrap up this section is that over the time that I've been developing this, I made only one hardware upgrade, and that is the SSD (my very first). I can assure you that while I was still developing this system in the early days of my little HDD, it performed only slightly worse than it does today. I find this difference to be insignificant, because the margin of performance from system-to-system varies regardless, so it wouldn't much matter under certain conditions. Features Smooth AI spawning Marker status changes are logged Many editable variables Markers don't unload units Enemies occupy buildings Vehicle spawning Editable unit spawn banks An up-to-date system Open to suggestions Fully explained system Works with SP and MP Only 4kb's How-It-Works It actually works in a fairly simple to understand route. I'll just list out the main steps below. The server either sequentially generates all the marker names to report, or it reads them from a manual bank. It applies to all of the valid ones a certain "initial" color, and logs the invalid ones for debugging. Every X seconds, players will report their object, appropriate marker status colors to be applied, and load distance to the server. The server compares these values to every marker, and activates, captures, or recaptures those whom meet certain conditions. Considering an initialized marker needs to be loaded, it runs another thread that spawns the enemies. From the numbers 2 to 5, are generated units from a set enemy bank. The server takes a break after every unit spawned to reduce stuttering. For every building within a marker, is a chance to occupy a building with a single unit. A break is taken inside this as well. Finally, if there is a road inside a marker, there will be a chance that an enemy vehicle will spawn on that road. A break is taken inside this as well. Let's consider only 2/3 units have been neutralized inside our marker, so we'll look at this comparison. The capture comparison is based off of player knowledge to whether the square is clear or not. Even if an enemy is still inside a square, but the player doesn't know about them, it turns blue. This prevents players from cheating by observing a squares status to see if enemies still occupy it. That wraps the system up... Downloads There is a readme.txt inside the folder that you can take a look at. I've got a heap of comments inside the main script for you to take a look at how to configure the script. This is a personal agreement, where I state that you ONLY redistribute this system under the conditions that you apply proper attribution to all contributing authors, and a link to this OP. MediaFire - V11.8 Took me two whole hours to write this damn thread where I could have been playing Arma all that time, so I hope I covered everything. Enjoy! If you find bugs, I suppose you know what to do.
  5. I have a trigger that had this on activation: {[_x] execVM "rearm.sqf"} foreach thislist; // Written by Weasel [PXS] - andy@andymoore.ca // This script rearms, refuels, and repairs vehicles. // Vehicles must be less than height 2 (typically landed, if air vehicles) and must remain in the // trigger area for 3 seconds. It then drains all fuel, repairs, rearms, and refuels. // // Setup a trigger area to activate this (F3 in map editor) with the following settings: // // Trigger REPEATEDLY, BLUFOR, PRESENT // Name: Rearmlist // Condition: this; // Activation: {[_x] execVM "rearm.sqf"} foreach thislist; // // Warning: If this trigger area overlaps another trigger area (such as ammo-transport Scripts), sometimes // things don't work as planned. Keep this seperate if you can. _unit = _this select 0; // Don't start the script until the unit is below a height of 2, and make sure they hold that // height for at least 3 seconds. WaitUntil{(getPos _unit select 2)<2}; sleep 3; if((getPos _unit select 2)>2) exitWith{}; WaitUntil{speed _unit < 2}; sleep 3; if(speed _unit > 5) exitWith{}; // Make sure unit is inside one of these lists (trigger areas) if( not (_unit in list rearmlist1)) exitWith{}; _unit setFuel 0; _unit VehicleChat "Repairing..."; sleep 2; _unit setDammage 0; _unit VehicleChat "Rearming..."; sleep 2; _unit setVehicleAmmo 1; _unit VehicleChat "Refueling..."; sleep 2; _unit setFuel 1; _unit VehicleChat "Finished."; if(true) exitWith{}; It works in SP but not on my dedicated server. What can i do?
  6. I'm trying to use DAC and whenever I preview the mission I created in the editor, I get the following error (taken from .rpt): And yes I've posted this issue in DAC's thread, but no answer there so far. I've narrowed it down to dac_find_wplog.sqf and dac_find_polylog.sqf, which both have (what I assume is) the problematic code. DAC_find_wplog.sqf: DAC_find_polylog.sqf: Thank you in advance.
  7. Leaking liquid [script] - v1.0 Description: Idea was to help fellow coders. Created liquid stream with particles effect. It can be used for leaking water, oil, blood, etc ... Included example mission with guy pissing and leaking oil truck. Enjoy. Installation: - place unit / truck in editor - in init of unit enter null = this execVM "pee.sqf"; //unit or null = this execVM "leek.sqf"; //truck Features: - leaking liquid - pissing - leaking fuel from truck untill fuel is empty Planned: - catch fire if leak is from oil - refactor to function - create leak hole in cistern upon fire - create leak hole in barrel upon fire (leaking water) - give option to choose color of stream (yellow, blue, black, ...) - multiplayer/dedicated server testing Changelog: v1.0 - public release License: Use it for public, non monetized purposes only. If you have modifications, use pull request in git repo. Will revise/include them in script. Disclaimer: Do not incorporate this script or portions of it in monetized products or servers without asking for permission and obtaining approval from me! Issues: - please use issue tracker - need more testing Download: https://bitbucket.org/mikehudak/a3_leaking_liquid Preview:
  8. Script name: Arma 3: Slot access control lists Version: 1.0 Release: https://github.com/ussrlongbow/slotacl/releases/tag/v1.0 Issues: https://github.com/ussrlongbow/slotacl/issues Source: https://github.com/ussrlongbow/slotacl Script allows to configure whitelists and blacklist for playable slots. You can restrict/allow certain players to occupy a slot. See video for demo - https://youtu.be/oaP1XGbujjw
  9. Hello. First off, I want to apologize if I have posted this topic in the wrong area, but I think it's right. If not, oh well. Oops. Anyway, on to my script. What I am trying to do is make a script for the civilians in my mission to make them behave in a certain way by playing some of the cowering type animations in A3. I managed to get the basic idea working by spawning the commands manually into each units initialization field but when I try to define a function and call that I get issues. inside the civ units init: init.sqf: functions.sqf; The problem I am having is I get the error message "Error: Undefined Variable in Expression: this" and the line of code it shows above that is "0 = [] spawn { |#|this playMove "ApanPknlMstpSnonWnonDnon_G01"; };" or something along those lines. I feel like the problem isn't really a problem at all, I'm just missing something obvious or I'm still just completely unfamiliar with scripting in general. I have tried several things but I just can't seem to get it working. Anyone know what is wrong? Thanks in advance for the help (if anyone actually responds lol).
  10. When a jet crashes on a runway for example, it creates this weird dirt/crater which makes landing impossible. I know how to remove the jet but how can i prevent that dirt from appearing? Sa-matra figured out how to do it appearently as such dirt does not create in king of the hill.
  11. 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
  12. WurschtBanane

    How do i create a safe zone?

    I want to create a safe zone similar to the one in King of the Hill by Sa-Matra. The problem is that when i use a trigger it works for ANY altitude means that when a heli flys over at 1km height he will still be save. So is there any way to disable bullet/explosion damage for vehicles and players if they are close to the ground or standing on it (means a jet or heli will only be save if it landed or is 5m above)?
  13. Greetings, I'm looking for some one to script me up a logistic script that does the following things. General description: 2 Ammo trucks spawn at timed intervals with certain kit in them. They then make there way to a destination on the map, and once they reach the point. They despawn and their supplies gets orginized and distrubted to nearby crates in the base.Followed by a notification that the base has been resupplied. If the convoy takes damage or casulties a new task comes up that request assistance and gives the last location of the convoy. If the players locate the convoy they may repair, recover, or call in a total loss. Regardless after 30mins the convoy despawns and the cycle continues. Features should include the following. Convoy AI interaction Convoy should have custom kit, and be on "careless" for most of the trip. If the vehicles are disabled, or tires pop. Units dismount and the task is fired off. If players repair the vehicles, the units re-mount and continue on If vehicles are destroyed or crew is killed the task fires off. Upon arrival of site and despawn, kit is distributed to the proper crates on the base. Convoy can be adjusted for auto-despawn to assure that glitches and other things are preventing it from being completed. Player Interaction Players can radio in three options based on condition of convoy if convoy is disabled but no casualties. Players can opt to repair vehicles. If convoy AI are dead but vehicles are intact, players can opt to recover supplies by driving trucks themselves. If convoy is destroyed, players automatically declare total loss. No matter what decision Convoy will reset after a certain time. If convoy trucks are player driven, they despawn the trucks. Other conditions/optional Supplies is kept track of, if maxed out convoys don't happen. linked to Alive reinforcements, adding to the overall groups supplies. Helicopter variant for sling loading vehicles for supplies. edit: I'm willing to pay for this work.
  14. Hello there, I'm making a control tower that can control multiple border gates for an upcoming server. Relatively new to scripting, and only know the abseoulte basics. All have to start somewhere. So the set up is, I have an addiction to open the script file on the Init of a object. Firstly how would I remove that add action after it has executed the script file Next part, the script so far (pls dont comment on my newbness :) _target = _this select 0; _caller = _this select 1; _actionId = _this select 2; //North Gate 1 _caller addAction ["Open North Gate 1", {NG_1 animate ["Door_1_rot", 1]}]; _caller removeAction _actionId; _caller addAction ["Close North Gate 1", {NG_1 animate ["Door_1_rot", 0]}]; _caller removeAction _actionId; So what this displays is only the second addaction, Close northgate 1, which is not what I would want to do. Ideally I would like to the person to only see the Close North Gate Addaction after executing the open northgate Addaction and for the Open Northgate addaction to be removed?. Im unsure how to write this using the SQF syntax, and have been scratching my head for the last 2 hours. Also after executing Close Northgate I would like them to see the Open northgate again. How would I go about doing this? Thanks for any help you give me! Regardless of the type of help, all help will be greatly appreciated Best Regards Rhys Priestland
  15. MambaSix Drag [beta] I was looking for a slightly more realistic way to drag objects such as fortifications, ammo boxes, and other objects around the battlefield, so I sat down one Saturday afternoon working on a method and this is what it has evolved into. After the copy/paste of a few files, and one simple initialization call, you should be able to drag objects around on the battlefield in a more realistic manner. Dropbox DL: MB6_Drag_v0.90beta.7z Current Version: 0.90beta Usage: Installation Instructions: Known Issues: Features Planned (Hopefully): Changelog: Credits: Cigar0 - Initial concept, which I have since greatly bastardized :P
  16. Hello, I found this script at armahaulic = www.armaholic.com/page.php?id=26369 With a minute amount of editing, I made it do what I want, which is just force first person on the player. // Author - Sokoloft & Rodeostar42 @ www.armaholic.com/page.php?id=26369 //3rdPersonView.sqf if (!isDedicated) then { waitUntil {!isNull (findDisplay 46)}; if( (difficultyOption "thirdPersonView")isEqualTo 0) then { while {true} do {}; }; if( (difficultyOption "thirdPersonView")isEqualTo 1) then { while {true} do { waitUntil {cameraView == "EXTERNAL" || cameraView == "GROUP"}; if (((vehicle player) == player) && (speed ( player)) >= 0) then { player switchCamera "INTERNAL"; }; sleep 0.1; }; }; }; How would I go about making it to were the player is kicked after numpad enter is hit more than 3 times. As well as in between, is given a warning via side chat, so people in server can shame the person, as well as it should have the persons name. So: %PlayerName% has tried to enter third person, stop now or you will be kicked! %PlayerName% has tried to enter third person, last chance, stop now! %PlayerName% has tried to enter third person, for the last time, and will now be kicked! As well as the only reason why I want to do this is because if you run, and spam enter, you can slightly get into third person for a second. This is really not a problem, since my mission is vs AI, however if a player decided to spam it, they can slow down the server quite a bit since the script is being done every time they hit numpad enter. As well as there needs to be a grace for players in vehicles, so that they can still go into third person and not be kicked. But not spam it at the same time! Any info would be helpful as I don't know what I'm doing xD
  17. Hello, In the mission I am currently working on I need the ability to spawn pre-defined units via their string name, to a vehicle defined by either it's editor given variable name, or it's string name. Preferably the vehicles variable name. Then, I'm going to call the script via a trigger that is triggered via the Radio menu. As well as if it is possible, I'd like to then have another script that does the opposite, and de-spawns them, and will be called the same way via a trigger, and they will be On-Off options. Oh and yes, text via side to say that it has been toggled on or off! Any info is much appreciated, as I don't even know were to start. PS: As well as could you explain how to do the same for objects if there is a difference? I could put this information to good use to put the USS Nimitz On station and Off station.
  18. Hey guys, I'm having problems with respawning my players with the gear I choose. I'm using the 'edit gear' option in the Eden editor, but when people die, they spawn with the original loadout for the chosen solider (rifleman, marksman, lmg etc). I've been trying all day, and a ton of different scripts, but I can't get anything to work out for me. Im pretty green to the whole mission creating, so any help who be appreciated.
  19. Hello everyone, it's me again, asking some silly questions. Well, let's jump right ahead, shall we? For some hours I've been researching on how to get scripts to start on themselves upon initialization. Nothing seem's to suit my problem well enough. To be clear: the scripts are stored in this folder structure: -@devAddon_sak - -Addons - - -dev - - - -AnoGearAddition_scripts - - - - -exec.sqf - - - - -a_h_useVisor.sqf Basically I tried running 2 if-statements, that'd determine, whether action1 or 2 is to be used. Initially it looked like this: (before anyone asks: since I started coding in gLua, I started to love if-statements for some reason...) // a_h_useVisor \\ if (headgear player isEqualTo "anoHelmet_opened") exitWith {player addAction ["Close Visor", {player addHeadgear "anoHelmet_closed"}]}; if (headgear player isEqualTo "anoHelmet_closed") exitWith {player addAction ["Open Visor", {player addHeadgear "anoHelmet_opened"}]}; After a bit testing I came to the conclusion:"Well, maybe we need something to trigger it, how about that?" So I created another script file, in which I wrote: // exec \\ _handle = [] execVM "\dev\AnoGearAddition_scripts\a_h_useVisor.sqf"; //note, that \dev\ is the .pbo file in which everything is stored, obviously Also didn't seem to work. So I kinda reviewed the code a bit and that happened: // a_h_useVisor \\ while (alive player) do { if (headgear player isEqualTo "anoHelmet_opened") exitWith {player addAction ["Close Visor", {player addHeadgear "anoHelmet_closed"}]}; if (headgear player isEqualTo "anoHelmet_closed") exitWith {player addAction ["Open Visor", {player addHeadgear "anoHelmet_opened"}]}; }; and // exec \\ //_handle = [] execVM "\dev\SpectergearAddition_scripts\a_h_useVisor.sqf"; _triggerExec = createTrigger ["EmptyDetector", getPos player]; _triggerExec setTriggerText "Activate Script"; _triggerExec setTriggerArea [0,0,0, false]; _triggerExec setTriggerActivation ["ALPHA", "PRESENT", false]; _triggerExec setTriggerStatements ["this", "_handle = [] execVM ""\dev\AnoGearAddition_scripts\a_h_useVisor.sqf"""]; Also didn't work out (in the sense, that the given command couldn't be found. Either I looked up the wrong radio thingy, or i screwed up). Now, what I also tried, was using an EvenHandler INIT on the 2 items in the CfgWeapons section themselves, but obviously it didn't work out, b/c according to what I've read so far: the INIT EventHandler only works in CfgVehicles. I've also tried calling a_h_useVisor through my dev console in the Editor, it didn't give me an error, but it did effectively nothing. :D So there I am, not really knowing what to implement in which way. I am also "a bit" tired of looking everything up, though I still have to, I know, but some help from over here would boost me, obviously. *BTW: yes I know: it could've also been done via animation on the model itself, yet then I would need to know how to properly implement the code for triggering the animation, but as of right now there's none given, and I got 2 models, one w/ the closed and one w/ opened visor.* I can bet my soul for sure I did a silly mistake, so feel free to give me the teach-slap/spank. :wub: Much greets, -Sakuie /* Edits: first: grammatical correction of the title second: grammatical correction of a phrase */
  20. Hello, I'm in need of help with a script that's basicly a car shop. The units i'm using ingame are: 1 AI named "carseller" and 1 marker called "carspawn". This is the script: carseller addAction ["Buy Hatchback",{call fn_carBuySystem}, ["C_Hatchback_01_F", 200, "Hatchback"],6,false,false]; carseller addAction ["Buy Hobo",{call fn_carBuySystem}, ["C_man_p_fugitive_F", 3000, "Hobo"],6,false,false]; carseller addAction ["Buy Boxer",{call fn_carBuySystem}, ["C_Van_01_transport_F", 1500, "Boxer"],6,false,false]; carseller addAction ["Buy SUV",{call fn_carBuySystem}, [" C_SUV_01_F", 500, "SUV"],6,false,false]; carSeller addACtion ["Add 5000£ to wallet",{call fnc_addMoney}]; fn_carBuySystem = { private["_Money","_carSpawn"]; private ["_carID", "_carPrice", "_carName"," _caller"]; _carSpawn = carSpawn; _carID =(_this select 3) select 0; _carPrice = (_this select 3) select 1; _carName = (_this select 3) select 2; _carSpawn = carspawn; _caller = _this select 1; if (_Money >= _carPrice) then { _Money = _Money - _carPrice; sleep 3; _veh = _carID createVehicle (getPos _carSpawn); _veh setVehicleLock "LOCKED"; _veh setOwner (this select 3); _veh addAction ["Unlock Vehicle", {(_this select 0) setVehicleLock "UNLOCKED"}]; _veh addAction ["Lock Vehicle", {(_this select 0) setVehicleLock "LOCKED"}]; hint format ["You have bought a %1 and you have %2 dollars left.", _carName, _Money]; } else { hint "You do not have enough money for this car"; }; }; fnc_addMoney = { _Money = _Money + 5000; } Anyone got a clue what's wrong? :)
  21. Hey guys, im working on a mission inculding a protesting mob. Is there some kind of protest animation, i vaguely seem to remember there has been one, but cant seem to find it.
  22. I need help with specific problem I am working on together with Alex. What we need to achieve basically is weight changes of an aircraft relative to ambient temperature. At the moment the mass raise is linear. I would like to make it like this curve, below: (on the scheme, the first row is ambient temperature of Celsius in 5 degree increament, while the second row is additional weight in LBs). Please, note that the increase is started above 5 deg of C, but for simplicity it can start from 0. Is there any chance for light code that can be a part of a script (that runs very often) and does the math to get such a curve of increase? I guess it might be a factor as a variable that rises along with the ambient temperature. Then the temperature have to be multiplied by the factor to get the rise in weight. At the moment, the constant factor (to get linear increase) is app. 182 lbs for every degree of Celsius.
  23. Hi guys, I need to make a moving 3D sound for a Jet. - The sound needs to be played global - Attached to a high speed vehicle - Sound needs to be played in 3D - Needs to be repeated after it is finished How can i achieve this? I tried different commands like "say3D" and "playSound3D", but it seems that these positions are not dynamic.. Thanks for any help!
  24. Pretty late here, wanted to brainstorm these small unit tactics publicly. Will tackle actual scripting later after sleep. Flank and spank tactic taro8 brought up this idea in the ASR AI thread: https://forums.bistudio.com/topic/163742-asr-ai-3/page-96#entry3026408 I've tried all the AI mods, but for flanking or etc they don't seem to reliably perform what taro8 describes. Most will handle individual AI units within the group, and sometimes I think emergent tactics happen but not by design for team tactics of > 1 AI unit -- e.g. bounding fireteams temporarily split from a section/squad, binaries split from a team, individuals split from a binary. (let me know if I'm blatantly wrong!). I am not a good or elegant scripter by any means, so this is mostly a learning project. Elegant solutions and suggestions for me to investigate would be welcome. I prefer ASR AI to stay simple, robust, and not heavy on specifics -- it's proven to be pretty timeless and effective b/c it doesn't try to be a fully loaded bells-and-whistles AI suite (which are very cool when they work, but somewhat fragile and more vulnerable to Arma 3 updates). Thus I personally would prefer any higher-level tactics script to stay out of ASR AI's way. I'm starting with Zenophon's framework and trying to stick to KK's and code optimization best practices (blindly following, since I don't yet have experience in being selective when to use a less efficient loop construct or whatevs just b/c it'll get the overall job done simpler), making a small script to be executed on an AI group leader, where: <nested if checks are faster/lazy than if/else> Checks if that AI (assume OPFOR for this concept) knowsAbout any BLUFOR > 0. If true, check distance < _distance. Sort distance for nearest qualifying group. If true, <insert black script magic to count units group, divide into 3, create 2 new group leaders and attach AI units to them. All dynamically.> Ensure group 1 seeks cover and keeps the attention of BLUFOR (maybe even suppresses BLUFOR). If with johnnyboy's blessings, incorporate his up-and-down mini-script. https://forums.bistudio.com/topic/190815-release-jboy-combat-up-down-script/ Set new groups 2 and 3 to disable combat mode, then assign "FULL" movement waypoint. Figure out bearing from AI leader group 1 to Zen_FindAveragePosition (finds average point between all objects) of nearest known BLUFOR group. Generate 2-4 WP for each of groups 2 and 3, with relative bearings [-90, -45] and [45, 90] to the 1-BLUFOR source bearing, distance for each WP is random 25-50 (If 25m is a fair distance for a single "I'm up, I'm moving, he sees me, I'm down" sprint). Follow each WP with an immediate setUnitPos "DOWN" with a sleep random 3-5 seconds (Hold WP?). Then execute/create/assign/skip the hold WP to move onto the next disable combat sprint WP. Now groups 2 and 3 get no further assigned WPs, so they should revert to default AI behavior (or whatever ASR or otherwise AI mod is running). Once WPs complete, group 1 is assigned a WP with relative bearing [-45, 45] to the source bearing. Movement distance 25-50. At end of this sequence, regroup all of them back under group 1. distances could be user-specified parameters, naturally (go for the 300m flanking end run!). Bounding tactic Starts off same way, but splits into only 2 groups. Script takes parameter for a final destination. Assigns a dynamic icon marker? Group 1 gets the disable combat sprint waypoint. When WP complete, they do the up-and-down behind cover. Group 2 first gets the up-and-down. Then is assigned a created waypoint per group 1. etc. until one of the groups passes a check for if (group distance destination_marker < 10), then the two groups rejoin. (mad cheese's Command and Control has a regular peel and Aussie peel that are magnificent to watch in action, knowing anything about wayward AI scripting. :P ) Urban street/building patrol from scratch [edit: before anyone gets upset, I'm only referencing these spawn scripts as examples, and will message the authors whose work I respect and currently enjoy using as-is, before using their scripts as springboards for any actual work I may do on this. Otherwise, I'll be attempting to reinvent the wheel from only the concept of their scripts, as a learning exercise for myself. I'm not educated enough to actually understand what their scripts are doing -- I get lost following the variables and script structure -- so I don't want to copy something I don't understand and break it anyway.] T-800a's spawn script already has this function, where units will randomly patrol streets within an area marker, with random waypoints during patrol, set to random building positions. Grahame and I touched on the topic of using existing civ spawn scripts to create roaming zombie patrols. I thought it'd induce a bit of bonus terror if players seek cover in a building, but some staggering zombie randomly wanders into the building. Instead of having to launch the entire T-800a script just to hook in this one component, I wanted to see if I could do the same with Enigma's civilian spawn (super simple script, easily allows a custom script to fire for each spawned unit -- i.e. a script that dynamically spawns patrol WPs for that zombie. Given that the zombie will spawn in the correct area, thanks to Enigma: call Zen_FindGroundPosition 5-15 times (or parameter number of times) with limitation of on-road and minimum distance from each other positions. Maybe with condition: testing for buildings nearby (60%+ building coverage in the user-specified radius). call Zen_FindBuildingPosition on at least some of those waypoints. (Something possibly broke this for me in my current testbed mission -- unit refuses to acknowledge and setpos to that marker about half the time.)
  25. Hi does someone here on the forums used this module before ? I tested it in mission on local server when grouping units to the module, it works you get kicked from the mission after killing one team mate. There is no options in the module to set for example after 3 kills kick the player or something like that, only a init field. Also does someone knows what to use if the module is sync to a trigger in condition field ? I searched the web but there is nothing on that module explained or mission examples ! I want to achieve players fire the module when they abuse teamkill with a trigger ! I'm gonna try to search a solution if someone can help me would be nice! thanks