Raised This Month: $ Target: $400
 0% 

Light an area (How to ?)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 06-10-2007 , 14:21   Re: Light an area (How to ?)
Reply With Quote #10

Quote:
Originally Posted by ShTaM View Post
Code:
 
public Light()
{
 message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
 write_byte(27);
 write_coord(0);
 write_coord(0); // y
 write_coord(0); // z
 write_byte(50); // radius
 write_byte(255); // red
 write_byte(255); // green
 write_byte(255); // blue
 write_byte(10); // life in 10's
 write_byte(30); // decay rate in 10's
 message_end();
 if ( AddLum < 500 )
 {
  AddLum++
  set_task(0.01,"Light")
 }
 else if ( AddLum == 500 )
 {
  AddLum = 0
 }
}
I can't get a constant light, it's boring .
Do you set the origin of the light?
This is a local dynamic light not for the whole map...
You have to set a specific location for this ;)
If you want to set the light for the whole map use what rolnaaba postet (set_lights() )...
Btw.: This --> set_task(0.01,"Light") will be set_task(0.1,"Light")
Shorter periods than 0.1 aren't supported..
But that seems ok...

greetz regalis
__________________
regalis is offline
 



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 10:35.


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