Can you make security guards (or any friendly monster) hostile towards the player? Created 4 years ago2020-04-19 11:08:47 UTC by Zapp212 Zapp212

Created 4 years ago2020-04-19 11:08:47 UTC by Zapp212 Zapp212

Posted 4 years ago2020-04-19 11:08:47 UTC Post #344130
Hi. I'm making a mod where the player is supposed to be an enemy to all other "beings" in the game, including the sequrity guards and scientists. I don't know how or if you can do that, but I have searched all over the internet and I have found nothing yet so I would really appreciate if someone could help me.
Thanks :)
Zapp212 Zapp212"In general, the greater the understanding, the greater the delusion; the more intelligent, the less sane." - George Orwell
Posted 4 years ago2020-04-19 11:55:25 UTC Post #344131
It'd require a little bit of programming. Each monster has got a 'classification', which can be one of the following:
  • CLASS_NONE
  • CLASS_MACHINE
  • CLASS_PLAYER
  • CLASS_HUMAN_PASSIVE
  • CLASS_HUMAN_MILITARY
  • CLASS_ALIEN_MILITARY
  • CLASS_ALIEN_PASSIVE
  • CLASS_ALIEN_MONSTER
  • CLASS_ALIEN_PREY
  • CLASS_ALIEN_PREDATOR
  • CLASS_INSECT
  • CLASS_PLAYER_ALLY
  • CLASS_PLAYER_BIOWEAPON
  • CLASS_ALIEN_BIOWEAPON
  • CLASS_BARNACLE
So, you could download Solokiller's updated HL SDK for Visual Studio 2019 and change every CLASS_PLAYER_ALLY for example, into CLASS_HUMAN_MILITARY, then compile the .dll files.

Or you can just edit the monster relationship table:
User posted image
Alternatively, you could probably use Spirit of Half-Life 1.2, which allows you to set the classification for each monster individually, in the map editor. (though, it has a tendency to break other things and crash more often than vanilla HL)
Admer456 Admer456If it ain't broken, don't fox it!
Posted 4 years ago2020-04-20 13:34:57 UTC Post #344133
It worked, thank you! :)
It took a while because I didnĀ“t know how access and change the code in the game, but I figured it out after looking at a few tutorials and searching the web.
Zapp212 Zapp212"In general, the greater the understanding, the greater the delusion; the more intelligent, the less sane." - George Orwell
Posted 4 years ago2020-04-20 13:41:13 UTC Post #344134
Oh, we got tutorials for that here at TWHL Wiki:

https://twhl.info/wiki/page/Half-Life_Programming_-_Getting_Started

Glad it worked, though!
Admer456 Admer456If it ain't broken, don't fox it!
Posted 4 years ago2020-04-24 08:35:17 UTC Post #344135
There's also a setting in the Editor itself under flags 'Is hostile towards player when first seen'.
You must be logged in to post a response.