Garry's Mod

Garry's Mod

NPCs Hate Each Other Script
147 kommentarer
SSOS 23. juni kl. 1:47 
I can finally host an NPC hunger games
inflation guy 2. dec. 2024 kl. 19:49 
the combine went mad
DudeBroDad45 12. okt. 2024 kl. 15:15 
the population in gm_construct when there was a slight disagreement:
HeyItsJaydon 10. apr. 2024 kl. 2:42 
i do completely agree that NPCs should target the player first, then themselves (or smthn like that)
ŽīPÝ Dragon ASS 12. jan. 2024 kl. 21:08 
Could you make a version of this mod that make any npc start to kill each other?
Oabobaro 27. dec. 2023 kl. 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
tijelagomerss 24. dec. 2023 kl. 16:06 
its working now!! thx pal
Miguel Myers 24. dec. 2023 kl. 7:03 
Holy shit, Survivor in Gmod.
Froze  [ophavsmand] 23. dec. 2023 kl. 19: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  [ophavsmand] 23. dec. 2023 kl. 19:06 
thanks for the report, i will do some checks.
tijelagomerss 23. dec. 2023 kl. 18:04 
erm, dude, why this script is not working anymore?
MeryMeryl 10. dec. 2023 kl. 2:46 
when will there be a mod that makes all npcs hate you?
Critas 3. nov. 2023 kl. 11:03 
racism update
DexocrafterRa 19. okt. 2023 kl. 4:21 
how did i lose this mod i needed it yesterday
76561198983371061 30. juli 2023 kl. 7:51 
then no one will give it a chance :))))))))))))))))))))
Froze  [ophavsmand] 30. juli 2023 kl. 4:31 
no
чухонь (кирилл) 30. juli 2023 kl. 3:40 
does it work with drgbase npcs?
Big raga the opp stoppa 27. maj 2023 kl. 23:47 
i agree
uncommon saucers 20. maj 2023 kl. 16:10 
add an option to make them hate player
Froze  [ophavsmand] 20. maj 2023 kl. 2:07 
jsut tested and it's working on my end
Froze  [ophavsmand] 14. maj 2023 kl. 18:47 
any errors?
Yruror 14. maj 2023 kl. 8:51 
ye he is right is not working
anuarwow6689 27. apr. 2023 kl. 10:51 
mod not working
Skullbattle78 26. apr. 2023 kl. 15:47 
What Are Your Specs..? Gahh Dayum that's smooth even with the fucking ArcCW Urban Coalition Pack
greenman_0075 19. apr. 2023 kl. 15:31 
nice sorry
greenman_0075 19. apr. 2023 kl. 15:31 
is there a mod like this but can make them trendy to u?
fox mom 17. apr. 2023 kl. 14:31 
i am stealing the gullible dildo word combination
Gavitron 17. apr. 2023 kl. 11:45 
aww you gullible dildo
Jamiroquai 17. apr. 2023 kl. 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 17. apr. 2023 kl. 6:32 
Just like Doom
Unknown Developer 17. apr. 2023 kl. 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 16. apr. 2023 kl. 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  [ophavsmand] 16. apr. 2023 kl. 11:11 
i think i improved performance on the chasing now + added your nearest npc chase logic as an option
Froze  [ophavsmand] 16. apr. 2023 kl. 10:21 
is it the addentityrelationship not being executed every time an npc spawns?
Froze  [ophavsmand] 16. apr. 2023 kl. 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 16. apr. 2023 kl. 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 16. apr. 2023 kl. 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 16. apr. 2023 kl. 8:45 
well it works, right? so it's good
Froze  [ophavsmand] 16. apr. 2023 kl. 7:02 
any pointers/tips?
i'm all about optimizing the code if you tell me what i need to do.
Unknown Developer 16. apr. 2023 kl. 6:39 
very bad code.
ʞritzo 16. apr. 2023 kl. 3:43 
Map from 1st video please.
Looks sick.
TheArtemMaps 15. apr. 2023 kl. 12:14 
free for all (ffa) Script
null_local 15. apr. 2023 kl. 11:45 
now i kinda want to see NPC infighting, like in DOOM
Sleep Deprived Gaming 15. apr. 2023 kl. 10:13 
They had one of those days when you don't want to wake up and everybody sucks.
vllad1255 15. apr. 2023 kl. 2:21 
Класс
galunga 15. apr. 2023 kl. 1:13 
Finally, civil war
Momo el virgo 14. apr. 2023 kl. 23:00 
a
supergamerpugs 14. apr. 2023 kl. 22:36 
hate_each_other_npcs_enable 0/1
14. apr. 2023 kl. 22:29 
headcrab battle royale
lol
Pain Paint 14. apr. 2023 kl. 21:34 
time to make a random battle royal :/