Raised This Month: $ Target: $400
 0% 

make light


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
grankee
Member
Join Date: Jun 2008
Old 10-14-2010 , 11:45   make light
Reply With Quote #1

Hi, I need to make light, but no light like TE_DLIGHT (ignoring walls, and if too much they are blinking) I need to create real light like in cs_estate (it is on even when I set set_lights("a")). Is possible to create entity or namedentity with properties of original entity class "light"? I think it must be possible, because somehow engine creating this while map loading, metamod has access do engine, modules has access to metamod and plugin(what I try write) has access to module, so how to do it?

PS. I'm not interested about pev_effects of any entity, I know about it but it is exactly like TE_DLIGHT (in working)


I tried this, but...
PHP Code:
new ent=engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"light"))
    
client_print(0,print_chat,"%d spawned",ent)
    
set_pev(ent,pev_classname,"light")
    new 
Float:orig[3]={-120.0,-1100.0,-500.0}
    
entity_set_origin(ent,orig)
    
orig[0]=-121.0
    orig
[1]=-1101.0
    orig
[2]=-501.0
    set_pev
(ent,pev_absmin,orig)
    
orig[0]-119.0
    orig
[1]-1099.0
    orig
[2]-499.0
    set_pev
(ent,pev_absmax,orig)
    
set_pev(ent,pev_targetname,"downstairs")
    
DispatchKeyValue(ent,"_light","100 100 100 100")
    
//DispatchSpawn(ent)
    
client_print(0,print_chat,"%s",is_valid_ent(ent)?"exists":"not exists"
if I uncomment DispatchSpawn entity is removed immediatelly after use (use DispatchSpawn), i know it from print info (exists of not exists)

Last edited by grankee; 10-15-2010 at 11:10.
grankee 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:18.


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