Book Image

Source SDK Game Development Essentials

By : Brett Joseph Bernier
Book Image

Source SDK Game Development Essentials

By: Brett Joseph Bernier

Overview of this book

Table of Contents (18 chapters)
Source SDK Game Development Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Modifying entity effects


A great feature of the Source engine is the ability to control special entity properties such as render modes. We can dynamically change parameters such as the alpha, or transparency of entities. We can manipulate two overlapping light model's alpha to trick the player into believing a light model is actually casting light when the point light beneath it turns on. If a model has a skin, it can easily be changed by sending a skin = number input, but some entities don't have different skins so we need to play some tricks with the render modes.

Place a prop_dymanic entity on the ceiling above the light in the second room and name it room02_light01_mdl_off. Assign the prop_dynamic entity the light_domelight02_off.mdl model and change its render mode to solid.

The entity name might seem long, but following a consistent naming convention will help you will stay organized, and it could make your life much easier when your maps have lots of entities. Assigning the prop a render...