Tags: No tags
Automated doors A3byHeeeere's Johnny! Description: For each player on the map, this script creates and removes triggers on nearby buildings which open the door if a player intends to walk through it and closes it again, when he walks away. Why? At some point, I got annoyed of having to walk really close to a door and sometimes even having to scroll, if my default action is something different, to get the right action to finally open it. Maybe there's some people out there feeling similarly. Features: - all doors open and close automatically - usable in Singleplayer (client side) or in Multiplayer (server side only) - support for dynamic locations where this script should only work - new in v2.3: support for side specific locations, where this script only works for players of the respective side - actions for the following features: -> enable/disable automatically closing doors -> enable/disable "Automated Doors" completely -> irreversibly* remove all actions related to "Automated Doors" (including this one) - globally force doors to stay open, no matter what the player's actions say - can be terminated and restarted without trigger- or action-leftovers - moderate server load due to need-based dynamic object management - available as script and as addon Installation / Usage: [] execVM "automatedDoors.sqf" Singleplayer: Using the script: Execute the above line once upon mission start - that's it. Using the addon: Start ArmA 3 with startup parameter -mod=@automatedDoors - that's it. Multiplayer: Execute this script server side once upon mission start. Client side execution is prevented by "isServer" check. After joining a mission running this script, it might take a few seconds until it actually works for you as new player, because the sever runs the "scan loop" regularly, not taking into account JIP or just spawned players. "Automated Doors" has two optional parameters: objects -> (optional, default: ["all"]) defines the buildings to be taken into account by this script - e.g. ["altis", "chernarus"] means, all buildings from Altis and Chernarus will be taken into account on every map doorsStayOpen -> (optional, default: false) global definition of door closing behavior - if true, doors will have to be closed manually, player action "Don't keep doors open" has no effect - if false, doors will close automatically, player action "Keep doors open" has an effect You can easily customize important values, like the size of the area of the door triggers, the time between each scan for surrounding buildings or the area to scan on each loop. Do that by changing the defines at the beginning of the file (after the comment block). Define locations: If you want this script to only work in certain areas, create locations of type "Name" and set their name with the prefix "doors". This script will check on each scan loop if such locations exist. If so, it will only manage these areas. If all "doors" locations are deleted, this script will handle the whole map again. Side specific locations: If you create a location as described above and setVariable ["locationSide", any side here] to it, the doors inside that location automatically open and close only for players of that side. Future plans: - compatibility with ArmA 2 and Tanao objects for community created maps Changelog: v2.5 fixed - fixed error v2.5 - automatedDoors.sqf: changed plain numbers in radius array to defines - outsourced building arrays to separate files and #include them - added doorsTakistan.sqf (door positions on Takistan) - added doorsUtes.sqf (door positions on Utes) - added doorsZargabad.sqf (door positions on Zargabad) - fnc_getModelPos optimized, because nearestObject might not always take the building the player is in - slightly optimized handling of first script parameter ("_objects") - added DOOR_RADIUS_LARGE to all remaining gates on Altis and Stratis v2.4 - renamed #define DOOR_RADIUS to DOOR_RADIUS_SMALL - added #define DOOR_RADIUS_LARGE (6 meters) - using DOOR_RADIUS_LARGE on very wide fences/doors including "Land_BarGate_F" - door radius can be individually set for each building class (default is DOOR_RADIUS_SMALL) Forum topic: - BI forums Enable javascript to be able to download from Armaholic please!
Tags: No tags
|
Awesome... I hate having to scroll to select door open. This will make the game a lot easier to move around in.
if it can run in every MP who has access to run the script and will be laggy at all - it is necessary to forbid you to spread this !!!
![]:->](./images/smilies/diablo.gif)
had it since v1, does well!
2 suggestions, make a way to 'turn it off' and an option to keep the doors open
example:
on and close doors = [on, close] execVM "automatedDoors.sqf";
on and leave doors open = [on, open] execVM "automatedDoors.sqf";
off = [off] execVM "automatedDoors.sqf";
i have thought about doing this myself as at times, when close to multiple doors, they will all open and close. can be a pain. thus the 'turn off' feature.
outside of those 2 items, you have done well!
:)
Whoops! Forgot something!
If you could make it compatible with the older arma mods/doors, that would be perfect!
A lot of custom maps used older arma models which (at least with v1) did not work with.
:)
Oh come on, that username was picked solely for this addon, eh? xD
if not, damn awesome coincidence...
@z80cpu, a "Disable/Enable Automated Doors" action was already implemented in v1.4, "Keep doors open" is in v2.0.
Compatibility with ArmA 2 buildings is planned, but will not come with v2.0 as it takes some time.
@freakyone, I chose the username for the BI Forums long before I even thought about this script, so believe it or not it is in fact a coincidence ^_^
yes HJ, i got the v1.4 and i thank you. not only for the mod itself, but being 'on top of things'. as a programmer myself, i understand the work involved. as a 'customer', i understand the need of prompt response.
you are doing everything right and your mod is excellent! just the older arma stuff left. outside of that, you have done an excellent job with the code AND with 'customer service'. not many meet both.
i thank you for that!
:)
Total comments : 7, displayed on page: 7