Log in to reply

Opening gates

  • Is there a meta that determines how long gates stay open? I want to keep them open longer.

  • @Dogamizer It's been awhile since I've messed with the file but doortuning.meta and the .ymt are the files I know that control auto opening gate behavior. I don't remember seeing a setting for delaying the closing time. You could increase the size of the auto open box so that you are inside that area longer so the door stays open while you are further away. There also may be a flag to delay closing time, I just can't remember seeing one.

  • @Dogamizer Just an update since I recently had to edit the doortuning.meta and .ymt, i did find a flag called DelayDoorClosingForPlayer, although it really doesn't seem to do much and i haven't seen any value in the meta or ymt that allows you to control how long the delay is for. I'm currently testing things out on a new door. I'll update if I find out anything else about this.

  • @chonkie
    Thanks. I found another solution, though. I wrote a small script that locks the door or gate in place at whatever angle you open it to. It will remain open until you then unfreeze it. See the video below.


    This works quite well but I have to do it on a per object basis. I haven't yet worked out how to detect a door or gate within a radius so I have to compile a list of all the doors and gates I find.

  • @Dogamizer Interesting idea, I'll have to check out your mod when it's released. Does it also work on doors and gates that auto open? It would also be good to have a way for people to add custom doors and gates, because I almost always have to make custom ones for the areas I have mlo projects going on.

  • @chonkie

    It should work on any object within the set range. I set the object hash and range and then use native FREEZE_ENTITY_POSITION to lock it in place when I push the button. So theoretically it should work on anything, like for example, If you push a bin over, you could lock the fallen bin in place as long as the script knows the bin's hash.

    I'm not a coder, though. I'm learning this stuff as I go along. So my code (VB.NET) is messy and could probably be accomplished in a much easier and cleaner way. I might not release it but I would be quite happy to share the source with you when I've tested it on a few more objects.

  • @Dogamizer I'm not a coder/scripter either, i wouldn't know what to do with the source code. Would have to learn what to do as well, don't know if I have the time or patience for that. I think it would be a great mod to release if you found help on how to clean it up. There are many scripters on the site or in discord.

    I just know for sure I would use it almost everywhere I have a mlo, like with my garage one that is released, i can't drive a truck with a trailer inside without issue since the door auto closes too soon and i don't want the auto open box to be big because then it constantly opens and closes while just walking around inside.

  • I'd be happy to help you improve the code. You could post the code in this thread (or a new thread) so anybody could help you out, or if you wanted you could contact me directly.

Log in to reply

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.