Raised This Month: $ Target: $400
 0% 

Keep fake lights there permanently


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 05-31-2007 , 11:35   Keep fake lights there permanently
Reply With Quote #1

Here's the function I'm using for this:

Code:
public spawn_light(r,g,b,bright,radius,x,y,z) {     new origin[3]     origin[0] = x     origin[1] = y     origin[2] = z         message_begin(MSG_BROADCAST,SVC_TEMPENTITY,origin)         write_byte(TE_DLIGHT);     write_coord(x);     write_coord(y);     write_coord(z);     write_byte(radius);     write_byte(r);     write_byte(g);     write_byte(b);     write_byte(bright);     write_byte(0);         message_end(); }

Only problem, it doesn't stay very long. Any other things to to add/edit in order to keep it in a spot permanently? Thanks.
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 05-31-2007 , 12:00   Re: Keep fake lights there permanently
Reply With Quote #2

PHP 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(life in 10's)
// write_byte(decay rate in 10's) 
Try changing the second last byte to (~0) or 9999999999. Anotherway, is having an entity and keep calling it.
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
Old 05-31-2007, 12:07
mogel
This message has been deleted by mogel. Reason: ...........
pRED*
Join Date: Dec 2006
Old 05-31-2007 , 17:08   Re: Keep fake lights there permanently
Reply With Quote #3

Couldn't you spawn an actual light entity? I havn't done mapping in ages but it's something like func_light..
pRED* is offline
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 05-31-2007 , 18:59   Re: Keep fake lights there permanently
Reply With Quote #4

Quote:
Originally Posted by pRED* | NZ View Post
Couldn't you spawn an actual light entity? I havn't done mapping in ages but it's something like func_light..
Tried that before, because I'm a mapper too, so that was the first thing I actually tried lol.
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 06-01-2007 , 19:18   Re: Keep fake lights there permanently
Reply With Quote #5

tried both, only lasts for 25 seconds. :S.
Any other ideas?
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 06-02-2007 , 01:44   Re: Keep fake lights there permanently
Reply With Quote #6

bump
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
pRED*
Join Date: Dec 2006
Old 06-02-2007 , 03:06   Re: Keep fake lights there permanently
Reply With Quote #7

Do what Cheap_suit said..

Use the TE_DLIGHT to create a temporary light and then create an entity, set it's next think to 25 seconds, on nextthink create the TE_DLIGHT message again..

Theres a tutorial by hawk about using entities nextthink instead of setting a looping task..
pRED* 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 10:33.


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