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
  • Mercurious Brotherhood +2347063372861's +2347063372861>> I WANT TO JOIN OCCULT FOR MONEY RITUAL
  • 123betcasino01'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 675 results

  1. GEORGE FLOROS GR

    GF Cleanup Script

    GF Cleanup Script by GEORGE FLOROS [GR] Description: GF Cleanup Script , configurable script. 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 Cleanup 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 , 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: Configurable Script. You can select to delete : Particlesource,Dead,Mines,Ruins,Craters, Dropped Items,Static Weapon,Empty Groups, Empty Vehicles,emptyDetector MP triggers. You can exclude certain objects , by adding in the init of the object , in the editor or include in the scripted spawn : this setVariable ["GF_Excude_from_cleanup",true]; It is possible to create an Exclude Zone , by creating a marker. There are already 5 created in the editor as a working example , that you can just copy paste them in your mission. 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: v4.0 A lot of code is reedited , added option to exclude certain objects , by setting a variable, added option to create an Exclude Zone , by creating a marker, for more information check the Notes + see ex. mission. Code Performance and optimisation and minor fixes. v3.0 Code Performance and optimisation and minor fixes. v2.0 Added distance parameter added more options and minor changes. v1.0 Forum topic: - Armaholic forums http://www.armaholic.com/forums.php?m=posts&q=39927 Armaholic download GF Cleanup Script
  2. Hello, I have been thinking about one particular script that would basically do this: Players on dedicated enter the room or building. After a short while room locks and entraps players inside. Gas enters the room. Players without gasmask fall unconscious. After that I can capture and teleport them to the torture room (via zeus), from which they have to escape by solving puzzles and playing as team. - that is my mission idea. I have found this compilation (no mod required) which seems to function nice and I bet it can be modified not to kill players but uncon them. https://steamcommunity.com/sharedfiles/filedetails/?id=2711516635&searchtext=toxic+cloud However I am not experienced scripter. Any ideas ?
  3. VASS - Virtual Arsenal Shop System Introduction VASS provides a simple to setup shop system and is the successor to the Arsenal Shop. The system provides several functions to handle traders and items. As of now it does not come bundled with an economy system but the implementation of an external one is easily possible. Setup Enable system: Download the GitHub repo: https://github.com/7erra/VASS-Virtual-Arsenal-Shop-System Check the example mission (Mission.VR) Copy the VASS folder to your mission Add the lines from the description.ext Add trader: Execute the addShop function: [this] call TER_fnc_addShop Add an inventory with the addShopCargo function: [this, ["itemclass0", 15, 5, ..., "itemClassN", price, amount]] call TER_fnc_addShopCargo For easier setup of this cost table I have created a mod that does this task with a user interface: https://steamcommunity.com/sharedfiles/filedetails/?id=1760193128. The settings can be changed by opening the object's attribute window and scrolling down to the "VASS" section. Handle money: Edit the TER_fnc_VASShandler in "VASS\fnc\fn_VASShandler.sqf" Change the getMoney and setMoney functions to match your economy system Documentation GitHub will have a wiki on all aspects of the system. In addition to that all relevant functions have a header at the beggining of the file to show you what arguments they expect and what they do. Further links GitHub: https://github.com/7erra/VASS-Virtual-Arsenal-Shop-System VASS 3den mod: https://steamcommunity.com/sharedfiles/filedetails/?id=1760193128 BI forums: https://forums.bohemia.net/forums/topic/219677-release-virtual-arsenal-shop-system/ Screenshots That's all for now and I hope that you find this useful! 7erra DISCLAIMER - This post was edited nearly a year after the original post. Don't expect comments from the previous discussion (up until page 5) to be applicable to the new system
  4. Hello guys. I've basically created an account to ask for your help as I really don't have any idea what's going on. I'm currently doing a little experiment with some scripts I found on the Steam workshop. I created my mission and created an init.sqf file for testing purposes (of course, inside the mission I created). After that and several tests, I decided to stop and continue today. Nevertheless, for some reason, when I loaded the mission I was welcomed with an error message saying: "Script C:\Users\USUARIO\Documents\Arma 3 - Other Profiles\[Sgt]%20Zeonn\missions\DiosDelClimaTEST.Altis\init.sqf not found". My first thought was to make sure my init.sqf was actually a sqf file just in case Windows messed up with my stuff. But it didn't, it is an sqf file and everything is exactly how it was yesterday, after checking the RPT files I saw this: 20:45:49 Invalid path (only relative paths supported): 'C:\Users\USUARIO\Documents\Arma 3 - Other Profiles\[Sgt]%20Zeonn\missions\DiosDelClimaTEST.Altis\init.sqf' 20:45:49 Warning Message: Script C:\Users\USUARIO\Documents\Arma 3 - Other Profiles\[Sgt]%20Zeonn\missions\DiosDelClimaTEST.Altis\init.sqf not found 20:45:49 ScriptVM file C:\Users\USUARIO\Documents\Arma 3 - Other Profiles\[Sgt]%20Zeonn\missions\DiosDelClimaTEST.Altis\init.sqf cannot be opened! It doesn't make any sense because the file path is correct, and file extension is correct (I did the full extension thing, save the file on Notepad++ and with Visual Studio to be double sure). I was about to give up when I loaded another mission, imagine my surprise when I saw the exact same error message, it's happening in all my missions. Even the older ones (like Liberation). However, I discovered that if I export the mission using the editor option (the one that saves it in the steam folder Arma3/missions as a PBO), and loaded using the Scenario option in the main menu, the init.sqf LOADS PERFECTLY, and everything runs as it's supposed to. I don't what's going on, and I have no idea how to solve it. I already tried creating a new profile, reloading the missions, verifying the game files, and everything. Would you guys help me on this? Forgot to mention: if I do an execVM "init.sqf" it also detects the file. Which makes even less sense.
  5. moved to the right topic:
  6. AI Medic Auto Heal by Rydygier & Gunter Severloh Description AI Medic auto heal is a code where an ai medic in your squad you command, will automatically heal each member of the squad or group including the player if they are injured without commanding them to do so. The code was written by Rydygier, which was a major upgrade of the code i had presented to him with. How it works: 1. Every 10 seconds the code checks, if units in the group are damaged >0.1; 2. If so, the code looks for a valid medic unit in wounded unit's group (wounded unit itself excluded). Valid medic must be alive, not on the move (unitReady), AI, with a trait "Medic" (so only certain classes, not any), closer, than 500m from the wounded unit, and not busy with healing already. 3. Closest of valid medics is chosen. 4. If both medic and wounded are in the same vehicle, auto heal should occur after 5 seconds (no FAK or medikit required), unless medic or wounded is killed or deleted during that 5 seconds. If not: 5. If wounded unit's vehicle is moving fast or not touching ground - the code breaks and no healing action will occur. Otherwise: 6. Medic gets doMove towards wounded unit. Medic will not try to use his current vehicle in order to reach wounded unit's position. Instead, it will disembark and move on foot. If wounded unit is in a vehicle, medic's actual destination is only in rough vicinity though. If in the meantime medic gets stuck, the distance from the wounded increase by additional 200m above initial distance for any reason or any mentioned above conditions become not OK, code breaks, medic is stopped, no healing will occur. Otherwise: 7. The movement is concluded, if at the end medic is close enough to the wounded - healing action will occur. If wounded is in the vehicle, likely medic will be teleported in the direct vicinity of the wounded (so may end within vehicle's model box until healing is over). "HealSoldier" action requires/consumes a FAK or medikit, but my code adds "setDamage 0" auto heal at the end of this action, so even, if medic is out of FAKs, wounded should be healed. Without it healing wounded sitting in a vehicle could fail (would need more testing to confirm for sure). If described procedure is interrupted without healing action and the player is still alive and wounded, in the next cycle (10 seconds) it will be attempted again. 8. Medics now can also heal themselves with this script. 9. Wounded are prioritized by distance from closest available medic and severity of the wound (both factors are weighted together). 10. Modified wound detection. Now it is based on hitPoints damage, not overall damage (so limping due to fall from above should trigger a medic). Note - if both, player and medic are subordinates of an AI TL, TL may override medic's movements with other commands, like "return to formation". Hence it is recommended for player TL groups. Otherwise player may be forced to approach the medic close enough (not tested). Installation and Setup Setup - Script 1. Create a notepad/notepad++ document and copy and paste the following code into it: 2. Save and name the document: init.sqf and put it into your scenario folder. [] spawn { RYD_SM_EnemyCloseDistance = 100;//if medics must move to the wounded, but he is engaged in combat with some enemy being closer than this value, medic is considered not available and will interrupt pending movement waitUntil { sleep 1; (alive player) }; RYD_SM_HealCheck = { params ["_unit","_medics"]; if ((time - (_unit getVariable ["RYD_SM_LastCheck",0])) < 10) exitWith {};//check only once per 10 seconds _unit setVariable ["RYD_SM_LastCheck",time]; if not (alive _unit) exitWith {};//just in case, "Hit" would trigger for a dead player _vehicleUnit = vehicle _unit; if (alive (_unit getVariable ["RYD_SM_HealedBy",objNull])) exitWith {};//exit if already treated //potential medic is one of _unit's team mates, _unit excluded, that are alive, unitReady, AI, of proper medic class, closer, than 500m and not busy with healing already if (_unit in _medics) exitWith { _unit setVariable ["RYD_SM_Busy",true]; _unit setVariable ["RYD_SM_HealedBy",_unit]; [_unit,_vehicleUnit] spawn { params ["_unit","_vehicleUnit"]; _unit action ["HealSoldierSelf",_unit]; if not (_unit isEqualTo _vehicleUnit) exitWith { sleep 5; _unit setVariable ["RYD_SM_HealedBy",nil]; _unit setVariable ["RYD_SM_Busy",nil]; if not (alive _unit) exitWith {}; _unit setDamage 0; }; _time = time; waitUntil { sleep 1; if not (alive _unit) exitWith {true}; ((((toLower (animationState _unit)) find "medic") >= 0) or {(time - _time) > 5}) }; if not (alive _unit) exitWith {}; _time = time; waitUntil { sleep 1; if not (alive _unit) exitWith {true}; ((((toLower (animationState _unit)) find "medic") < 0) or {(time - _time) > 5}) }; _unit setVariable ["RYD_SM_HealedBy",nil]; _unit setVariable ["RYD_SM_Busy",nil]; }; }; _medics = _medics select {(_x distance _unit) < 500}; if ((count _medics) < 1) exitWith {};//exit if no valid medics _medics = _medics apply {[_x distance _unit,_x]}; _medics sort true; _medic = (_medics select 0) select 1;//closest of medics is chosen _vehicleMedic = vehicle _medic; _sameVehicle = _vehicleUnit isEqualTo _vehicleMedic; if (not (_sameVehicle) and {((abs (speed _vehicleUnit)) > 10)}) exitWith {};//exit if _unit is moving fast if (not (_sameVehicle) and {not (isTouchingGround _vehicleUnit)}) exitWith {};//exit if _unit is flying _unit setVariable ["RYD_SM_HealedBy",_medic]; _medic setVariable ["RYD_SM_Busy",true]; if (_sameVehicle) exitWith//if _medic and _unit are in the same vehicle, just automatically conclude healing with 5 sec delay { [_unit,_medic] spawn { params ["_unit","_medic"]; _medic action ["HealSoldier",_unit]; sleep 5; _unit setVariable ["RYD_SM_HealedBy",nil]; _medic setVariable ["RYD_SM_Busy",nil]; if not (alive _unit) exitWith {}; if not (alive _medic) exitWith {};//if during the delay _medic or _unit are killed or delted - no healing. Otherwise healing occurs even if one or both leave vehicle in the meantime. _unit setDamage 0; }; }; _unitPosition = getPosATL _vehicleUnit; _medicPosition = getPosATL _vehicleMedic; _distance = _unitPosition distance _medicPosition; _threshold = if (_unit isEqualTo _vehicleUnit) then { 2.5 } else { ((sizeOf (typeOf _vehicleUnit))/2) }; if (_distance > _threshold) then { if not (_medic isEqualTo _vehicleMedic) then { _medic action ["GetOut",_vehicleMedic]; }; _medic doMove _unitPosition; [_unit,_medic,_vehicleUnit,_distance,_threshold] spawn { params ["_unit","_medic","_vehicleUnit","_distance","_threshold"]; sleep 1; _stuck = 0; _inFight = false; waitUntil { _pos1 = getPosATL _medic; sleep 2; _pos2 = getPosATL _medic; if not (alive _unit) exitWith {true}; if not (alive _medic) exitWith {true}; _enemy = getAttackTarget _medic; if ((alive _enemy) and {((_medic distance _enemy) < RYD_SM_EnemyCloseDistance) and {((_medic knowsAbout _enemy) > 1.5)}}) exitWith {_inFight = true;true}; if ((abs (speed _vehicleUnit)) > 10) exitWith {true}; if not (isTouchingGround _vehicleUnit) exitWith {true}; if ((_pos1 distance _pos2) < 0.1) then { _stuck = _stuck + 1; }; _threshold = if (_unit isEqualTo _vehicleUnit) then { 2.5 } else { ((sizeOf (typeOf _vehicleUnit))/2) }; if ((unitReady _medic) and {((_medic distance _vehicleUnit) >= _threshold)}) then { _medic doMove (getPosATL _vehicleUnit); }; ((unitReady _medic) or {(_stuck > 5) or {((_medic distance _vehicleUnit) > (_distance + 200))}}) }; if (_inFight) exitWith { _medic doMove (getPosATL _medic); _unit setVariable ["RYD_SM_HealedBy",nil]; _medic setVariable ["RYD_SM_Busy",nil]; }; if not (alive _unit) exitWith { _medic doMove (getPosATL _medic); _unit setVariable ["RYD_SM_HealedBy",nil]; _medic setVariable ["RYD_SM_Busy",nil]; }; if not (alive _medic) exitWith { _unit setVariable ["RYD_SM_HealedBy",nil]; _medic setVariable ["RYD_SM_Busy",nil]; }; if (_stuck > 10) exitWith { _medic doMove (getPosATL _medic); _unit setVariable ["RYD_SM_HealedBy",nil]; _medic setVariable ["RYD_SM_Busy",nil]; }; if ((abs (speed _vehicleUnit)) > 10) exitWith { _medic doMove (getPosATL _medic); _unit setVariable ["RYD_SM_HealedBy",nil]; _medic setVariable ["RYD_SM_Busy",nil]; };//exit if _unit is moving fast if not (isTouchingGround _vehicleUnit) exitWith { _medic doMove (getPosATL _medic); _unit setVariable ["RYD_SM_HealedBy",nil]; _medic setVariable ["RYD_SM_Busy",nil]; };//exit if _unit is flying if ((_medic distance _vehicleUnit) > (_distance + 200)) exitWith { _medic doMove (getPosATL _medic); _unit setVariable ["RYD_SM_HealedBy",nil]; _medic setVariable ["RYD_SM_Busy",nil]; };//if for any reason distance increased too much (troublesome pathfinding for example) _medic doMove (getPosATL _medic); if ((_medic distance _vehicleUnit) < _threshold) then { _medic action ["HealSoldier",_unit]; _time = time; waitUntil { sleep 1; if not (alive _unit) exitWith {true}; if not (alive _medic) exitWith {true}; ((((toLower (animationState _medic)) find "medic") >= 0) or {(time - _time) > 5}) }; if not (alive _unit) exitWith {}; if not (alive _medic) exitWith {}; _time = time; waitUntil { sleep 1; if not (alive _unit) exitWith {true}; if not (alive _medic) exitWith {true}; ((((toLower (animationState _medic)) find "medic") < 0) or {(time - _time) > 5}) }; _unit setVariable ["RYD_SM_HealedBy",nil]; _medic setVariable ["RYD_SM_Busy",nil]; if not (alive _unit) exitWith {}; if not (alive _medic) exitWith {}; _unit setDamage 0; }; }; } else { [_unit,_medic] spawn { params ["_unit","_medic"]; _medic doMove (getPosATL _medic); _medic action ["HealSoldier",_unit]; _time = time; waitUntil { sleep 1; if not (alive _unit) exitWith {true}; if not (alive _medic) exitWith {true}; ((((toLower (animationState _medic)) find "medic") >= 0) or {(time - _time) > 5}) }; if not (alive _unit) exitWith {}; if not (alive _medic) exitWith {}; _time = time; waitUntil { sleep 1; if not (alive _unit) exitWith {true}; if not (alive _medic) exitWith {true}; ((((toLower (animationState _medic)) find "medic") < 0) or {(time - _time) > 5}) }; _unit setVariable ["RYD_SM_HealedBy",nil]; _medic setVariable ["RYD_SM_Busy",nil]; if not (alive _unit) exitWith {}; if not (alive _medic) exitWith {}; _unit setDamage 0; }; }; }; while {alive player} do { _units = (units (group player)) select {(alive _x)}; _wounded = _units select {((((getAllHitPointsDamage _x) select 2) findIf {_x > 0.1}) >= 0)}; if ((count _wounded) > 0) then { _medics = _units select {(unitReady _x) and {not (isPlayer _x) and {(_x getUnitTrait "Medic") and {not (_x getVariable ["RYD_SM_Busy",false]) and {not (((alive (getAttackTarget _x)) and {((_x distance (getAttackTarget _x)) < RYD_SM_EnemyCloseDistance) and {((_x knowsAbout (getAttackTarget _x)) > 1.5)}}))}}}}}; if ((count _medics) > 0) then { _wounded = _wounded apply { _unit = _x; _medics2 = _medics apply {[_x distance _unit,_x]}; _medics2 sort true; _medicD = (_medics2 select 0) select 0; _val = (damage _x)/(_medicD max 1); [_val,_x] }; _wounded sort false; { [(_x select 1),_medics] call RYD_SM_HealCheck; _medics = _medics select {not (_x getVariable ["RYD_SM_Busy",false])}; if ((count _medics) == 0) exitWith {}; } foreach _wounded; }; }; sleep 10; }; }; Setup - External Script - (optional) Instead of using a init.sqf for the code, you can setup an external script that can be used instead: 1. Create a notepad/notepad++ document and copy and paste the code from above into it: 2. Save and name the document: RYD_AI_AutoMedic.sqf and put it into your scenario folder. 3. Create a notepad/notepad++ document and add the following code to it: execVM "RYD_AI_AutoMedic.sqf"; 4. Save and name the document: init.sqf 5. Add both RYD_AI_AutoMedic.sqf and the init.sqf to your scenario folder where the mission.sqm is located. Credits Rydygier wrote the code. Both Gunter's and Rydygier's ideas.
  7. JBOY Mace Trap for Prairie Fire is released! The jungles of Nam just got a little more dangerous! This is not MP tested yet, but hopefully will work. Please report any bugs found in this thread. Fun release vid: Editor demonstration showing how to set up mace traps: Original pre-release teaser video: Get sample mission here: https://www.dropbox.com/s/erki8qb50f9his9/JBOY_MacePunjiTrapDemo.vn_khe_sanh.7z?dl=0 Credits: Savage Game Design for objects and voice files used in the script. Bohemia Interactive for voice files and sound fx. How to add Mace Traps to mission in the Editor: Copy the JBOY folder from sample mission into your mission folder. Include these two lines (copy from sample mission init.sqf) into you init.sqf file. // ********************************************************************** // Compile JBOY functions // ********************************************************************** _n = execVM "JBOY\JBOY_compileFuncs.sqf"; // Compile general JBOY functions call compile preprocessFile "JBOY\mace\compileMaceScripts.sqf"; // Compile all Mace functions Place a Whip Trap object in the editor. The direction you set the trap will be the direction the mace will swing. Note that AI may be inclined to walk around the trap, so you might want to place more objects on map to funnel the AI path into the trap. In the Whip Trap object's init field, put the following code: [this,'WEST'] spawn {sleep 3; _this spawn JBOY_maceTrapCreate;}; The second parameter above determines who can activate the trap. This script creates a trigger for the trap, so these are the values you canuse for this parameter: "EAST", "WEST", "GUER", "CIV", "LOGIC", "ANY", "ANYPLAYER" For a Prairie Fire mission you might want to set it to WEST so only West units activate the trap. This simulates the locals (VC and Civs) knowing to avoid the trap.
  8. -=/Respawn in Singleplayer\=- by Rydygier & Gunter Severloh Description When your playing a mission in single-player, either a subscribed or a mission you created yourself, and when you get killed, did you ever wonder if it were possible if you could just keep playing somehow without relying on saves? If you could just respawn like you can in multiplayer? ... Well now you can! This is a code written by Rydydgier that will allow you to respawn in singelplayer, either through preview in the editor, or in a mission in scenarios. All you need to do is define a marker where you want to respawn, or a vehicle name you want to respawn at for a mobile respawn, and then add the ini.sqf in the scenario folder. See the features below for more details! Features - Respawn anywhere by defining where you want to respawn at via marker like a base respawn. - Make your scenario dynamic and replayable by setting up a random respawn by defining where you want to respawn via multiple markers. - Setup a mobile respawn by giving a vehicle a name and you will respawn wherever that vehicle is. - Use the code from an external script and not directly from the init.sqf if you want too. - Save your loadout on respawn of the placed unit in the editor, or respawn with the added loadout setup through arsenal that was applied to the unit. - Set how many times you want to respawn, either use a set number or set it to -1 for unlimited respawns. - Remove your dead body apon death, automatic corpse removal, every time you die in your mission your player character's body will be deleted by sinking into the ground. - Respawn screen. - Respawn timer. Installation and Setup Setup - Script 1. Create a notepad/notepad++ document and copy and paste the following code into it: 2. Save and name the document: init.sqf and put it into your scenario folder. //single player respawn script RYD_SPR_RespawnPositions = [myCar_1];//one will be chosen at random, markers, objects or arrays including coordintes and direction, for example: RYD_SPR_RespawnPositions = ["marker1","OtherMarker_2",someObject_1,[[100,200,0],120]]; RYD_SPR_Respawns = -1;//amount of respawns. If set with negative value - unlimited respawns RYD_SPR_ChangedLoadout = true;//if true, new unit will get old unit's loadout as it was at death, otherwise new unit will get default loadout. RYD_SPR_DelayParameters = [10,false,true,{}];//[delay in seconds, black courtain, external view, optional code to be executed in the middle of countdown where _this equals new unit] RYD_SPR_TextColor = "3a96d4";//RESPAWN IN: color. //all above arrays can be re-defined on the fly. RYD_SPR_atKilled = { params ["_killed"]; if not (RYD_SPR_Respawns == 0) then { _delay = RYD_SPR_DelayParameters select 0; _blackout = RYD_SPR_DelayParameters select 1; _mode2 = "PLAIN"; _mode3 = "PLAIN"; _mode = if (_blackout) then { _mode2 = "BLACK FADED"; _mode3 = "BLACK IN"; 0.55 fadeSound 0.1; "BLACK OUT" } else { (5 min (_delay + 1)) fadeSound 0.1; "PLAIN" }; "RYD_SPR_RespawnCurtain" cutText ["",_mode,0.55]; enableRadio false; clearRadio; if (RYD_SPR_Respawns > 0) then { RYD_SPR_Respawns = RYD_SPR_Respawns - 1; }; _respawnPos0 = selectRandom RYD_SPR_RespawnPositions; _respawnDir = 0; _respawnPos = switch (typeName _respawnPos0) do { case ("STRING") : { _respawnDir = markerDir _respawnPos0; (getMarkerPos _respawnPos0) }; case ("OBJECT") : { _respawnDir = getDir _respawnPos0; (getPosATL _respawnPos0) }; default { _respawnDir = _respawnPos0 select 1; (_respawnPos0 select 0); }; }; _newUnit = (group _killed) createUnit [(typeOf _killed),_respawnPos,[],0,"NONE"]; _newUnit allowDamage false; _newUnit setCaptive true; _newUnit enableSimulation false; _newUnit hideObject true; _newUnit setDir _respawnDir; //_newUnit setPosATL _respawnPos; _newUnit addEventHandler ["Killed",RYD_SPR_atKilled]; if (RYD_SPR_ChangedLoadout) then { _newUnit setUnitLoadout (missionNameSpace getVariable ["RYD_SPR_customLoadout",(getUnitLoadout _killed)]); }; _killedPos = getPosATL _killed; hideBody _killed; addSwitchableUnit _newUnit; [_newUnit,_mode2,_mode3,_killedPos] spawn { params ["_newUnit","_mode2","_mode3","_killedPos"]; _delay = RYD_SPR_DelayParameters select 0; _blackout = RYD_SPR_DelayParameters select 1; _externalView = RYD_SPR_DelayParameters select 2; _code = RYD_SPR_DelayParameters select 3; _camera = objNull; if (_externalView) then { _camPos = _killedPos getPos [2,(random 360)]; _camPos set [2,6]; _camera = ("camera" camCreate _camPos); camUseNVG (sunOrMoon < 0.5); _camera camSetTarget _killedPos; showCinemaBorder false; _camera cameraEffect ["internal", "BACK"]; _camera camCommit 0; _camPos = _killedPos getPos [((((_delay + 1) max 1)* 2) min 200),(random 360)]; _camPos set [2,((((_delay + 1) max 1) * 6) min 600)]; _camera camSetPos _camPos; _camera camCommit (_delay + 1); }; RYD_SPR_ppChrom = ppEffectCreate ["chromAberration", 1499]; RYD_SPR_ppChrom ppEffectAdjust [0.005,0.005,true]; RYD_SPR_ppCCor = ppEffectCreate ["ColorCorrections",1500]; RYD_SPR_ppCCor ppEffectAdjust [1, 0.4, 0, [0, 0, 0, 0], [1, 1, 1, 0], [1, 1, 1, 0]]; RYD_SPR_ppBlur = ppEffectCreate ["DynamicBlur", 1501]; RYD_SPR_ppBlur ppEffectAdjust [0.08]; RYD_SPR_ppGrain = ppEffectCreate ["FilmGrain", 1502]; RYD_SPR_ppGrain ppEffectAdjust [0.5, 2, 1, 1, 1, 0]; sleep 1; selectPlayer _newUnit; _newUnit call _code; BIS_DeathBlur ppEffectAdjust [0]; BIS_DeathBlur ppEffectCommit 0; RYD_SPR_ppCCor ppEffectEnable true; RYD_SPR_ppCCor ppEffectCommit (5 min (_delay + 1)); RYD_SPR_ppGrain ppEffectEnable true; RYD_SPR_ppGrain ppEffectCommit (5 min (_delay + 1)); RYD_SPR_ppBlur ppEffectEnable true; RYD_SPR_ppBlur ppEffectCommit (5 min (_delay + 1)); RYD_SPR_ppChrom ppEffectEnable true; RYD_SPR_ppChrom ppEffectCommit (5 min (_delay + 1)); _time = time; waitUntil { sleep 0.05; _countdown = ((_delay - (time - _time)) max 0) toFixed 1; "RYD_SPR_RespawnCurtain" cutText [(format ["<t color='#%2' size='1.75' align='left' shadow='1'>RESPAWN IN: %1</t>",_countdown,RYD_SPR_TextColor]),_mode2,0.01,true,true]; ((time - _time) > _delay) }; _camera cameraEffect ["terminate", "BACK"]; camDestroy _camera; camUseNVG false; ppEffectDestroy RYD_SPR_ppGrain; ppEffectDestroy RYD_SPR_ppBlur; ppEffectDestroy RYD_SPR_ppChrom; ppEffectDestroy RYD_SPR_ppCCor; 0.55 fadeSound 1; enableRadio true; _newUnit allowDamage true; _newUnit setCaptive false; _newUnit enableSimulation true; _newUnit hideObject false; "RYD_SPR_RespawnCurtain" cutText ["",_mode3,0.55]; }; } else { enableEndDialog; }; }; waitUntil { sleep 0.1; (alive player) }; missionNameSpace setVariable ["RYD_SPR_customLoadout",(getUnitLoadout player)]; player addEventHandler ["Killed",RYD_SPR_atKilled]; Setup - editor (base respawn) For a normal base respawn, in the editor place a marker and name it what you want and then add the name of the marker in quotes to this parameter like in the code below: RYD_SPR_RespawnPositions = ["m1"]; //one will be chosen at random, markers, objects or arrays including coordinates and direction, for example: RYD_SPR_RespawnPositions = ["marker1","OtherMarker_2",someObject_1,[[100,200,0],120]]; Setup - editor (mobile respawn) To setup a mobile respawn in the editor place a vehicle and name it what you want and then add the name of the vehicle without quotes to this parameter like in the code below: RYD_SPR_RespawnPositions = [myCar_1]; //one will be chosen at random, markers, objects or arrays including coordinates and direction, for example: RYD_SPR_RespawnPositions = ["marker1","OtherMarker_2",someObject_1,[[100,200,0],120]]; Setup - External Script Instead of using the init.sqf for the code, you can setup an external script that can be used: 1. Create a notepad/notepad++ document and copy and paste the code from above into it: 2. Save and name the document: RYD_RSP.sqf and put it into your scenario folder. 3. Create a notepad/notepad++ document and add the following code to it: execVM "RYD_RSP.sqf"; 4. Add both RYD_RSP.sqf and the init.sqf to your scenario folder where the mission.sqm is located. Parameters There are 5 parameters you can adjust based on what you want to do in your scenario: RYD_SPR_RespawnPositions = ["m1"]; "m1" is an example name of a marker, it will be chosen at random, markers, objects or arrays including coordinates and direction, for example: RYD_SPR_RespawnPositions = ["marker1","OtherMarker_2",someObject_1,[[100,200,0],120]]; If only one marker name is defined then you will only respawn at that marker, if more are defined then you will respawn randomly at one of the markers defined in the array. RYD_SPR_Respawns = 3; 3 is the amount of respawns you want, it can be any number. If set with negative value like -1 you will have unlimited respawns. RYD_SPR_ChangedLoadout = true; If set to true, new unit will get old unit's loadout as it was at death, otherwise new unit will get default loadout of placed editor unit. RYD_SPR_DelayParameters = [10,false,true,{}]; //[delay in seconds, black curtain, external view, optional code to be executed in the middle of countdown where _this equals new unit] RYD_SPR_TextColor = "3a96d4"; //RESPAWN IN: color. Credits Rydygier wrote the code. Both Gunter's and Rydygier's ideas.
  9. Greets guys (and girls if there are any) ! I need a script bu which only pilots can use choppers and planes. Can anyone explain how to do that? Thanks
  10. Estoy creando intentando un script para crear una patrulla aleatoriamente pero cuando comienzo la misión me sale que randomPatrol.sqf no se encuentra. A ver si alguien sabe por qué. Gracias de antemano. // randomPatrol.sql // Configuración private _patrolCenter = getMarkerPos "patrolCenter"; private _radius = 300; // Radio del área de patrulla private _numSoldiers = 5; // Número de soldados a generar // Clase de unidad del FFAA Mod private _unitClass = "ffaa_s_Inf_Fusilero"; // Crear grupo private _patrolGroup = createGroup east; // Cambia "east" si usas otra facción // Generar soldados y asignarles waypoints aleatorios for "_i" from 1 to _numSoldiers do { // Generar posición aleatoria dentro del radio private _pos = _patrolCenter getPos [random _radius, random 360]; // Crear unidad private _unit = _patrolGroup createUnit [_unitClass, _pos, [], 0, "FORM"]; // Asignar comportamiento y velocidad _unit setBehaviour "SAFE"; _unit setSpeedMode "LIMITED"; // Crear waypoints aleatorios for "_j" from 1 to 3 do { private _wpPos = _patrolCenter getPos [random _radius, random 360]; private _wp = _patrolGroup addWaypoint [_wpPos, 0]; _wp setWaypointType "MOVE"; }; }; // Añadir ciclo de patrullaje private _cycleWp = _patrolGroup addWaypoint [_patrolCenter, 0]; _cycleWp setWaypointType "CYCLE"; // init.sql execVM "randomPatrol.sqf"; Olvidé poner las notas en inglés. Soy español y paso los archivos a otros editores de misiones.
  11. Hello. I am creating tank mod, I want to make it so that when turning on manual fire, I get control not only over the ability to fire from the gun, but also to rotate the gunner turret, since when switching to this mode, I can only shoot and change ammo. Is this solved by scripts or with the help of cfg, and how can I do this?
  12. Hello everyone, Hope this script helps you in your missions. Feel free to improve my code but, please, don't re-post it on Workshop. Use this thread to share your advice and, if possible, already with your code ideas for fixing/improvement (will be very much appreciated). New features? Why not? Cheers. What to expect from this script AI: With just one unit, it's automatically able to... ...act through a VBIED with its specific behaviors; ...act as a deadman trigger with its specific behaviors; ...act as a suicide bomber with its specific behaviors. Demo: suicidalDoctrine.sqf: Features rules of VBIED method: A suicide operator steers the vehicle bomb (VBIED) to a target and, at the right moment, a remote detonation trigger is pressed by the suicide. All method behaviors are described on the Github readme file. Features rules of Deadman Trigger method: A suicide operator wears a suicidal belt/vest and detonates themselves by releasing a reverse-pressure trigger. All method behaviors are described on the Github readme file. Features rules of Classic Suicide Bomber method: A suicide operator wears a suicidal belt/vest and detonates themselves by releasing a reverse-pressure trigger. All method behaviors are described on the Github readme file. Dependencies: CBA mod; ACE mod; Download: From Github: https://github.com/aldolammel/Arma-3-Suicidal-Doctrine-Script From Steam Workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=2739692983 Changelog: 2022-Feb-17, v1.3: news, fixes and notes. Known issues: In Deadman trigger method, when the suicidal is their belt/vest deactivated and, by long distances, they got a non-lethal shot, the suicidal should turn the vest detonation system on, but it's not happening. Although the functionality to lock the steering wheel if the suicide isn't allowed to drive is working, the suicide still insists on being seated in the driver's position. Expected behavior: change to passager seat.
  13. The Prairie Fire DLC has ambient talking for US aligned soldiers and VC soldiers, plus fun death screams all built into their ambient talking function. I love the VC talking and the death screams, but I don't want my US soldier AI to be talking. Prairie Fire allows you to turn off ALL ambient talking. But I want to turn off only the USA talking. This script will do just that by removing the USA ambient sound file names from the vn_sam_masteraudioarray array. Put this call in your init.sqf. [] call override_vn_sam_masteraudioarray; Create a script called override_vn_sam_masteraudioarray.sqf in your mission directory, and put this code in it:
  14. Ok, here's an example: if an AI enemy kills my AI squad unit (friend), it will not end the mission. But if I purposely kill my friend AI unit (Friendly Fire), that will end the mission. I wanted to know if you could do things like that in scripting. I'm so sorry if I'm too bad to point things out. My mother tongue is not English. Please bear with me.
  15. Ok, first, my AI unit already has a waypoint when he joins my squad, but remember that waypoint wasn't working because he's on my squad, and that waypoint was supposed to be later. So what I wanted to do was say there's a specific time in my mission where he needs to leave my group and go to the waypoint where I put it, but the problem is he's not moving at all. Even though I synced the trigger to that waypoint, it was set to skip that waypoint. And it was already put in the condition to only activate it at the specific time when he needed to leave. In simple terms, I want the waypoints to work after he leaves my group. Is this possible?
  16. Hello, how can I make an AI die when the trigger is activated? Example: I want my AI to die in a specific situation in case they are still alive.😊
  17. I'm trying to assing leader to created team (ive used custom units from addon), spent another 5h to make it work and still i dont know how to do it. If someone has working script for this it will be awesome. If u wwant to see previous .sqf files just let me know. Maybe u will have better ideas.
  18. Hi, i was wondering if anyone could help with making a random teleport script ill go over what I've been attempting to do so far. I made a teleport.sqf file within the mission folder and added this to the file. private _markersArray = ["marker_1", "marker_2", "marker_3"]; private _randomMarker = selectRandom _markersArray; private _pos = getMarkerPos _randomMarker; _caller setPosASL _pos; I then put this script in the init section of the object I'm using to teleport me. this addAction ["Teleport","teleport.sqf",["marker_1","marker_2","marker_3"]]; I know its probably very obvious what I'm doing wrong but when it comes to scripting I am more than clueless id appreciate if anyone could explain to me what's wrong and where to put the corrected scripts
  19. INCONTINENTIA'S UNDERCOVER / CIVILIAN RECRUITMENT This is a complex and performance friendly undercover simulation for players and their AI subordinates. Work as a guerrilla cell, go undercover, recruit comrades, and cause mayhem. SP / Coop and Dedi compatible. (For those of you who've used my previous undercover scripts, this release is a significant upgrade and represents a few hundred hours' work and testing over the last version, so hopefully you'll see the improvement!) Requires: CBA FEATURES General Virtually every factor that can affect your cover (within engine limitations and the caveats mentioned below) has been accounted for. Optimised to the max; should not noticably affect performance at all - no noticeable performance impact even during a stress test of 45+ undercover units simultaneously undercoverising several enemy patrols. Operates primarily on each client - server / client interaction is therefore kept to a minimum even when multiple players are undercover at the same time Compatible with RHS, ACE, ALiVE, Zeus, ASR, bCombat, TPWCAS, VCOM... pretty much everything its been tested on (some factions' helmets and bandannas may not be recognised but the overall effect of this will be minimal - if you desperately want all features, use vanilla or RHS versions of these assets) Comprehensive undercover / incognito simulation - Works on players and their AI group members Quick, easy setup: most aspects of the script are automatically implemented based on the settings you choose Can run in the background even when the mission isn't focused around undercover operations - automatically reduces checking overhead when unit isn't undercover so it should be practically unnoticeable No need to turn the script on or off - it just works No checkboxes, compromised notifications or any other "gamey" stuff; just an optional hint when you're obviously hostile and when you aren't - the rest is up to you Responds to whether the units are in vehicles or on foot, dressed as enemies or civilians, whether the unit's face fits or doesn't fit in with the faction they are pretending to be, or whether it is day or night, with each situation requiring players to behave appropriately Suspicious enemies may challenge or watch and follow undercover units if they act weirdly; the more weird stuff you do, the more likely they are to see through your disguise (you can even use this to your advantage to draw enemies attention away from another unit while they do something suspicious - just don't get too cocky or they will open fire on you) Players must "act" their role; doing weird stuff will raise suspicion and could blow your cover - if you point your weapon at an enemy and they see you doing it, they will get suspicious very quickly. Equally, if an enemy sees you crawling around or planting explosives, you're not going to stay undercover for long. Enemies will detect if undercover units are the nationality of the group they are impersonating; covering your face with a scarf or bandanna will reduce this but not as much as choosing undercover units whose faces fit in with the people they are trying to impersonate All actions have consequences, good or bad. If the MRAP you're driving gets a bit close to a patrol, moving into the back of it and out of sight of the enemy might just save your skin. Equally, putting a balaclava on when you're a civilian will attract a lot of attention - which is especially not good if you're already carrying a military rucksack. Once undercover units become compromised, enemies will remember the vehicles they are spotted in and clothes they are wearing - change your clothing (both uniform and either headgear or goggles) and if no enemies see you doing it, your new disguise may stick Easily switch disguises: take enemy uniforms from nearby crates, vehicles, dead bodies and the ground (and order AI subordinates to do the same) Quickly conceal and un-conceal your (and your subordinates') weapons if you have the inventory space - without faffing with inventories Different configurable detection systems for regular and asymetric enemy forces Stealth kills work - If nobody sees you firing a shot, your cover will remain intact BUT, enemies do remember suspicious units - if you kill someone and other enemies of that side already know who you are and that you are nearby, there is a chance your cover will be blown regardless However, your cover will return if you kill everyone who knows about you before they can spread the word Different behaviour for regular and asymmetric forces Define a side as asymmetric and they will not be able to share your identity outside of the local area, but they will be better at spotting imposters Define a side as regular and your cover will stay blown for much longer and for a much wider area once compromised... but they may not have such a good nose for imposters (Optional) Civilian Recruitment Undercover units can recruit civilians to join their group The more enemies you kill, and the more chaos you are associated with, the better your reputation will become The better your reputation, the more likely civilians are to join you Kill enemies without getting spotted and there is a chance they will lash out against civilians, with a potential to cause a civilian uprising (optional) Automatically arm ambient civilians with weapons and items which they may use if recruited or during an uprising Try to steal civilians' clothes from them (but be prepared that your reputation will take a hit or you may become compromised) (Requires ALiVE) Turn recruited units into a profiled group to be used by AI commander of the same faction as the undercover unit (add to object init: this addaction ["Profile group","[player,'profileGroup'] remoteExecCall ['INCON_ucr_fnc_ucrMain',2]",[],1,false,true]); USAGE Add all files from Incon-Undercover folder into your mission folder. If you already have a description.ext or initPlayerLocal.sqf then add the code to your existing files. (Make sure to delete any previous version of my undercover scripts). In description.ext, if the class is already defined (for instance, cfgFunctions), just add the #include line to the given class. Configure your settings in the UCR_setup.sqf file in the INC_undercover folder (pay close attention to these, one wrong setting can lead to some weird behaviour). For each out of bounds area, place a marker over the area with "INC_tre" somewhere in the marker name (e.g. "MyMarkerINC_tre" or "INC_tre_sillyMarkerName_15"). The script will handle the rest. But if you want, you can also include other markers by listing them in the relevant array in UCR_setup.sqf. Add in Incon Persistence if you want your band of merry men to persist between ALiVE sessions (this is now a separate script but automatically persists reputation). For each playable undercover unit, put this in their unit init in the editor: this setVariable ["isSneaky",true,true]; Non-player units in the undercover unit's group do not need anything; the script will run on them automatically on mission start. Caveats / Compatibility: Only one side can have undercover units at a time (so no east undercover and west undercover units undercoverising each other at the same time) Only one side can be defined as asymmetric at a time and only one side can be defined as regular - and both must be hostile to the undercover unit's side. So if having a three-way war, one side must be asym and the other regular. If having a three-way (...war), it is recommended to not have any incognito factions as an engine limitation means that incognito units (i.e. those disguised as the enemy) will be seen as friendly to all - could break the immersion if you're dressed as OPFOR and GreenFOR don't shoot at you when they should. For mission makers - just be aware that the following could affect your mission: enemy units may wander from their original positions to follow undercover units if they become suspicious. Also, when compromised by regular forces, an undercover unit's description will be shared across other enemies in the local area after some time if they don't kill everyone who knows about them Works on all tested mods. If you find an incompatibility, tell me! Credits Massive thanks to Spyderblack723 for his help creating some of the functions and correcting my mistakes / oversights on the original release. Also for generally being super helpful over the past year as I've got into modding. Grumpy Old Man, Tajin and sarogahtyp are responsible for creating a performant detection script, which I then adapted and used as a basis for the undercover script, so thank you to those guys too. Also thanks to das attorney, davidoss, Bad Benson, Tankbuster, dedmen, fn_Quiksilver, marceldev89, baermitumlaut and Duda123 for some top optimisation tips. And huge thanks to accuracythruvolume for testing and feedback. Download version 1.21 release candidate here CHANGELOG
  20. Hey people. So, i've been editing a Liberation mission for me and a couple of friends. However, the modlist we use is a little bit extense, and some mods include gear / equipment from other countries. Furthermore, these mods are necessary for the liberation mission, as the enemy force will be spawned from units from these mods. As i want to make something very standardized, i don't want people using gear from my country and then having somebody using a freaking russian helmet or whatever. To solve that problem i thought of hiding the arsenal option in the Main base and FOBs (By adding "//" to the arsenal script in the liberations source folder) and instead of having a full arsenal, having a tent with various cabinets and, by these cabinets, there are triggers that, once a player enters it's area, a loadout is assigned to that player. This is how it works: You enter the trigger Area, the trigger removes all of your gear, equipment and items and assign you new clothes, weapons, gear and items to replace the ones you've had on spawn. I've tested it, and works great. However, on Multiplayer sessions, it seems it stops working for some reason. i've read something about the player variable not working in multiplayer, because player in MP means everyone connected to the server, and not just the player that stepped on the trigger. Basically i want this script to be applied only to the one player that steps on that especific trigger, and not the whole player base. This is how the structure of my script is right now (still broken on MP): {removeVest _x} forEach thisList; {removeBackpack _x} forEach thisList; {removeHeadgear _x} forEach thisList; {removeUniform _x} forEach thisList; {removeAllWeapons _x} forEach thisList; {removeAllBinocularItems _x} forEach thisList; {removeGoggles _x} forEach thisList; {_x unassignItem "NVGoggles"} forEach thisList; {_x removeItem "NVGoggles"} forEach thisList; Player addWeapon "bel_fn_cal"; Player addWeapon "Binocular"; Player addPrimaryWeaponItem "20rd_556x45"; Player addWeapon "BAD_M1911"; Player addHandgunItem "9Rnd_45ACP_Mag"; Player forceAddUniform "BFMexercito_uniform1"; Player addVest "MEA_vest_EB_06"; Player addBackpack "br_alicepack_med"; Player addItemToUniform "ACE_EarPlugs"; Player addItemToUniform "ACE_IR_Strobe_Item"; for "_i" from 1 to 5 do {Player addItemToUniform "ACE_CableTie";}; for "_i" from 1 to 2 do {Player addItemToUniform "ACE_Canteen";}; for "_i" from 1 to 2 do {Player addItemToUniform "ACE_MRE_MeatballsPasta";}; for "_i" from 1 to 2 do {Player addItemToUniform "ACE_WaterBottle";}; Player addItemToUniform "ACE_MapTools"; Player addItemToUniform "ACE_microDAGR"; Player addItemToUniform "ACE_Flashlight_XL50"; Player addItemToUniform "ACE_wirecutter"; Player addItemToUniform "ACE_EntrenchingTool"; Player addItemToUniform "ACRE_PRC343"; for "_i" from 1 to 6 do {Player addItemToUniform "9Rnd_45ACP_Mag";}; for "_i" from 1 to 6 do {Player addItemToVest "20rd_556x45";}; Player addItemToBackpack "NVGoggles_INDEP"; Player addItemToBackpack "Medikit"; for "_i" from 1 to 5 do {Player addItemToBackpack "FirstAidKit";}; for "_i" from 1 to 2 do {Player addItemToBackpack "20rd_556x45";}; for "_i" from 1 to 4 do {Player addItemToBackpack "HandGrenade";}; for "_i" from 1 to 4 do {Player addItemToBackpack "SmokeShell";}; Player addHeadgear "EB_helmet_ballistic_C"; Player addGoggles "G_Tactical_Clear"; Player linkItem "ItemMap"; Player linkItem "ItemCompass"; Player linkItem "ItemWatch"; Player linkItem "ItemRadio"; If anyone knows wich variable i can replace for the player, that'd be a great life-saver. Thanks in advance!
  21. This script is a bit of a doozie and I generally wanted it to be handled within all one SQF... Or at least thats what I thought I could do. But my issue is with every attempt at (albeit randomly) changing scopes/globals I always get 'error undefined variable in _' and to be quite I have no idea what I am doing outside of looking at several examples of several things, then attempting to combine them. So I have a scenario involving 4 groups, in a traitor-survival permadeath like scenario. Campers, killers, hunters, and guards. I wanted to an add action script on a Bell to ring that, in this order: Institutes a 30 second COOLDOWN for the addaction. Initiates a titleText BLACK FADED screen when activated, that pauses then shows text like "12 hours later" Hidden by that screen I wish to teleport players to certain markers And skips time 12 hours, more pause BLACK IN titleCut when then the teleportation has happened and they see a different time of day upon lifting Script/Addaction resets/loops Technicalities: Script must be repeatable for my purpose I want a UNIT VARIABLE NAME array, 1 for each pre mentioned group that is NOT SIDE dependent. All units are on Indfor. And a TELEPORTATION MARKER array, and code inserted to the teleportation bits so that once activated, for example, all campers will randomlytravel to one of the several CAMPER markers. This allows for rounds to not be the exact thing. CODE MUST NOT BE SIDE DEPENDENT. Ive clearly tried to make 3 arrays, one for each 'type', the reason why all units are Indfor is for smooth 'roleplay' purposes What Works: I believe the time passage works. The black screen fade in/out/text works. The teleportation does NOT WORK. I am screwing up with scopes/globals in accessing the array's Ive set up... Genuinely would like some help but have no idea how to proceed forward and I thank anyone in advance bellInteraction.sqf // Define the unit and marker arrays outside the function to avoid redefining them every time the script runs. campers = ["cpr1", "cpr2", "cpr3", "cpr4", "cpr5", "cpr6", "cpr7", "cpr8", "cpr9"]; campMarkers = ["campMarker1", "campMarker2", "campMarker3"]; scouts = ["sct1", "sct2", "sct3"]; scoutsMarkers = ["scoutMarker1", "scoutMarker2", "scoutMarker3"]; hunters = ["htr1", "htr2", "htr3"]; huntersMarkers = ["hunterMarker1", "hunterMarker2", "hunterMarker3"]; guards = ["grd1", "grd2", "grd3"]; guardsMarkers = ["guardMarker1", "guardMarker2", "guardMarker3"]; // Teleport function _teleportPlayers = { params ["_unitArray", "_markerArray"]; { private _unit = missionNamespace getVariable _x; if (!isNull _unit) then { private _randomMarker = selectRandom _markerArray; _unit setPos (getMarkerPos _randomMarker); }; } forEach _unitArray; }; // The main script that will be executed when the bell is rung _bellScript = { params ["_target", "_caller", "_id"]; // Check for cooldown if (!isNil {bellCooldown}) exitWith { _caller sideChat "The bell is on cooldown. Please wait."; }; // Set cooldown bellCooldown = true; _target removeAction _id; // Screen fade out to black titleText ["", "BLACK FADED", 1]; sleep 5; titleText ["<t color='#ffffff' size='5'>12 hours later...</t>", "BLACK FADED", -1, true, true]; sleep 2; // Skip 12 hours skipTime 12; // Teleport each group [campers, campMarkers] call _teleportPlayers; [scouts, scoutsMarkers] call _teleportPlayers; [hunters, huntersMarkers] call _teleportPlayers; [guards, guardsMarkers] call _teleportPlayers; // Screen fade in from black titleCut ["", "BLACK IN", 5]; // Reset cooldown after 10 minutes (600 seconds) sleep 600; bellCooldown = nil; // Re-add the action to the bell _target addAction ["Ring Bell", _bellScript]; }; // Execute the script with the provided parameters params ["_bell"]; _bell addAction ["Ring Bell", _bellScript]; The Bell Init Code: bell addAction ["Ring Bell", "mscripts\bellInteraction.sqf"];
  22. i made a scenario where enemy wave should a ttack base , but i want the enemy with its mortar artelleries to stop for 5 mins and then attack , how could i do that ??<
  23. Hello everyone, This code below used to work back in the days (I'm about two years without login in, so perhaps some things have changed?): waitUntil {!isNull player && alive player && {vehicle player != player}}; while {alive player} do { waitUntil {vehicle player != player}; vehicle player addEventHandler ["IncomingMissile", { params ["_target", "_ammo", "_vehicle"]; [_target, "smokeLauncher"] call BIS_fnc_fire; private _newTarget = createVehicle [["laserTargetW","laserTargetE"] select (side _target getFriend WEST < 0.6),getpos _target vectorAdd [0,0,5],[],0,"can_collide"]; private _missile = (getpos _vehicle nearestObject _ammo); [_target, [0,0,0]] remoteExec ["setVehicleTIPars",0]; _missile setMissileTarget _newTarget; [_missile,_target,_newTarget] spawn { params ["_missile","_target","_newTarget"]; while {!isNull _missile && alive _target} do { if (_missile distance _target < 150) then {deleteVehicle _missile}; }; deleteVehicle _newTarget; }; [_target, "CMFlareLauncher"] remoteExec ["BIS_fnc_fire", 0]; _missile setMissileTarget _newTarget; }]; waitUntil {vehicle player == player}; vehicle player removeEventHandler ["IncomingMissile", 0]; }; When I used it single player it still works though. But when in MP server with my friends, the server crashes when he hosts, when I'm hosting, it doesn't work but it also doesn't crash. In single player mode, it works just fine. How can I make it so it would work in MP? Thanks in advnace.
  24. Hi Folks. My goal is set in my mp training scenario a kind of randomized CQB "killhouse" generator, and I was lucky to find between my old files a scenario folder that have it. It works perfectly in SP but in MP have a problem, and is when my buddys join in scenario walls and targets are not synchronized between the server and the players. I must clarify that I don't know anything about scripting. I understand that the function of the script is to hide the walls and targets randomly to give a dynamic impression to the killhouse. It works with ACE mod menu. Below I leave the details: In a transfer switch init (Land_TransferSwitch_01_F) named "training_tools": _killhousecategory = ["KILLHOUSE", "KILLHOUSE", "", {}, {true}] call ace_interact_menu_fnc_createAction; _targetcategory = ["TARGETS", "TARGETS", "", {}, {true}] call ace_interact_menu_fnc_createAction; _rankillhouse = ["KILLHOUSE_RAN", "RANDOMIZE", "", { private["_w", "_walls"]; _walls = []; _w = 0; for "_count" from 0 to 45 do { _w = _w + 1; _walls set [_count, format["w%1", _w]]; if (_w == 45) then { _w = 0; { targetObj = missionNamespace getVariable [_x, objNull]; targetObj hideObject false; targetObj setDamage 0; } forEach _walls; for "_count2" from 0 to 45 do { ranval = selectRandom _walls; target = missionNamespace getVariable [ranval, objNull]; target hideObject true; }; }; }; }, {true}] call ace_interact_menu_fnc_createAction; _rantargets = ["OPFOR", "[TAR] OPFOR", "", { private["_t", "_targets"]; _targets = []; _t = 0; for "_count" from 0 to 51 do { _t = _t + 1; _targets set [_count, format["t%1", _t]]; if (_t == 51) then { _t = 0; { targetObj = missionNamespace getVariable [_x, objNull]; targetObj hideObject false; targetObj setDamage 0.8; } forEach _targets; for "_count2" from 0 to 51 do { ranval = selectRandom _targets; target = missionNamespace getVariable [ranval, objNull]; target hideObject true; }; }; }; }, {true}] call ace_interact_menu_fnc_createAction; _ranciv = ["CIV", "[TAR] CIV", "", { private["_civ", "_civilians"]; _civilians = []; _civ = 0; for "_count" from 0 to 33 do { _civ = _civ + 1; _civilians set [_count, format["civ%1", _civ]]; if (_civ == 33) then { _civ = 0; { targetObj = missionNamespace getVariable [_x, objNull]; targetObj hideObject false; targetObj setDamage 0.99; } forEach _civilians; for "_count2" from 0 to 43 do { ranval = selectRandom _civilians; target = missionNamespace getVariable [ranval, objNull]; target hideObject true; }; }; }; }, {true}] call ace_interact_menu_fnc_createAction; _cleartargets = ["CLEAR", "[TAR] CLEAR", "", { private["_num", "_targets", "_civilians"]; _targets = []; _civilians = []; _num = 0; for "_count" from 0 to 51 do { _num = _num + 1; _targets set [_count, format["t%1", _num]]; _civilians set [_count, format["civ%1", _num]]; }; { targetObj = missionNamespace getVariable [_x, objNull]; targetObj hideObject true; } forEach _targets; { targetObj = missionNamespace getVariable [_x, objNull]; targetObj hideObject true; } forEach _civilians; }, {true}] call ace_interact_menu_fnc_createAction; [training_tools, 0, ["ACE_MainActions"], _targetcategory] call ace_interact_menu_fnc_addActionToObject; [training_tools, 0, ["ACE_MainActions"], _killhousecategory] call ace_interact_menu_fnc_addActionToObject; [training_tools, 0, ["ACE_MainActions", "KILLHOUSE"], _rankillhouse] call ace_interact_menu_fnc_addActionToObject; [training_tools, 0, ["ACE_MainActions", "TARGETS"], _cleartargets] call ace_interact_menu_fnc_addActionToObject; [training_tools, 0, ["ACE_MainActions", "TARGETS"], _rantargets] call ace_interact_menu_fnc_addActionToObject; [training_tools, 0, ["ACE_MainActions", "TARGETS"], _ranciv] call ace_interact_menu_fnc_addActionToObject; There are a total of 45 internal walls named consecutively (w1, w2,......w45). There are a total of 51 opfor targets named consecutively (t1, t2,......t51). There are a total of 33 civilian targets named consecutively (civ1, civ2,......civ33) Sorry, my english sucks. Greetings and thanks
  25. House Prefabs ---------------------------------- https://github.com/Shaanig03/Arma-3-House-Prefabs https://prnt.sc/V9UEZJUcoD_T - allows you to creates prefabs for houses and other object classes, then spawn & despawn the prefab or objects & custom loot when the player is nearby/or is away from the house, created for a survival mission that I'm longing to make before heading to Arma 4 - by default there are 115 prefabs(existing furnitures and loots) created for all houses (that is present in Altis, Stratis & Malden) Features: - create custom prefabs and define custom loot positions through 3DEN Editor for a house class or for any object class - spawned/despawning objects are created locally for the player who is near the house saving performance for the server, however loots (ground items) are global but is despawned when there is no player near the house - objects are static by default (for performance) Support (included): - survival pack mod Creating a prefab: - place your prefab house through 3DEN Editor and tag the house as a house prefab by putting the code in the house object's init: _tags = "#houseprefab_local"; ["YourPrefabName"] - you can replace 'YourPrefabName' with any name but note that these names have to be unique for the same prefab house, the same type of house cannot have two same prefab names Creating Objects & Loot Points: - you can place your furnitures or objects, and you can place loot spawning points by placing the code in any helper category object: ["mem_loot", ["Your_Loot_Table_Name"]] - to make your created prefabs appear in game map houses, execute the function in 3DEN Editor by pressing Ctrl+D or going from the top menu to "Tools" then "Debug Console...", paste the below code in debug console and execute it [] call houseprefabs_fnc_createPrefabs; - once executed, it should disable all the prefab houses and objects within the house bounding box, preventing them from spawning in game, since we want to only spawn those objects inside existing map houses - after execution, you have copied the data into your clipboard now to paste the data (script version): - open "SandboxLib\Fncs\fn_defined_housePrefabs.sqf", press ctrl+A and delete all the content and paste your new clipboard and save (mod version): create a .sqf file in your mission folder eg: "houseprefabs.sqf" and paste the clipboard to the .sqf file and execute "houseprefabs.sqf" from your "init.sqf" in the mission folder, like below: init.sqf (file): execVM "houseprefabs.sqf"; - and that's it ^_^ , and wait nope I haven't talked about defining custom loots Defining Custom Loots: - the already existing prefabs have defined loot tables, you can define new loot tables or modify/replace the existing ones - list of existing loot table variable names: c_loot_house c_loot_house_broken c_loot_house_food c_holder_airport c_holder_garage c_loot_house_slum c_holder_shed c_loot_office c_loot_shop c_loot_construction c_loot_industrial c_loot_research c_loot_military c_loot_military_abandoned c_loot_military_tower c_loot_military_office c_loot_medical - example loot table: your_loot_table_name = [ // loot table contains item arrays, these item arrays contains candidate arrays, for an item array a random candidate is selected from the candidates to add an item [ // item 1 (array) [ // candidate 1 has (item/weapon/loot_table) class names(array of strings), item count(array of numbers), item spawn chance(number 0-1), item magazine count (array of numbers) ["ItemMap","ItemGPS","c_custom_loot_table"], // item/loot_table class names [ [1], // item count (with spawn chance) 0.5, // spawn chance from 0 to 1, 1 = 100% spawn chance [[0]] // magazine count if item class is a weapon ] ], [ // candidate 2 has (item/weapon/loot_table) class names(array of strings), item count(array of numbers), item spawn chance(number 0-1), item magazine count (array of numbers) ["ItemMap","ItemGPS",""], // item/loot_table class names [ [1], // item count (with spawn chance) 1, // spawn chance from 0 to 1, 1 = 100% spawn chance [[0]] // magazine count if item class is a weapon ] ] ], [ // item 2 (array) [ // candidate 1 has (item/weapon/loot_table) class names(array of strings), item count(array of numbers), item spawn chance(number 0-1), item magazine count (array of numbers) ["ItemRadio","c_custom_loot_table"], // item/loot_table class names [ [1], // item count (with spawn chance) 1, // spawn chance from 0 to 1, 1 = 100% spawn chance [[0]] // magazine count if item class is a weapon ] ] ] ]; - you can replace the existing loot tables with your own loot classes, replace the loot table name eg to replace: "c_loot_house", you write in: c_loot_house = <loot_table_format> (script version) - to modify existing loot tables take a look at "SandboxLib\Fncs\fn_defined_loots.sqf" (script/mod version) - to create new/modify existing loot tables create a .sqf file and define your loot tables in the .sqf file and execute the file using "execVM" command - to load/add a loot table to a container: [this, missionNamespace getVariable "your_loot_table_name"] call loot_fnc_addLoot; or: [this, your_loot_table_name] call loot_fnc_addLoot; - to quickly copy your own classes I included a little script: [] spawn { if (!isNil "gearCopyMode") exitWith {}; hint parseText "gear copy - enabled<br/>------------------------------------<br/><br/>choose an item type to copy then open arsenal and press Numpad 5 to copy your wearing item"; gearClasses = []; gearType = "uniform"; gearCopyMode = true; waitUntil { !isNull (findDisplay 46) }; player addAction ["Open Arsenal",{ ["Open", true] spawn BIS_fnc_Arsenal; }]; systemChat "gear copy mode: enabled, use Numpad 5 to copy class"; systemChat format ["copy gear classes type is now %1", gearType]; player addAction ["Gear Copy",{ copyToClipboard str(gearClasses); systemChat format ["%1 classes copied", count gearClasses]; }]; player addAction ["Gear: Headgear",{ gearType = "headgear"; systemChat "copy gear classes type is now headgear"; }]; player addAction ["Gear: Uniform",{ gearType = "uniform"; systemChat "copy gear classes type is now uniform"; }]; player addAction ["Gear: Primary Weapon",{ gearType = "primaryWeapon"; systemChat "copy gear classes type is now primary weapon"; }]; player addAction ["Gear: Secondary Weapon",{ gearType = "secondaryWeapon"; systemChat "copy gear classes type is now secondary weapon"; }]; player addAction ["Gear: Handugn",{ gearType = "handgun"; systemChat "copy gear classes type is now handgun"; }]; player addAction ["Gear: Vest",{ gearType = "vest"; systemChat "copy gear classes type is now vest"; }]; player addAction ["Gear: Backpack",{ gearType = "backpack"; systemChat "copy gear classes type is now backpack"; }]; player addAction ["Gear: Goggles",{ gearType = "goggles"; systemChat "copy gear classes type is now goggles"; }]; player addAction ["Gear: Clear All Copied Classes",{ gearClasses = []; systemChat "copy gear classes - cleared"; }]; systemChat "gear copy enabled"; _arsenalDisplay = nil; _displayList = allDisplays; while {alive player} do { _currentDisplays = allDisplays; { if (!(_x in _displayList)) then { _displayList pushBack _x; _arsenalDisplay = _x; _arsenalDisplay displayAddEventHandler ["KeyDown", { _display =_this select 0; _key =_this select 1; // numpad 5 if (_key == 76) then { // get gear type _gearType = gearType; // get gear class _class = ""; if (_gearType == "uniform") then { _class = uniform player; }; if (_gearType == "primaryWeapon") then { _class = primaryWeapon player; }; if (_gearType == "secondaryWeapon") then { _class = secondaryWeapon player; }; if (_gearType == "vest") then { _class = vest player; }; if (_gearType == "backpack") then { _class = backpack player; }; if (_gearType == "goggles") then { _class = goggles player; }; if (_gearType == "headgear") then { _class = headgear player; }; if (_gearType == "handgun") then { _class = handgunWeapon player; }; if (_class != "" && !(_class in gearClasses)) then { gearClasses pushBack _class; systemChat format ["'%1' class added to copy list, copied class count: %2", _class, count gearClasses]; }; }; }]; }; } forEach _currentDisplays; sleep 1; }; }; - the above script allows you to quickly copy equipment and weapon classes in the Arsenal by pressing Numpad 5 P.S: enjoy ^_^
×