Check out Half-Life Re-imagined competition results!
Check out Skewing textures in Hammer, our newest tutorial!
Welcome, maydn, our newest member!

logo

Site Stuff

Reference

Maps

Community

ShoutBOX

Poll

Feeling Blue

What's your favourite shade of blue?

Azure

13

Cobalt

32

Turquoise

9

Cyan

10

Royal

8

Teal

3

Onliners

31 mins

Unq

31 mins

JeffMOD

33 mins

ZikShadow

34 mins

Jessie

35 mins

Dimbeak

42 mins

Windawz

1 hours

EndothermicDove

Affiliates

A gaming and technology blog by TWHL admins Penguinboy and Ant. A music blog by TWHL users Ant and Hugh.

Monster Health

By Lo?c 'Loc' Visse

Changing health without coding

entities required:

  • a func_door
  • a func_wall
  • the monster you want to change health
  • a trigger_auto

This is something I use when I want to make a mini-boss (a monster stronger than his fellows) but it would work as well to weaken a monster so that he gets killed faster. The main trick about this is to use the damage factor of the moving brush-based entities. The func_door entity has a "damage inflicted when blocked" value -- this is normally used when you get stuck in a door, and in most cases it gibs you awfully. However, I discovered that there was nothing in the code to prevent from using negative values in order to increase health.

So, in order to get this working, we need to put our monster in a 'sandwich' between a func_door with a negative damage value (or positive if you want to hurt him) and a wall (It is better to make a func_wall next to the monster or he will be pushed by the door). The door and the wall need to have a name (targetname), the same name, for example "heal". the trigger_auto will trigger "heal" after a delay of 1 or 2 seconds (0 can be bad on large maps, you must let enough time to spawn all of the entities or it may not work).

You must make sure the door is oriented in the right angle, facing the monster and the wall. After the trigger_auto triggers the door, it will move toward the monster and 'crush' it, giving it extra health. Finnally, when the door comes back to position, it must remove itself and the wall too. This is easily achieved by setting the "killtarget" value of the door to "heal". And that's it! you now have a monster ready for a duel of anthology!