Raised This Month: $ Target: $400
 0% 

Create light entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Emp0wer
Member
Join Date: Jul 2010
Location: Ukraine mother
Old 08-12-2010 , 04:23   Create light entity
Reply With Quote #1

Is that possible to create light entity? I was trying but to result. P.s In my cases messages can't be used.

Last edited by Emp0wer; 08-12-2010 at 04:35.
Emp0wer is offline
Send a message via ICQ to Emp0wer Send a message via Skype™ to Emp0wer
lazarev
Veteran Member
Join Date: Sep 2008
Old 08-12-2010 , 04:46   Re: Create light entity
Reply With Quote #2

https://forums.alliedmods.net/showth...97#post1104097 yo
lazarev is offline
Emp0wer
Member
Join Date: Jul 2010
Location: Ukraine mother
Old 08-12-2010 , 09:53   Re: Create light entity
Reply With Quote #3

Quote:
Originally Posted by lazarev View Post
It send this every time on thinking, that makes my player really lagy if there are a lot of lights in the map, I knew about TE_DLIGHT but I want something that should not be updated every time, and could be attached to player, like a light enitity.
PHP Code:
        message_begin(MSG_BROADCASTSVC_TEMPENTITY);
        
write_byte(TE_DLIGHT);
        
engfunc(EngFunc_WriteCoordvOrigin[0]);
        
engfunc(EngFunc_WriteCoordvOrigin[1]);
        
engfunc(EngFunc_WriteCoordvOrigin[2]);
        
write_byte(iRadius);        // radius in 10's
        
write_byte(iR);        // R
        
write_byte(iG);        // G
        
write_byte(iB);        // B
        
write_byte(3);      // life
        
write_byte(0);        // decay rate
        
message_end(); 
Emp0wer is offline
Send a message via ICQ to Emp0wer Send a message via Skype™ to Emp0wer
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 08-12-2010 , 11:13   Re: Create light entity
Reply With Quote #4

You can reduce the frequency of the think and set the life of the SVC_TEMPENTITY to 20 for example.
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
Emp0wer
Member
Join Date: Jul 2010
Location: Ukraine mother
Old 08-12-2010 , 14:56   Re: Create light entity
Reply With Quote #5

Quote:
Originally Posted by ot_207 View Post
You can reduce the frequency of the think and set the life of the SVC_TEMPENTITY to 20 for example.
20 is 2 secodns, my aura is moving with player, so it will be always 2 sec. behind him (
Emp0wer is offline
Send a message via ICQ to Emp0wer Send a message via Skype™ to Emp0wer
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-12-2010 , 18:40   Re: Create light entity
Reply With Quote #6

Well then use lower values, use 0.1 for think and use life 5 and decay 1 or something.
You could also use this:

Code:
entity_set_int(ent, EV_INT_effects, EF_BRIGHTLIGHT)
But AFAIK you can't customize it's color, range, etc.
__________________
Hunter-Digital is offline
Emp0wer
Member
Join Date: Jul 2010
Location: Ukraine mother
Old 08-12-2010 , 20:02   Re: Create light entity
Reply With Quote #7

Quote:
Originally Posted by Hunter-Digital View Post
Well then use lower values, use 0.1 for think and use life 5 and decay 1 or something.
You could also use this:

Code:
entity_set_int(ent, EV_INT_effects, EF_BRIGHTLIGHT)
But AFAIK you can't customize it's color, range, etc.
Thx, But I need a red aura.
Emp0wer is offline
Send a message via ICQ to Emp0wer Send a message via Skype™ to Emp0wer
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 21:58.


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