Garry's Mod

Garry's Mod

NPCs Hate Each Other Script
147 条留言
SSOS 6 月 23 日 上午 1:47 
I can finally host an NPC hunger games
inflation guy 2024 年 12 月 2 日 下午 7:49 
the combine went mad
DudeBroDad45 2024 年 10 月 12 日 下午 3:15 
the population in gm_construct when there was a slight disagreement:
HeyItsJaydon 2024 年 4 月 10 日 上午 2:42 
i do completely agree that NPCs should target the player first, then themselves (or smthn like that)
ŽīPÝ 2024 年 1 月 12 日 下午 9:08 
Could you make a version of this mod that make any npc start to kill each other?
Oabobaro 2023 年 12 月 27 日 上午 7:57 
The npcs should prioritize the player to attack, even me being on side of a npc, it doesn't attack me and attack the closest npc, if you have a way how to do this, would be a nice addition
tijelagomerssssss 2023 年 12 月 24 日 下午 4:06 
its working now!! thx pal
Miguel Myers 2023 年 12 月 24 日 上午 7:03 
Holy shit, Survivor in Gmod.
Froze  [作者] 2023 年 12 月 23 日 下午 7:13 
still works on my end
are there any lua errors?
what is your console command setup? is hate_each_other_npcs_enable set to 1 ?
Froze  [作者] 2023 年 12 月 23 日 下午 7:06 
thanks for the report, i will do some checks.
tijelagomerssssss 2023 年 12 月 23 日 下午 6:04 
erm, dude, why this script is not working anymore?
Chie 2023 年 12 月 10 日 上午 2:46 
when will there be a mod that makes all npcs hate you?
Critas 2023 年 11 月 3 日 上午 11:03 
racism update
Scope_Cryounit 2023 年 10 月 19 日 上午 4:21 
how did i lose this mod i needed it yesterday
76561198983371061 2023 年 7 月 30 日 上午 7:51 
then no one will give it a chance :))))))))))))))))))))
Froze  [作者] 2023 年 7 月 30 日 上午 4:31 
no
чухонь (кирилл) 2023 年 7 月 30 日 上午 3:40 
does it work with drgbase npcs?
gerbert 2023 年 5 月 27 日 下午 11:47 
i agree
uncommon saucers 2023 年 5 月 20 日 下午 4:10 
add an option to make them hate player
Froze  [作者] 2023 年 5 月 20 日 上午 2:07 
jsut tested and it's working on my end
Froze  [作者] 2023 年 5 月 14 日 下午 6:47 
any errors?
Terry 2023 年 5 月 14 日 上午 8:51 
ye he is right is not working
anuarwow6689 2023 年 4 月 27 日 上午 10:51 
mod not working
Skullbattle78 2023 年 4 月 26 日 下午 3:47 
What Are Your Specs..? Gahh Dayum that's smooth even with the fucking ArcCW Urban Coalition Pack
greenman_0075 2023 年 4 月 19 日 下午 3:31 
nice sorry
greenman_0075 2023 年 4 月 19 日 下午 3:31 
is there a mod like this but can make them trendy to u?
fox mom 2023 年 4 月 17 日 下午 2:31 
i am stealing the gullible dildo word combination
Gavitron 2023 年 4 月 17 日 上午 11:45 
aww you gullible dildo
Jamiroquai 2023 年 4 月 17 日 上午 7:50 
Look For the Lower Case 'L' And You
Will Be Kissed Tomorrow:
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLlLLLLLLLLLLLLLLLLLLLLL LLLLL
*Now Look For The Q And Your Wish
Will Come True:
... ... ... ... ... OOOOOOOOOOOOOOOOOOOQOOOOOOOOOOOOOOOOOOOOOOOOO O.. .OOOOOOOO
*This Is Really Hard, Now Find The 'N':
MMMMMMMMMMMMMMMMMMMMMMMMMNMM
*Now Find The Mistake:
ABCDEFGHIJKLNMOPQRSTUVWQYZ
*Something You Really Want, After the
countdown!!!!!
10 9 8 7 6 5 4 3 2 1 Now Close Your
Eyes And Make A Wish! ;*;*;*;*;*;* Now
Paste This On 9 pages And Your Wish
Will Come True! Hurry, You Have 20
minutes! Or What You Wished For Will
Be The Opposite"
Apocalypse Tank 2023 年 4 月 17 日 上午 6:32 
Just like Doom
Unknown Developer 2023 年 4 月 17 日 上午 3:30 
If you don't want the script to run on the client, you can make it easier by just moving it to `lua/autorun/server`
Unknown Developer 2023 年 4 月 16 日 上午 11:33 
The main performance problem of your code is the meaningless use of pairs instead of iparis in lists, this is a very unproductive solution. Also a lot of meaningless tables which are used very strangely. The script I threw has the same idea but it is implemented in 50 lines. I will not upload the "improved" version or similar, but try to make your script better, it is used by a lot of people now.
Froze  [作者] 2023 年 4 月 16 日 上午 11:11 
i think i improved performance on the chasing now + added your nearest npc chase logic as an option
Froze  [作者] 2023 年 4 月 16 日 上午 10:21 
is it the addentityrelationship not being executed every time an npc spawns?
Froze  [作者] 2023 年 4 月 16 日 上午 10:20 
i see you're doing return end, initializing a concommand into a variable and for the chase script you go for the nearest npc? but yes I'll tidy up the if depth a little. the rebels and combines is there because before this was just a combine v combine (or rebel) script. Where is the performance improvement? is it this? [gist.github.com]

