Raised This Month: $32 Target: $400
 8% 

real time light entities


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 12-02-2018 , 19:24   real time light entities
Reply With Quote #1

Hello, it's possible to create lighting entities (light, light_spot, etc) with create_entity instead of TE_DLIGHT message?

I don't found enough informations about these entities in hlsdk.
__________________









Last edited by CrazY.; 12-02-2018 at 19:27.
CrazY. is offline
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 12-03-2018 , 01:05   Re: real time light entities
Reply With Quote #2

Code:
stock bool:createSquare(Float:vAngles[3],Float:vOrigin[3])
{ 
   	ent = create_entity( "info_target" );
	
   	if (is_valid_ent(ent)) 
   	{
		entity_set_string( ent , EV_SZ_classname, "square");
		entity_set_int(ent, EV_INT_solid, SOLID_BBOX); 
      		entity_set_int(ent, EV_INT_movetype, MOVETYPE_NONE); 
      		entity_set_model(ent, SQUARE); 
		entity_set_size( ent , Float:{ -80.0, -90.0, 0.0 }, Float:{ 80.0, 90.0, 10.0 } );
		entity_set_vector(ent, EV_VEC_angles, vAngles);
                entity_set_int(ent, EV_INT_fixangle , 1 );
      		entity_set_origin(ent, vOrigin);

                message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
                write_byte(TE_DLIGHT) // 27
                write_coord(floatround(vOrigin[0])) // x
                write_coord(floatround(vOrigin[1])) // y
                write_coord(floatround(vOrigin[2])) // z
                write_byte(50) // radius
                write_byte(50) // Red
                write_byte(255) // Green
                write_byte(255) // Blue
                write_byte(255) // life
                write_byte(60) // decay rate
                message_end()
   	}

}

Last edited by raizo11; 12-03-2018 at 01:07.
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 12-03-2018 , 06:55   Re: real time light entities
Reply With Quote #3

Without te_dlight and tempentity.
__________________








CrazY. is offline
E1_531G
Senior Member
Join Date: Dec 2017
Old 12-03-2018 , 07:36   Re: real time light entities
Reply With Quote #4

AFAIK, GoldSource doesn't support dynamic light, that means, "light" or "light_spot" entities created after map's compilation won't have any effect. But i didn't try.

Did you try? Try also with cs_create_entity("light").
__________________
My English is A0
E1_531G is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 12-07-2018 , 11:14   Re: real time light entities
Reply With Quote #5

Yes, only dynamic lights work in "real time". I Will leave thread open, case someone manage to do that and want to share.
__________________








CrazY. is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 12-11-2018 , 11:04   Re: real time light entities
Reply With Quote #6

Quote:
Originally Posted by CrazY. View Post
Yes, only dynamic lights work in "real time". I Will leave thread open, case someone manage to do that and want to share.
I remember seeing a server with permanent lights. I am not sure how it worked, but the lights would never ever dissapear, you know, when you're using the de_dlight message to make lights and use a task to repeat the process, there is a little bit of lag so the lights are off for like 0.5 secs or whatever then they appear again. However, on that server, which is a TFC server, they would never dissapear. Still, I'm quite sure it's still the tempentity message, because, there is no other way to add lights after map completly loaded.
DarthMan is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 12-11-2018 , 12:52   Re: real time light entities
Reply With Quote #7

Quote:
Originally Posted by DarthMan View Post
I remember seeing a server with permanent lights. I am not sure how it worked, but the lights would never ever dissapear, you know, when you're using the de_dlight message to make lights and use a task to repeat the process, there is a little bit of lag so the lights are off for like 0.5 secs or whatever then they appear again. However, on that server, which is a TFC server, they would never dissapear. Still, I'm quite sure it's still the tempentity message, because, there is no other way to add lights after map completly loaded.
Maybe 2 lights in the same point with different EOL times.
__________________

Last edited by Neeeeeeeeeel.-; 12-11-2018 at 12:52.
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
DarthMan
Veteran Member
Join Date: Aug 2011
Old 12-11-2018 , 16:27   Re: real time light entities
Reply With Quote #8

Quote:
Originally Posted by Neeeeeeeeeel.- View Post
Maybe 2 lights in the same point with different EOL times.
Maybe, I don't know.
DarthMan is offline
wilianmaique
BANNED
Join Date: Nov 2016
Old 05-18-2019 , 22:23   Re: real time light entities
Reply With Quote #9

does anyone know a good method?
wilianmaique is offline
Send a message via Skype™ to wilianmaique
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-18-2019 , 22:34   Re: real time light entities
Reply With Quote #10

no, light is baked into the bsp
__________________
<VeCo> 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 12:12.


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