Garry's Mod

Garry's Mod

281 个评价
Lock-in Target
   
奖励
收藏
已收藏
取消收藏
素材类型: 插件
插件类型: 工具
插件标签: 快乐, 风景
文件大小
发表于
更新日期
15.773 KB
2024 年 11 月 15 日 上午 9:42
2024 年 11 月 20 日 下午 2:42
15 项改动说明 ( 查看 )

订阅以下载
Lock-in Target

描述
an auto-aim script that automatically locks in to npcs.
intended similiar to the likes of old games that had fixed camera angles

which is why this addon is best used with PS1 Camera style
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2792388721&searchtext=PS1+Camera

using it in firstperson is fine though

was kind of looking for this type of addon, but i find none in workshop.
also, this was made with the help of ChatGPT.
i'm no expert in lua, so all i probably did is some minor readjustments, and giving chatgpt directions on how the addon supposed to function, which surprisingly functional ingame. (it can be a bit rough around the edges of course)

-------------------------------------------------------------------------------------------------------------------------

there are 3 important commands that you need to bind manually:

+autoaim
autoaim_switch_right
autoaim_switch_left

for example:
"bind v +autoaim"

while holding aiming, you can also switch to other targets while holding autoaim key.
you can also switch to right or left using:

bind mwheelup autoaim_switch_right
bind mwheeldown autoaim_switch_left


autoaim_switch command are now optional, it switches between left and right directions each time it's used.

-------------------------------------------------------------------------------------------------------------------------

You can also toggle autoaim by binding this command:

autoaim_toggle

-------------------------------------------------------------------------------------------------------------------------

on a sidenote, npcs also highlights when you're locked into them.
you could turn this off by using this command:

autoaim_highlight_toggle

-------------------------------------------------------------------------------------------------------------------------

you can also change highlight colors too using this command:

autoaim_highlight_color R G B

-------------------------------------------------------------------------------------------------------------------------

smoothness level are also adjustable:

autoaim_smoothness 0.1 (by default)

(lower = smoother, higher = faster)

-------------------------------------------------------------------------------------------------------------------------

Use this toggle whether you can aiming at friendly npcs or not:

autoaim_friendly_toggle

-------------------------------------------------------------------------------------------------------------------------

There is now also a blacklist feature in which you can aim at an npc, and add them to blacklist if you consider them as friendly

autoaim_blacklist

(to disable this on specific npcs, just toggle autoaim_friendly_toggle and press it at the aimed npc again)

best to bind 2 keys to these 2 commands so it can be easier to adjust it. for example:

bind i autoaim_blacklist
bind o autoaim_friendly_toggle

--------------------------------------------------------------------------------------------------------------------------

The auto-aim only works for NPCS btw.

Feel free to adjust and tweak this addon to be better
73 条留言
SergeantMark 7 月 21 日 上午 9:52 
ambatukam?
bad_head 6 月 22 日 上午 1:49 
when i replaced Bind c +Autoaim
bad_head 6 月 22 日 上午 1:46 
how do i use context menu after i used this mode
Appleman 6 月 9 日 上午 6:19 
could you add like an option where when you lock onto a target that theres like that gta:san andreas-ish crosshair (or hitmarker idk)
32HeartAttacks 6 月 3 日 上午 1:29 
how to do i extract the original mod? only thing i found was the gma
Bondrewd 4 月 23 日 下午 4:16 
Nanachi.
BopDop 4 月 9 日 下午 10:14 
Since this mod is most likely not going to be updated, I decided to use chatgpt to make a version that should work with both npcs and nextbots (that includes drgbase)

https://pastebin.com/5b4Gi6a3

extract the original mod, find lockin.lua, make a copy of it, and paste this code into the original lockin.lua

Prob not gonna update this
Male_09 4 月 5 日 下午 5:41 
i fixed it, and it dosent target zombies.
Male_09 4 月 5 日 下午 5:03 
and of course it dosent work
BabyInAnMRI 2 月 21 日 下午 8:03 
Nnachan