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


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

  1. So, im setting up a SP mission. Out of complete randomness the AI decided to shoot at my jeeps with their RPG. i found that so dope so I wanted to have that in the mission but it just wont replicate. I tried setting a Destroy waypoint on the vehicle - AI does nothing, just walks there. I tried setting them to open fire and combat state and just let them stand around (which was basiclly the same that happened when it randomly worked) but they wont shoot at it.... so what am I supposed to do to make this horrendous AI work the way i want? shouldnt it be self explenatory to enable the AI to shoot rockets at vehicles?!?!
  2. GF Kill info Script by GEORGE FLOROS [GR] Description: GF Kill info Script , 3 types of notification available. You are free to do anything but i would like to give me Credits for this! Simple and easy to use and adapt . Have Fun ! Installation / Usage: For usage instructions and information of how to use the GF Kill info Script please refer to the included documentation and/or example mission. Place in your mission the files . There is everything included , in the initPlayerLocal.sqf , to copy paste in your mission . https://community.bistudio.com/wiki/SQF_syntax Don't try to open this with the simple notepad. For everything that is with comment // in front or between /* means that it is disabled , so there is no need to delete the extra lines. You can open this ex: with notepad++ https://notepad-plus-plus.org/ and also use the extra pluggins (this way will be better , it will give also some certain colours to be able to detect ex. problems ) http://www.armaholic.com/page.php?id=8680 or use any other program for editing . For the Compilation List of my GF Scripts , you can search in: https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-scripts/ Notes: This killfeed script , has 3 types of notification available. The notifications will display , only when a player is killed. For AI kills display there is available this script : GF Headshot + Killfeed Script Credits and Thanks to : Thanks to All script contributors Thanks to everyone who tries to do the best for this game! Thanks to BIS for such a great platform . Thanks to BIS Community and BIS Community Forums . Thanks to Armaholic Community and Forums . Changelog: v1.0 Forum topic: - Armaholic forums http://www.armaholic.com/forums.php?m=posts&q=40259 Armaholic GF Kill info Script
  3. Just to place this into context - i made a mission where the players will be supported by some cruise missile fire, fired by the AI. There are 3 different targets, and 3 different MK41 VLS launch pads firing at each their target. I found this script/code and its been working very "on/off". It works every time in singleplayer, but only "occational" in multiplayer on a dedicated server - so im approachig you guys, the mighty Arma 3 oracle, to see if you guys can help me improve this code so that it'll work more predictably and reliably on dedicated servers too. This is the code im using: ------------------------------------------------ // This is the script I'm using in an .sqf ------------------------------------------------ west reportRemoteTarget [HAA1_0, 3000]; HAA1_0 confirmSensorTarget [west, true]; west reportRemoteTarget [T2, 3000]; T2 confirmSensorTarget [west, true]; west reportRemoteTarget [T1, 3000]; T1 confirmSensorTarget [west, true]; Cruise1 fireAtTarget [HAA1_0, "weapon_vls_01"]; Cruise2 fireAtTarget [T2, "weapon_vls_01"]; Cruise3 fireAtTarget [T1, "weapon_vls_01"]; ------------------------------------------------ // This is basically the information provided for each launcher ------------------------------------------------ west reportRemoteTarget [HAA1_0, 3000]; HAA1_0 confirmSensorTarget [west, true]; Cruise1 fireAtTarget [HAA1_0, "weapon_vls_01"]; While developing the mission, i do my fair share of testing on a dedicated server - first time i tried it, all 3 missiles fires and hits their targets. Next time i did some changes to the mission, although nothing to the settings of the targets/missiles or script - suddenly all 3 missiles fires, but 1 goes straight up - while 2 hit their target. And ofc, during the offical playthrough of the mission with my Arma 3 group, all 3 missiles fires but all 3 goes straight up and none of them seemingly targeting their targets. This was mildly put rather annoying. So in short, if any of you script-wizzes know how to help me out with this to have it work more predictably and reliably on a dedicated server it would be absolutely epic, and much appreciated.
  4. Hello all, I hope you are doing well. I am looking for a way to find out if a side is hostile towards a unit. I am getting some units in an area with inAreaArray and from those, I pick (or count) only the ones that are on the same side as the unit of interest. I have tried to "subtract" those two arrays in order to get what's left of the original array (the one returned by inAreaArray) but in this way, I also get civilians and possibly independent which may or may not be hostile to the unit of interest (the unit's side is not predefined). So, the question is... Do you smart ArmA forum's people have any bright idea of how I could solve the problem (I kinda see something EXTREMELY simple coming and this will be funny 8D).
  5. Hey there, I'm trying to get an object to provide a whitelisted player with the option to purchase ammunition once in close proximity. So far, I've written the following into the object's init: if (getPlayerUID player in _UIDList) then { this addAction ["Buy STANAG mag $100","purchasestanag.sqf"]}; The mentioned _UIDList simply reads as follows under init.sqf: _UIDList=["76561198090900291"]; Is there something crucial I'm forgetting to include? I'm very fresh to coding, so do excuse my ignorance. Any pointers are much appreciated.
  6. Good day, I am currently at a dead end of the MP mission I am trying to create for my unit, solely with ALiVE modules, I don't really use any MCC features but just wanted to leave it loaded in case I need to create a scenario while the mission is running. I wanted to add specific vehicle cargo (custom loadout) in a medevac vehicle(RHS Asset), such as ace medical items. So our medics can replenish their inventory from the vehicle. I did this by adding this in the vehicle's init field: In addition I also added scripts on some vehicles and units init field to assign as ALiVE Combat Support so that ALiVE would work with VCOM accordingly, I followed this steps from ALiVE's FAQ site. I followed what's in the red box: But when I start the mission, the mission loads twice and respawns the vehicles rendering all the scripts I've put useless. I can't figure out how to stop the vehicles from respawning when the mission loads the second time or to have the script run at a specific time so it would execute once the mission finishes loading "Completely". Here's a 5 min. video to show what I am trying to do. https://youtu.be/3nxOfavKnBY TIA! PS: I don't know how to title this since I'm not exactly sure what's happening to name it properly. So my apologies if it's misleading.
  7. so on my units server we are running a clean up script, due to the lack of mass graves and body piles withing arma we are trying to a manual mass grave but due to the clean up script it stops that from happening is there away to stop that script running on certain objects?
  8. The latest version of the Simple Radar Warning System, Functions, Vehicle init (for automatic system arm), Player manual system switch, Configurable function call, Fly safely and... Have fun! File Download (Drive) *Original Post*
  9. So I'm trying to test out the kbtell command to use dialogue in missions, but I've hit a wall. Everything appears to be working, I'm not getting any errors, but the first subtitles play, the sound doesn't, and nothing else happens. bikb file script file Is there something I'm doing wrong? Thanks in advance.
  10. I have rental dedi arma 3 server and i have INIDBI2 for save system on it. Right now there is a save game button in the game screen, but i want to get it on the pause menu save game button, the button is grey now. Button i have right now is scripted like this: "initplayerlocal.sqf" Player addAction ["<t color=`#38BAFF`>Save Game</t>", {[] call UN_savedata;}]; How can i script it in the onpause menu "save game" button? I find this link, but i don`t get it work
  11. I've been tinkering with values of a mod that my Milsim unit uses. With all the mods we have somewhere along the pipeline has overly increased and made more realistic A.I. in which they also have more health but the weapons we use our simulated extremely well. The problem is the mod we use for our mortar damage range just isn't realistic and a direct impact may kill a single person on a group of 20 with no armor on. I wrote a script similar to what I'm doing here but with RHS and updated the weapon damage values just by using CfgPatches and I'm trying to do the exact same thing here but they named their ammo with a "( )" in it. Which upon compiling the addon doesn't allow it to continue as it returns an error along the lines of [line 13 expected = received "("] does anyone know a workaround or how to get this to work properly? TL:DR - Can't update damage of an ammo type because the class name has a symbol in it that the addon builder assumes is apart of the code rather than just being apart of the name. VZ99 CfgAmmo.hpp My CfgPatches in a separate addon I'm creating giving me the error. (Only editing the HE and HE_Multi ammo) As far as I can determine the issue is that the class name having ( ) is the issue but I can't edit the original addon CfgAmmo due to their licensing. If anyone knows a solution I'm open to anything.
  12. Hi, I want to remove this GPS cross from the map which is showing while the player is in an aircraft. I want a map which is finally a map and not a GPS device named map.. How can I achieve that? In-game options? Script? Mod? Thanks
  13. Hi all, I'm usually just a lurker here, but I thought I'd release my dynamic spawning system seeing as I've finally got it to the point where I'm happy to hand it out to people. So, without further ado: What is it? The Dynamic Spawner is a system that dynamically spawns units with custom loadouts, faces, voices, etc. This can add variety to your missions by giving you the ability to create factions that normally don't exist in the game - WITHOUT needing extra mods (other than gear/weapons if you want modded ones). Handy for public servers that want to avoid using mods, or for groups who want to have special factions for their scenarios without needing entire mods for new factions. How do I use it? 1. Unzip the files into your mission file, and add the following to your init.sqf: 0 = execVM "SyDynSpawn\DynamicSpawnerInit.sqf"; 2. Place down units in your mission (disable their simulation/model/etc) and give them the custom loadout you want. 3. Give the leaders of the groups relevant names. 4. Insert the names of the group leaders, and classnames of vehicles into the factions.sqf (check attached readme for details on how to do that) 5. Place down Game Logics where you want to spawn units and follow instructions in the readme file to set them up to spawn how you want. Example Mission here: https://www.mediafire.com/file/f3749dpf4uu81ld/Dynspawn_Example.Stratis.zip What does it not do yet? I've added base elements for CAS and Helicopter reinforcements, but haven't implemented a spawner for them yet. This will be added in future. Where do I get it? Here: http://www.mediafire.com/file/nb01br9o3pu9p3v/SyDynSpawn.zip Anyways, let me know if you find bugs or have questions/suggestions for future features.
  14. Here is a super simple script for animating lip movement for an AI unit for specified # of seconds. Script: Here is some sample usage code, where two different units talk with each other. In this example the valdez character says a sound file that is about 5 seconds long, and the paramedic1 character says a sound file that is 2.6 seconds long. // ************************************************************** [valdez, 5] call JBOY_Lip; valdez customRadio [JBOY_Channel,"hvTempHospital"]; //valdez globalchat "Hey Zeke. When are they going to build the new hospital? This temporary one is a dump."; sleep 5; // ************************************************************** [paramedic1, 2.6] call JBOY_Lip; paramedic1 customRadio [JBOY_Channel,"hParaCutOffFunding"]; //paramedic1 globalchat "Maybe never. Madagascar has cut off the funding."; sleep 3;
  15. Guys I have this hold action set up to revive downed team mates. My issues are: 1) How can I reduce the completion time if the caller is a medic? 2) Can I cancel the holdAction with a hint if the caller has no FirstAidKits? (I want the hold action to show even if the caller does not have the firsAidKit, I just want the hold action to exit with a hint, would if ((({""FirstAidKit"" == _x} count (items _caller))<1)) exitWith {hint "You need a firstAidKit";} work inside the conditionProgress field? Thank you!
  16. Need a quick script to better randomize grenade explosion sound in my JSRS sound replacement mod. This should be straight forward and fairly easy to do if you have any scripting knowledge with the A3 Scripting Engine. Any help with this is greatly appreciated. Sound File Names: Close_Distance (1).ogg, Close_Distance (2).ogg, Close_Distance (3).ogg, Close_Distance (4).ogg, Close_Distance (5).ogg, Close_Distance (6).ogg, Close_Distance (7).ogg, Close_Distance (8).ogg, Close_Distance (9).ogg, Close_Distance (10).ogg You will get co-credit on my Steam Workshop page for this mod. You can check out the mod here: https://steamcommunity.com/sharedfiles/filedetails/?id=1290747231 Thx so much, swtx
  17. Project Argo runs nearly like Arma, making the use of scripts possible for custom missions. Third person view was not intended to be used in Argo, however it is possibly accessible using this script: (findDisplay 46) displayAddEventHandler ["KeyDown",{ if ((_this select 1) == 156) then {//I'm using 156 to represent "Enter" on NumPad while {true} do {//Must loop constantly or 3rd person will disable player switchCamera "EXTERNAL"; sleep 0.0005; }; }; }]; I'd like it so that this particular script is "Toggle-able" or enabled/disabled via one key-press, rather than to hold the key down continuously in order for it to do its job .... If anyone has the decent script-expertise and would like to share with me a finished version of what I want, I'd appreciate it! P.S. I would also like a script that allows one to access/open "BIS_fnc_arsenal" anywhere using a specific keyboard key, much like the way to activate third person view, but using the "home" key on NumPad (DIK code 199) instead. Best of regards.
  18. Hello, everyone. As you can see from my title, I am looking for a script to use in a mission. I need to be able to unlock a door of any building in the editor. I guess there's an option in the attributes of a building that must be changed or I need to put a script in the init field. I didn't find anything useful in Google, but I think it hast to be something with: this addAction. Any suggestions? Thanks in advance. Cheers!
  19. I want a unit to move in a vehicle after respawn but it shows that error code: 17:52:36 Error in expression <_wp = _unit addWaypoint [_pos1, 0];> 17:52:36 Error position: <_unit addWaypoint [_pos1, 0];> 17:52:36 Error Undefined variable in expression: _unit 17:52:36 Error in expression <_unit setWaypointType "MOVE";> 17:52:36 Error position: <_unit setWaypointType "MOVE";> 17:52:36 Error Undefined variable in expression: _unit 17:52:36 Error in expression <_unit setWaypointSpeed "Full";> 17:52:36 Error position: <_unit setWaypointSpeed "Full";> 17:52:36 Error Undefined variable in expression: _unit 17:52:36 Error in expression <_unit setWaypointBehaviour "Combat";> 17:52:36 Error position: <_unit setWaypointBehaviour "Combat";> 17:52:36 Error Undefined variable in expression: _unit 17:52:36 Error in expression <_unit setWaypointType "GETIN NEAREST";> 17:52:36 Error position: <_unit setWaypointType "GETIN NEAREST";> 17:52:36 Error Undefined variable in expression: _unit the script is activated with this in the unit's init:this addMPEventHandler ["MPRespawn", {[_unit] exec "respawnvehiclescript.sqf"}]; the script: _unit = _this select 0; _pos1 = getMarkerPos "Marker1"; _wp = _unit addWaypoint _pos1 _unit setWaypointType "MOVE"; _unit setWaypointSpeed "Full"; _unit setWaypointBehaviour "Combat"; _unit setWaypointType "GETIN NEAREST"; hint "%1 respawned!!!"
  20. Vanilla like AMMO REPACK SCRIPT Hello guys I just finished my new Ammo repacking script. Which have few benefits than other repack scripts. Let me just show you the simple gif Demos. ^^ (Sorry for unfamiliar language but you see the familiar calibers under the inventory. Right?) As you see, this new script has few benefits than other repack scripts. 1)NO MOD! -Adding this script is very easy. You just drop the file, add one line in the init.sqf. Thats all! No mod, No bulky instruction for installing! 2)SIMPLE FILE STRUCTURE! -The script has GUI but has no header file nor class definition file. Only single script sqf file. You can even adapt the script in game with debug menu. 3)VANILA-LIKE DESIGN & UX! -The UI just look like it's a part of the ARMA3 game itself. Newbies will even think this is a part of game and ask why they don't have the repack ui on other servers. -Users doesn't have to be informed about the repack short-cut since they will see the ui as they open the inventory. And you know what to do! 4)REPACK EASY! -You can repack every magazines if they uses same ammo. Different magazines even can be repacked if they use same ammo. (but no tracer-normal ammo mixing!) -You can select multiple magazines and preview the result of repacking. And Choosing order affects which magazines should be filled first. Multi select source, automatically multi repacked! Download and Informations[armaholic] : http://www.armaholic.com/page.php?id=35582 🙂
  21. Hi, I'm new to scripting so forgive me for what I'm asking. I'm trying to make a training mission for my clan. I need to randomly place four flags inside a given area defined by a marker, and these four flags have some constraints in terms of the position in which they can be placed. Here's a bit of the code: traguardo setPos ([["white"], []] call BIS_fnc_randomPos); blueflag setPos ([[[getPos traguardo, 4500]], [[getPos traguardo, 2500], "water"], _this inArea "white"] call BIS_fnc_randomPos); where "white" is the name of the above-stated marker. When I run the code, it returns me the error: |#|_this inArea "white" Error undefined variable in the expression: _this don't know why though. Thank you greatly for your help.
  22. I am practicing building a CQB training ground. I would like to add some features. the present situation 1. Made me create a task. 2. AI will be summoned at the marker point when the trigger is executed. 3. Removing AI will complete the task. I'm going to do a mission like this. Recreate the task in the game and then go back to I want to make it possible for me to complete it again. In short, it's a rotation system. It's hard to get out of the game and log back in. I was troubled by a nuisance.
  23. I'm working on this event for a mission of mine where a ghost hawk flies into the AO, the player, and their squad board said ghost hawk, and the ghost hawk takes them out of the AO. I decided it would be best to use CaptureUnit for this, as the AI piloting can be unreliable at best. And because I wasn't sure how else to have it so that the player and squad would have a limited amount of time to board the helicopter, I decided I'd break the UnitCapture into two parts: Part one flying into the AO and landing, and Part two taking off and RTB. Part one works fine up until the moment the UnitPlay finishes, at that point the helicopter flies back up into the air and then lands again. And once the player and ai are in the helicopter it does lift off the ground, but then it just hovers, but it's giving me no indication that the script has any errors (and I'm very confident that it doesn't myself). Is there something I can do to fix this? Or should I go about getting the helicopter to pick up the player some other way?
  24. GF Custom Deathscreen Script by GEORGE FLOROS [GR] Description: Adding an image of blood and sound when killed to spice it a little bit . You are free to do anything but i would like to give me Credits for this! Simple and easy to use and adapt . Have Fun ! Installation: Installation / Usage: For usage instructions and information of how to use the GF Custom Deathscreen Script , please refer to the included documentation and/or example mission. Place in your mission the files . There is everything included , in the init.sqf and the description.ext , to copy paste in your mission . https://community.bistudio.com/wiki/SQF_syntax Don't try to open this with the simple notepad. For everything that is with comment // in front or between /* means that it is disabled , so there is no need to delete the extra lines. You can open this ex: with notepad++ https://notepad-plus-plus.org/ and also use the extra pluggins (this way will be better , it will give also some certain colours to be able to detect ex. problems ) http://www.armaholic.com/page.php?id=8680 or use any other program for editing . For the Compilation List of my GF Scripts , you can search in: https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-scripts/ Credits & Thanks: Thanks to All script contributors Thanks to everyone who tries to do the best for this game! Thanks to BIS for such a great platform . Thanks to BIS Community and BIS Community Forums . Thanks to Armaholic Community and Forums . Changelog: v1.1 fixed name v1.0 Forum topic: - Armaholic forums Armaholic GF Custom Deathscreen Script
  25. Hello! I'm very new to scripting in Arma, or any form of code in general. I"m struggling to get this script to work. My current goal is to throw a green smoke grenade and have a helicopter spawn, fly to the smoke grenade position, drop a supply crate, and fly away. Any help would be amazing! Original script credits go to Tym Cooper's video on helicopter positon to smoke grenades - "https://www.youtube.com/watch?v=e_hOKoOfqfw" and Soolie's supply drop script - "https://forums.bohemia.net/forums/topic/177299-customizable-supply-drop-release/" Arma tells me my error is in this line of code (around line 44) places "lxl" before select 0 _supplyWP2 = _supplyGrp addWaypoint [[(_dropPos select 0)+_supplyRandomLocX, (_dropPos select 1)+_supplyRandomLocY, _dropPos select 2], 2]; HERE is the full script //script start _shooter = _this Select 0; _ammotype = _this Select 4; _dropPos = getpos player nearestObject "SmokeShellBlue"; _supplyBoxFnc = "b_supplycrate_f"; _supplyCargoFnc = { _supplyBoxFnc addWeaponCargoGlobal ["hgun_Pistol_Signal_F",3]; _supplyBoxFnc addMagazineCargoGlobal ["6Rnd_RedSignal_F", 10]; _supplyBoxFnc addWeaponCargoGlobal ["hgun_Pistol_heavy_01_snds_F",3]; _supplyBoxFnc addMagazineCargoGlobal ["11Rnd_45ACP_Mag", 10]; _supplyBoxFnc addWeaponCargoGlobal ["srifle_GM6_LRPS_F",3]; _supplyBoxFnc addMagazineCargoGlobal ["5Rnd_127x108_APDS_Mag", 10]; _supplyBoxFnc addItemCargoGlobal ["V_PlateCarrierGL_rgr", 10]; _supplyBoxFnc addItemCargoGlobal ["U_I_GhillieSuit", 10]; _supplyBoxFnc addBackpackCargoGlobal ["B_AssaultPack_ocamo", 10]; }; //hint format["%1",_ammotype]; sleep 2; switch (_ammotype) do { case "SmokeShellBlue": //add script below { //_supplyLocArray = [+1000,-1375,-1500,-1125,+1250,-1000,+1375,-1250,+1500,+1125]; _supplyLocArray = [+100,-100]; _supplyRandomLocX = _supplyLocArray select floor random count _supplyLocArray; _supplyRandomLocY = _supplyLocArray select floor random count _supplyLocArray; _supply = [[( _player select 0)+_supplyRandomLocX, ( _player select 1)+_supplyRandomLocY, ( _player select 2)+50], 180, "I_Heli_Transport_02_F", WEST] call bis_fnc_spawnvehicle; _supplyHeli = _supply select 0; _supplyHeliPos = getPos _supplyHeli; _supplyMrkrHeli = createMarker ["supplyMrkrHeli", _supplyHeliPos]; _supplyCrew = _supply select 1; _supplyGrp = _supply select 2; _supplyGrp setSpeedMode "FULL"; _supplyGrp setBehaviour "CARELESS"; _supplyWP1 =_supplyGrp addWaypoint [(_dropPos),1]; _supplyWP1 setWaypointType "MOVE"; _supplyWP2 = _supplyGrp addWaypoint [[(_dropPos select 0)+_supplyRandomLocX, (_dropPos select 1)+_supplyRandomLocY, _dropPos select 2], 2]; _supplyMrkrLZ = createMarker ["supplyMrkrLZ", _dropPos]; "supplyMrkrLZ" setMarkerType "Empty"; "supplyMrkrHeli" setMarkerType "Empty"; _supplyHeli flyInHeight 150; hint "The supplies are on the way"; _supplyMrkrHeliPos = getMarkerPos "supplyMrkrHeli"; _supplyMrkrHeliPos2 = [_supplyMrkrHeliPos select 0, _supplyMrkrHeliPos select 1, (_supplyMrkrHeliPos select 2)+50]; _supplyHeli = _supplyMrkrHeliPos2 nearestObject "I_Heli_Transport_02_F"; _supplyMrkrLZPos = getMarkerPos "supplyMrkrLZ"; _supplyLZ = createVehicle ["Land_Laptop_device_F", getMarkerPos "supplyMrkrLZ", [], 0, "NONE"]; deleteMarker "supplyMrkrHeli"; deleteMarker "supplyMrkrLZ"; _supplyLZ hideObject true; waitUntil {( _supplyLZ distance _supplyHeli)<400}; _supplyHeli animateDoor ["CargoRamp_Open",1]; waitUntil {( _supplyLZ distance _supplyHeli)<200}; sleep 2; _supplyHeli allowDammage false; _supplyBox = createVehicle [_supplyBoxFnc, position _supplyHeli, [], 0, "CAN_COLLIDE"]; clearBackpackCargoGlobal _supplyBox; clearWeaponCargoGlobal _supplyBox; clearMagazineCargoGlobal _supplyBox; clearItemCargoGlobal _supplyBox; _supplyBox disableCollisionWith _supplyHeli; _supplyHeli disableCollisionWith _supplyBox; _supplyBox allowDammage false; _supplyBox attachTo [_supplyHeli, [0, 0, 0], "CargoRamp"]; _supplyBox setDir ([_supplyBox, _supplyHeli] call BIS_fnc_dirTo); detach _supplyBox; deleteVehicle _supplyLZ; //concerned area [_supplyBox,_supplyCargoFnc,nil,true] call BIS_fnc_MP; [_supplyBox,"FncSupplyLight",nil,true] call BIS_fnc_MP; //concerned area _supplyChute = createVehicle ["B_parachute_02_F", position _supplyBox, [], 0, "CAN_COLLIDE"]; _supplyBox attachTo [_supplyChute,[0,0,-0.5]]; _supplyChute hideObject true; _supplyChute setPos getPos _supplyBox; _supplyLight = "Chemlight_green" createVehicle (position _supplyBox); _supplyLight attachTo [_supplyBox, [0,0,0]]; sleep 1; hint "The supplies have been dropped"; _supplyChute hideObject false; _supplyHeli allowDammage true; _supplyBox allowDammage true; _supplyHeli animateDoor ["CargoRamp_Open",0]; //:::::::::::|SMOKE|::::::::::: _supplySmoke = "SmokeShell" createVehicle (position _supplyBox); _supplySmoke attachTo [_supplyBox, [0,0,0]]; //::::::::::::::::::::::::::::: waitUntil {(getPos _supplyBox select 2)<2}; detach _supplyBox; _supplyChute setPos [ (getPos _supplyChute select 0)+0.75, getPos _supplyChute select 1, getPos _supplyChute select 2]; hint ""; sleep 5; {deleteVehicle _x;}forEach crew _supplyHeli;deleteVehicle _supplyHeli; }; case "1Rnd_SmokeGreen_Grenade_shell": { Hint "Green SmokeShell Detected"; }; case "FlareGreen_F": { Hint "Green Flare Detected"; }; case "3Rnd_SmokeGreen_Grenade_shell": { Hint "Green SmokeShell Detected"; }; case "UGL_FlareGreen_F": { Hint "Green Flare Detected"; }; case "3Rnd_UGL_FlareGreen_F": { Hint "Green Flare Detected"; }; }; //script end used for players unit init player addEventHandler ["fired",{_this execvm "supply_smoke.sqf"}]
×