Tutorial: Create a working battery with light Last edited 1 year ago2022-05-10 22:36:27 UTC

You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date. Click here to see the current revision of this page.
Hello, and welcome to another tutorial! This tutorial will teach you how to create working shiny batteries without programming. This guide asumes you know the basics of Half-Life mapping. To do this tutorial, you will require: First, create a 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 code]light_spot[/code] will not move with it. This works with other entities like healtkits, breakables, doors...

Comments

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