AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Spawn entity light. (https://forums.alliedmods.net/showthread.php?t=174106)

.Dare Devil. 12-15-2011 14:40

Spawn entity light.
 
hi,

is my code correct?

PHP Code:

 
public cmd_spawn(id)
{
 static 
origin[3]
 
get_user_origin(idorigin)
 new 
ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"light"));
 
set_pev(ent,pev_classname,"dd");
 
engfunc(EngFunc_SetOriginentorigin);
        
fm_set_kvd(ent"_light""150 0 0""dd");
 
client_print(idprint_chat"light up!")


I have not seen before that someone had spawn entity light.
Mayby it can be,

If i compile map then map compiler write lights on face inside bps
( i am not sure, thats way i am asking about that code. )

Xellath 12-15-2011 14:54

Re: Spawn entity light.
 
Set pev|EV_INT_effects to EF_BRIGHTLIGHT or make the entity think and send out a TE_DLIGHT temporary entity.


All times are GMT -4. The time now is 11:47.

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