Raised This Month: $ Target: $400
 0% 

Changing light entity properties


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MousePad
Junior Member
Join Date: Apr 2012
Old 04-21-2013 , 17:03   Changing light entity properties
Reply With Quote #1

How can I retrieve the "Appearance" property of a light entity and change it? For instance I would like to check if a light entity has its Appearance set to "Flicker B" and change its value to "Normal". Any help would be appreciated!
Also would doing this really stop the light flickering after the map has loaded and the entity is precached?
MousePad is offline
MousePad
Junior Member
Join Date: Apr 2012
Old 04-21-2013 , 18:30   Re: Changing light entity properties
Reply With Quote #2

I'm not sure if I'm following the correct path. I think I can use the set_pdata_int function along with this information about light entities:
http://wiki.amxmodx.org/CLight_%28CS%29

I'm trying to find if an entity is a light entity using this:

PHP Code:
new light_count 0
new ent engfuncEngFunc_FindEntityByString, -1"classname""light" );
while(
ent)
{
    
light_count += 1
    ent 
engfuncEngFunc_FindEntityByStringent"classname""light" );

But when I print the light_count variable I get 0. Is it not ok to search for "light" as a class name?
MousePad 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:50.


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