Posts
38
Respect
Forum Rank
Legless Crawler
Primary Group
Member
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() Oil Rig Beta Access |
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() Oil Rig Beta Access |
//
// Control light intensity for certain lights connected to the power
power_lights_think( clientNum )
{
// Get associated light model entity
if ( IsDefined( self.target ) )
{
self.light_model = GetEnt( clientNum, self.target, "targetname" );
}
// The lights start off
while (1)
{
level waittill( "pl1" ); // power lights on
// Turn the lights on
println("power lights on client num: " + clientnum);
if ( IsDefined( self.script_float ) )
{
self.lights[clientNum] SetLightIntensity( self.script_float );
}
else
{
self.lights[clientNum] SetLightIntensity( 1.5 );
}
self.light_model SetModel( "lights_berlin_subway_hat_0" ); // put the on-model for the light here ( make sure it's precached! )
level waittill( "lights_off" );
// Turn the lights off
// Turn this into a flicker later
println("power lights off client num: " + clientnum);
self.lights[clientNum] SetLightIntensity( 0.001 );
}
}