AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Lights? (https://forums.alliedmods.net/showthread.php?t=95058)

Spunky 06-18-2009 22:45

Lights?
 
How can I create a light source that projects from an entity in different colors?

stupok 06-19-2009 00:05

Re: Lights?
 
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)


Spunky 06-19-2009 08:40

Re: Lights?
 
Yeah thanks, got it working.

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

That last parameter errors out the message. Don't use it.

Hunter-Digital 06-19-2009 08:45

Re: Lights?
 
Actually the brightness parameter does not exist, there are only life and decay, no bright, don't use that one :)


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

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