AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   TE_DLIGHT (https://forums.alliedmods.net/showthread.php?t=59582)

kp_uparrow 08-16-2007 19:53

TE_DLIGHT
 
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 Float:origin[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

SamuraiBarbi 08-17-2007 00:39

Re: TE_DLIGHT
 
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.

kp_uparrow 08-17-2007 01:38

Re: TE_DLIGHT
 
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

mogel 08-17-2007 06:40

Re: TE_DLIGHT
 
Moin,

u have an overflow

Quote:

Originally Posted by kp_uparrow (Post 519198)
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

SamuraiBarbi 08-17-2007 10:17

Re: TE_DLIGHT
 
Quote:

Originally Posted by kp_uparrow (Post 519344)
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.

kp_uparrow 08-17-2007 13:35

Re: TE_DLIGHT
 
well a 600 didnt overflow

mogel 08-17-2007 15:50

Re: TE_DLIGHT
 
Hi,

Quote:

Originally Posted by kp_uparrow (Post 519600)
well a 600 didnt overflow

set it to 266 -> 1 second
set it to 255 -> 25.5 second

u have a overflow


hand, mogel

kp_uparrow 08-17-2007 18:16

Re: TE_DLIGHT
 
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?


All times are GMT -4. The time now is 07:58.

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