Raised This Month: $ Target: $400
 0% 

Lights?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Spunky
Senior Member
Join Date: May 2008
Location: Orlando, Fl.
Old 06-18-2009 , 22:45   Lights?
Reply With Quote #1

How can I create a light source that projects from an entity in different colors?
Spunky is offline
Send a message via AIM to Spunky
stupok
Veteran Member
Join Date: Feb 2006
Old 06-19-2009 , 00:05   Re: Lights?
Reply With Quote #2

If you want to emit light from an entity, you can set some flag on it, I think it's pev_effects. However, I don't think you can change the color of this light.

Otherwise, you can always use this:
Code:
#define TE_DLIGHT                   27       // Dynamic light, effect world, minor entity effect
// write_byte(TE_DLIGHT)
// write_coord(position.x)
// write_coord(position.y)
// write_coord(position.z)
// write_byte(radius in 10's) 
// write_byte(red)
// write_byte(green)
// write_byte(blue)
// write_byte(brightness)
// write_byte(life in 10's)
// write_byte(decay rate in 10's)
__________________
stupok is offline
Spunky
Senior Member
Join Date: May 2008
Location: Orlando, Fl.
Old 06-19-2009 , 08:40   Re: Lights?
Reply With Quote #3

Yeah thanks, got it working.

Code:
// write_byte(decay rate in 10's)

That last parameter errors out the message. Don't use it.
Spunky is offline
Send a message via AIM to Spunky
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 06-19-2009 , 08:45   Re: Lights?
Reply With Quote #4

Actually the brightness parameter does not exist, there are only life and decay, no bright, don't use that one
__________________
Hunter-Digital is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:33.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode