Raised This Month: $ Target: $400
 0% 

TE_DLIGHT


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 08-16-2007 , 19:53   TE_DLIGHT
Reply With Quote #1

a TE_DLIGHT cannot go longer than 1 second??

public fl(ent)
{
// check if entity isn't valid
if(!pev_valid(ent))
return;

// new variable for origin and get origin of entity
static Floatrigin[3];
pev(ent,pev_origin,origin);


// send the light flash
message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
write_byte(27); // TE_DLIGHT
write_coord(floatround(origin[0])); // x
write_coord(floatround(origin[1])); // y
write_coord(floatround(origin[2])); // z
write_byte(radius); // radius
write_byte(255); // r
write_byte(255); // g
write_byte(255); // b
write_byte(600); // life <<<<<<<<
write_byte(60); // decay rate
message_end();

remove_entity(ent)
return


}
life is 600 = 60 seconds and it only lasts 1 second
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
SamuraiBarbi
Senior Member
Join Date: Aug 2006
Location: United States
Old 08-17-2007 , 00:39   Re: TE_DLIGHT
Reply With Quote #2

i think this is because your decay is set to 60, try lowering your decay to something like 10 or 1 even. also, you could try increasing the life to something higher.
SamuraiBarbi is offline
Send a message via AIM to SamuraiBarbi Send a message via MSN to SamuraiBarbi Send a message via Yahoo to SamuraiBarbi
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 08-17-2007 , 01:38   Re: TE_DLIGHT
Reply With Quote #3

10 life = 1 second, somehow just doesnt go over 1 second

do you even know what decay is? its how the edges of the light decay, not how fast the light decays away
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
SamuraiBarbi
Senior Member
Join Date: Aug 2006
Location: United States
Old 08-17-2007 , 10:17   Re: TE_DLIGHT
Reply With Quote #4

Quote:
Originally Posted by kp_uparrow View Post
10 life = 1 second, somehow just doesnt go over 1 second

do you even know what decay is? its how the edges of the light decay, not how fast the light decays away
do you know what affect decay has? ass.
SamuraiBarbi is offline
Send a message via AIM to SamuraiBarbi Send a message via MSN to SamuraiBarbi Send a message via Yahoo to SamuraiBarbi
mogel
Senior Member
Join Date: Jan 2007
Old 08-17-2007 , 06:40   Re: TE_DLIGHT
Reply With Quote #5

Moin,

u have an overflow

Quote:
Originally Posted by kp_uparrow View Post
write_byte(600); // life <<<<<<<<
write_byte() ... range is from 0 to 255 ... set ist to 255 and reduce the decay ... so u have 25.5 seconds

hand, mogel
__________________
mogel is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 08-17-2007 , 13:35   Re: TE_DLIGHT
Reply With Quote #6

well a 600 didnt overflow
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
mogel
Senior Member
Join Date: Jan 2007
Old 08-17-2007 , 15:50   Re: TE_DLIGHT
Reply With Quote #7

Hi,

Quote:
Originally Posted by kp_uparrow View Post
well a 600 didnt overflow
set it to 266 -> 1 second
set it to 255 -> 25.5 second

u have a overflow


hand, mogel
__________________
mogel is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 08-17-2007 , 18:16   Re: TE_DLIGHT
Reply With Quote #8

hm.. over 255 does go wierd, guess i cant do more than 25 sec without set tasks

i dont think the light can be removed on demand can you?
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow 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 07:58.


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