Tutorial: Create a working battery with light Last edited 1 week ago2022-09-20 15:43:52 UTC

Hello, and welcome to another tutorial! This tutorial will teach you how to create working shiny batteries without programming. This guide assumes you know the basics of Half-Life mapping. To do this tutorial, you will require: First, create an item_battery entity, then, create a light_spot entity inside/on top of it. Name the light_spot whatever you want (Example: BAT_LIGHT), and make sure it has the following values:
`!!EPAIRS
"classname" "light_spot"
"style" "0"
"_sky" "0"
"_light" "0 255 255 200"
"pitch" "-90"
"_cone2" "23"
"_cone" "15"
"_falloff" "0"
"_fade" "1.0"
"angles" "0 0 0"
"targetname" "YOUR_BATTERY_NAME_HERE"`
You can copy this and paste it in the entity Properties

Next, go to the item_battery entity, and in Target, choose the light. It should look something like this:

User posted image

Run the map, make sure HLRAD (Lights) its on Extra. If its not working, you did something wrong, delete both entities and try again.

User posted image
Idle battery

User posted image
After player takes it

If you want the light more "strong", change the color to a darker one. The light disappears when you take the battery, but if the battery moves, the light_spot will not move with it. This works with other entities like healthkits, breakables, doors...

Comments

You must log in to post a comment. You can login or register a new account.