Teardown
312 个评价
[on-hold] Universal Door Latch Framework
   
奖励
收藏
已收藏
取消收藏
Type: Global
文件大小
发表于
更新日期
220.713 KB
2021 年 3 月 4 日 上午 5:19
2022 年 8 月 24 日 下午 5:51
8 项改动说明 ( 查看 )

订阅以下载
[on-hold] Universal Door Latch Framework

描述
UDLF
Universal Door Latch Framework mod for Teardown
DISCLAIMER:
This does not change doors in maps that have not been set up to use it. That means that no built in maps will have this functionality.
What it does:
This script allows for a generalized approach to latching doors without the need to give joints individual names and write custom scripts to look for those names specifically.
Permissions:
This is meant to be used in maps. If you do set up doors to use this script, just remember to put it in your required list.
How it works:
When the door is near enough to the closed position (limit "0"), it will apply a slight force to keep it closed. When you grab the door, it removes that force, allowing you to open the door. following this, it will remain loose until the door returns to its closed position. That means that if you leave a car door open, you could use your brakes to close it. This is different than other implementations that use interactions (button prompt) that switch the direction of the force. This is due mostly to my own preference, but also due to how the script checks for each door. It could probably be easily changed though if you prefer that method.
For developers:
An example map is available here: https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2414412110 Add "Latch" tag to the VOX of each shape. DO NOT TAG THE JOINT! Otherwise, the script will not work. Add built in sound effects by extending the tag to "Latch=Vehicle" or "Latch=Structure". If you add custom sounds, this will function as a fallback for if a file is not included. Fallback does not currently work if the file does not exist or is not valid. I'm looking into validation. Custom sounds can be added with "LatchOpenSound=../mod_name/path_to_sound.ogg" and "LatchCloseSound=../mod_name/path_to_sound.ogg". Ensure that the path always starts with "../" followed by the name of the FOLDER your mod is in, and then the rest of the path to the sound. For some reason "../MOD/" and "../LEVEL/" don't work. Please ensure that all joints you wish to latch are in the closed position at limit 0, as this is what the script considers the "closed" position. This generally means that the door is closed in the .vox file.
热门讨论 查看全部(2)
3
2024 年 10 月 11 日 下午 11:11
maps that support this mod
Portuguese
6
2022 年 10 月 23 日 上午 3:21
Put your feedback here.
Magnymbus
40 条留言
AznGuyHai 8 月 8 日 上午 8:00 
Is this a mod needed for all vehicles? or only specific ones?
Joseph28 3 月 13 日 下午 8:24 
Bro the doors dont even open when I open car
Magnymbus  [作者] 2024 年 11 月 18 日 下午 4:12 
Anyone can do anything they want with my mediocre code.
no 2024 年 11 月 15 日 下午 1:30 
Any way to stop it from picking the wrong joint-attached shape, like a "NoLatch" tag?
If not, considering this project is on hold, would it be fine if I took the mod and edited it to add that?
Magnymbus  [作者] 2024 年 3 月 22 日 下午 6:22 
Project is on hold
conaylo 2024 年 3 月 22 日 下午 5:42 
how do i make the door open?
Scoob 2023 年 12 月 26 日 上午 10:56 
Can you put locks on the doors? I like putting stuff in but the doors keep swinging open when i drive away.
Marie 2023 年 10 月 21 日 上午 8:43 
IT does not work not even on the standard teardown maps
mlinn 2023 年 8 月 4 日 下午 3:59 
breaks all doors on spawnables
Magnymbus  [作者] 2023 年 7 月 8 日 下午 7:29 
Only ones designed specifically for this script.