Jump to content

5133p39

Member
  • Content Count

    1452
  • Joined

  • Last visited

  • Medals

Community Reputation

16 Good

3 Followers

About 5133p39

  • Rank
    Sergeant Major

Recent Profile Visitors

1817 profile views
  1. 5133p39

    How to lock a vehicle?

    This is the continuation of the process started in my previous post. I had to upload the images on IMGUR, and i don't know if they show up embedded in here - if not, use this link: https://imgur.com/a/MIcAFSh 1. Find this prefab called Wheeled_Base.et and create an override in your project, and add the VehicleLocking Component to it. https://imgur.com/Qp2LKHK 2. Add 2 custom user actions to ActionsManagerComponent on the Wheel_Base override, configure them as they are on this image. https://imgur.com/k57Lzvq 3. To create the Vehicle Key Inventory Item, find this prefab and duplicate into your project. https://imgur.com/TNo1OHK 4. Vehicle Key Inventory Item - Rename it, and add the highlighted VehicleKeyItem Component to it. https://imgur.com/GMwekmx 5. Add the VehicleLockGameComponent to your GameMode. https://imgur.com/Oc2iUKa That should be all, unless i forgot something. Now you can test it. Place some vehicle into the world (preferably the UAZ 469, on which i tested this), and the the "vehicle key" inventory item. You need to manually set the pairing codes on both, and placing them in the world directly ensures that you will be able to access those attributes on the entities. Of course you can use scripting to set the codes, but this will be quicker, just tor test the thing. Make sure you set the code on the vehicle and on the key to the same value (example: ABCDE). Stick to simple ASCII characters, and i recommend sticking to the length of 5 characters. Then hit Play (assuming you have your test "mission" prepared - which i do not cover here at all), pickup the key you placed in the World Editor, put it in some Quick Slot, and mess with the vehicle to see how it works. Then quit, rewrite everything properly into a proper mod that works universally with any vehicle, and drop me a link so i can save some time doing that myself 😉
  2. 5133p39

    How to lock a vehicle?

    IMPORTANT: I wouldn't expect this to work in MP environment as it is, because i don't know anything about that yet, and i had no time to test in MP at all. I only used the code in SP missions so far. It is rough and needs to be tweaked to work with any vehicle - i only tested it with UAZ469. The code can use some improvements, at the very least to make it more universal, supporting different vehicle types, but most importantly it may need properly implemented replication for MP, and maybe more (post your tips and opinions, especially on how to do things cleanly and properly). First, let's summarize how we want it to work: Each door, trunk, hood, etc., should be (un)lockable individually, and if locked, will prevent all related actions (opening door, entering, exiting, jumping out, inventory access, whatever). NOTE: None of the old cars would have central locking, but we should add such option so it can be used with any modern car mods, i just don't want to bother with that right now, maybe later. The system will work for, and restrict, only players. Bots will behave same way as they did before, unaffected by the system. To lock/unlock anything, players need to have a key (an item), which is paired with the vehicle. Except if players are already inside the vehicle - then they won't need a key to lock/unlock any door withing reach. The key-to-vehicle pairing will be based on 5 letter string codes ("ABCDE"), so if need be, we can show the code to player in a nice readable form, but internally we will rely on hashes. We will make am Inventory Item Component attached on the key item prefab, and a vehicle Script Component attached on the vehicle entities (or base prefabs) - each holding the string code, its hash (we'll need that only on the vehicle), and any minimal methods that we may need on one or the other. To use a key, player will need to place it in some Quick Slot - no actions needed, just have it in a slot. When player closes inventory after placing a key in Quick Slot, we will check all slots and use code from the first key we find. We will store the code, that we found on the first key, in a static variable on a Game Component that we will make for this purpose (and to provide some needed methods) - that way we can have quick and easy access to the "cached" code from anywhere. Starting the vehicle's engine will not need a key. As long as a player is inside a vehicle, they can start the engine freely (or at least unrestricted by this system) without a key. The Game Component: YOUR_PROJECT/scripts/GameCode/Mors/Mors_VehicleLockGameComponent.c To be added as a component to a GameMode. The Vehicle Component: YOUR_PROJECT/scripts/GameCode/Mors/Mors_VehicleLockingComponent.c To be added as a component to a vehicle placed in World Editor directly (not in a "Slot.et", so you can access the component and manually can set the vehicle-to-key pairing code), or some vehicle base class (i added it to an override of Wheeled_base.et). The Inventory Item Component: YOUR_PROJECT/scripts/GameCode/Mors/Mors_VehicleKeyItem.c To be added as a component to the vehicle key prefab. For now, just make a duplicate of some bandage item (anything that you know is already configured as inventory item that can be placed in Quick Slot), and then attach this component to that prefab, and use that as the "vehicle key". Also, you need to place this item in the World Editor directly, so you can have access to the component on it and manually set the vehicle code that is to be used for pairing with a vehicle (otherwise you'd need to do that using some script, which is not covered here). The next things you need, are overrides of various User Action classes/methods. That is where you add conditions to check for locked door before allowing to proceed with opening it, etc. To set these scripts up, use filter to find these files, create duplicates (keep same filename) into your project, move the created duplicates into a "modded" subfolder that you create in the location where each duplicate was created, then edit them accordingly: SCR_GetInUserAction.c Found in "ArmaReforger/scripts/Game/UserActions/", create duplicate into "YOUR_PROJECT/scripts/Game/UserActions/modded/". SCR_GetOutUserAction.c Found in "ArmaReforger/scripts/Game/UserActions/", create duplicate into "YOUR_PROJECT/scripts/Game/UserActions/modded/". SCR_JumpOutUserAction.c Found in "ArmaReforger/scripts/Game/UserActions/", create duplicate into "YOUR_PROJECT/scripts/Game/UserActions/modded/". SCR_OpenVehicleDoorUserAction.c Found in "ArmaReforger/scripts/Game/UserActions/", create duplicate into "YOUR_PROJECT/scripts/Game/UserActions/modded/". SCR_OpenVehicleStorageAction.c Found in "ArmaReforger/scripts/Game/UserActions/", create duplicate into "YOUR_PROJECT/scripts/Game/UserActions/modded/". SCR_RefuelAtSupportStationAction.c Found in "ArmaReforger/scripts/Game/UserActions/SupportStations/", create duplicate into "YOUR_PROJECT/scripts/Game/UserActions/SupportStations/modded/". SCR_ResourceContainerVehicleLoadAction.c Found in "ArmaReforger/scripts/Game/Sandbox/Resources/UserActions/", create duplicate into "YOUR_PROJECT/scripts/Game/Sandbox/Resources/UserActions/modded/". SCR_ResourceContainerVehicleUnloadAction.c Found in "ArmaReforger/scripts/Game/Sandbox/Resources/UserActions/", create duplicate into "YOUR_PROJECT/scripts/Game/Sandbox/Resources/UserActions/modded/". Mors_LockUnlockVehicleAction.c You need to CREATE this script. This is a new script for a custom Lock/Unlock user action. Place into "YOUR_PROJECT/scripts/Game/UserActions/". That would be the scripts. Now we need to... smash it all together. And because describing all this would be too much work 🙂 i'll just use screenshots. This post is already WAY to long (god! i hope i won't need to edit it), so i will make a break here, and continue in another post below.
  3. 5133p39

    How to lock a vehicle?

    Never mind. Figured it out with the help of some very patient people on Discord. Will come back here later to describe how to implement it, in case anybody is lost as i was.
  4. I am making a mission on Everon. I open "Weather Editor" dialog and set desired time - it works, the world in view window gets dark. I save the project, but when i load it later, the time is set to 0.510 (i assume default) which equals to 12:14:42. Is this a bug, or am i just doing something wrong? I am using SCR_TimeAndWeatherHandlerComponent to set the time/weather at the mission start, and that works. But i need the editor to respect the time i set in the editor, because while working on the mission i need to see how it will look, where is light, where is dark, how any lights i place affect it, etc.
  5. I need to lock a vehicle to prevent anybody from: - getting in (not just as a driver, but anywhere) - opening any doors - accessing vehicle's inventory - loading/unloading supplies (i need to get rid of this mechanics in general - my mission is not using it, so it makes no sense for these prompts to even be there) What i need is the equivalent of the good old lock command from Arma 3.
  6. 5133p39

    ARMAGO - GOLANG extension

    Just to make sure... this is now outdated, right? I tried to use it, and it makes the game crash - is that because something changed about the way A3 calls the extension functions, or is it something else?
  7. No, i do not have my own discord server, but you can find me on the Casual Arma Players discord, or on the official Arma discord. Look for Sleeper (with a walrus as an avatar).
  8. 5133p39

    ARMA 3 Addon Request Thread

    I am looking for some nice 4+ (the more the merrier) seats civilian plane. Ideally it should be an older type (for example, i'd LOVE to have an An-2), but i'd settle for just about anything, as long as it looks GOOD. I am aware that i can get the An-72 from CUP or maybe make my own conversion of the old Arma 2 model, but... the age shows (the model is horrible to be honest, even if you take aside the age and forget the not-round-at-all windows and such, different geometry parts aren't even lining up, it is awful, almost like some new intern made it, not a professional 3D artist). Even many original Arma 3 models now look mostly like... well, kinda crap (sorry for the harsh words, but that is the reality, it is now an old game and it shows). What i would like is something that has reasonable texture resolution - meaning the hull texture should be 2K at absolute bare minimum (while using the texture space as best as possible, so for example a one wing will take the whole width) for any small planes (think the size of the Caesar BTT), and 4K for anything bigger. And when it comes to cockpit, i want to be able to READ any text (if i zoom in enough) without seeing the ever present awul jagged lines, because most of those textures seem to be like 256x256 at best (i am aexagerating to drive the point home). And for the love of god, when there is some curved/round shape, like a windshield or the hull/nose, it should be smooth - think of a ball instead of a dodecahedron. I do recognize that my "conditions" may be too much for such an old game, so i am prepared to make compromises, but if there is anything that satisfies at least some of those points, then i'd like to know about it. 🙂
  9. Adds interactive 3D icons into cockpit of any vehicle. It is completely scripted, using given model-relative coordinates for icons positions, allowing it to work even with vehicles you cannot mod to add your own selections or memory points. For now, it is not in form of an addon, but just a bunch of scripts that need to be placed in the mission folder. It seems to be working fine, but it hasn't been tested in multiplayer environment yet. I tried to keep the MP in mind, but i haven't done anything for Arma in a long time, so i probably made some mistakes. I wasn't planning to release it yet, but some people in Discord asked for it, so here it is, hope you find it usefull. If you find any bugs, or have any ideas how to improve the scripts, please, post them here. You can download the current WIP in form of a mission here: https://drive.google.com/file/d/13hreNnQzVpvaiyFcDVAbvbuhQ8IzlNws/view?usp=sharing Here is a video showing the latest version. And here is an old one with some "fun" ending.
  10. Just in case somebody else stumbles into the same ...problem. There doesn't seem to be anything wrong with that antiwater plane (especially if you have nothing but the plane, like in the p3d i linked), but it was suggested to select the antiwater plane and use Faces -> Move Top, so i did that. But the real problem seems to be that for reasons unknown to me, the whole model ended up semi-transparent in game, and it seems it borked the antiwater. It took me a long time to notice it, because the transparency effect was very subtle, maybe like 95% opacity, just a tiny bit from being fully opaque. Long story short, the transparency problem can be fixed by adding forcenotalpha (set to 1) to the "Geometry" LOD, and now that i did that, the antiwater suddenly works too. Kudos to Reyhard and Eagledude4 on the Arma discord, who helped me troubleshoot this and eventually suggested this solution.
  11. It shows in game as a black opaque plane. As far as i can tell, it is configured the same way the antiwater in the test boat in official BI Samples for Arma 3. I only set the texture to PAA instead of TGA, but that makes no difference, and even if i copy the antiwater from the sample boat, it shows black as well. What is wrong? The actual antiwater from my p3d: http://www.filedropper.com/antiwater
  12. How do i stop the Cessna TTx from automatically opening/closing its cabin door depending on whether the engine is running or not? 1.) Go into editor, place the Cessna TTx (C_Plane_Civil_01_F), and start the scenario in SP 2.) Begin scratching your head, because the cabin is automatically open. 3.) Lock the plane and begin pulling your hair out, because it doesn't help. 4.) Try messing with various animation sources and start crying, because it leads nowhere. Now, the problem is clearly caused by the plane being configured with "cabinOpening=1". Setting this to 0 stops the cabin door from automatically animating, but then i couldn't find any way to make the door open/close on demand (via user actions, or scripting commands), and i think that is because the model is using some mysterious "cabin" as the animation source, which seems to be something hardcoded (at least i couldn't find its definition in any config). So, any idea what am i doing wrong, and how to fix this nonsensical behavior?
  13. Nope, it makes no difference in regards to the damage textures. I tried that, and the third parameter only prevented any accompanying particle effects, explosions, etc. - ie. using this, you can set the damage to 100% without causing any explosions, fire, smoke, but it won't affect whether the damage textures are applied or not. I also tried all the other commands (setHit, setHitpointDamage, and setHitIndex), but all of them have the same result here - if you set the engine damage to 0.5 or higher, it "activates" the damage textures. I did a lot of experiments like setting engine damage and then trying to set hull damage to zero, hoping it will revert the visual hull damage, mixing these commands, hoping i would find a combination allowing me to get broken engine with no visual damage, but nope.
  14. Well, i ended up adding "Engine" event handler that shuts the engine down if started, but i was hoping for better, more "sensible" solution based on engine hitpoints. And to give the player at least some visual indication of what the hell is going on, i set the engine damage to 0.4 to make the indicator orange (though that is still misleading, because normally you can still drive with orange engine).
  15. Is there a way to destroy vehicle's engine without making the vehicle look damaged? For example: 1.) Place the Offroad vehicle (C_Offroad_01_F) 2.) Add "this setHitPointDamage ["hitengine", 1.0];" into the init field. 3.) Start the mission and see how it is riddled with bullets - THAT IS BAD. I need a vehicle with broken engine which can be later repaired. If you drown the vehicle in water, the engine will get destroyed, but the vehicle will still look intact - i need similar behavior, except i cannot drown the vehicle in water, because afaik it cannot be made functional again, and it takes time until the vehicle gets drowned, which means delaying mission start by approx. 10 seconds, which is not an option. Playing with fuel is also not an option, as the vehicle needs to retain its fuel, and i dont want to add unnecessary scripts for ensuring the fuel gets removed if player tries to refuel it, etc. So, how?
×