the 2nd link is very useful ty.
Unknown Developer 2023 年 4 月 16 日 上午 9:47 
I hate stupid Steam, it's deleting my links again, remove the spaces around / and .
1. gist . github . com / PrikolMen / a106cccf8908310c663f9dde1684b379
2. gitspartv.github.io / LuaJIT-Benchmarks
Unknown Developer 2023 年 4 月 16 日 上午 9:42 
The whole code is written strangely and incorrectly, I wrote code with identical functionality, you can look and compare with mine. If I write all the mistakes and bad solutions of your code, my post will be overly huge.

The same implementation in terms of functionality, but which works 10 times faster and better: https://gist.github.com/PrikolMen/a106cccf8908310c663f9dde1684b379

Yes, without the console commands, but I do not see the point in them if we want ALL npc participated in the battle, not just the combines and resistance.

I also highly recommend checking this link: https://gitspartv.github.io/LuaJIT-Benchmarks/
TheArtemMaps 2023 年 4 月 16 日 上午 8:45 
well it works, right? so it's good
Froze  [作者] 2023 年 4 月 16 日 上午 7:02 
any pointers/tips?
i'm all about optimizing the code if you tell me what i need to do.
Unknown Developer 2023 年 4 月 16 日 上午 6:39 
very bad code.
ʞritzo 2023 年 4 月 16 日 上午 3:43 
Map from 1st video please.
Looks sick.
TheArtemMaps 2023 年 4 月 15 日 下午 12:14 
free for all (ffa) Script
null_local 2023 年 4 月 15 日 上午 11:45 
now i kinda want to see NPC infighting, like in DOOM
Sleep Deprived 2023 年 4 月 15 日 上午 10:13 
They had one of those days when you don't want to wake up and everybody sucks.
vllad1255 2023 年 4 月 15 日 上午 2:21 
Класс
galunga 2023 年 4 月 15 日 上午 1:13 
Finally, civil war
Momo el virgo 2023 年 4 月 14 日 下午 11:00 
a
supergamerpugs 2023 年 4 月 14 日 下午 10:36 
hate_each_other_npcs_enable 0/1
2023 年 4 月 14 日 下午 10:29 
headcrab battle royale
lol
Pain Paint 2023 年 4 月 14 日 下午 9:34 
time to make a random battle royal :/