Raised This Month: $ Target: $400
 0% 

Change light environment


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SpawnerF
Member
Join Date: Apr 2017
Location: Morocco
Old 07-09-2017 , 18:24   Re: Change light environment
Reply With Quote #1

Code:
Light entities

   * light
   * light_spot
   * light_dynamic
   * env_projectedtexture
   * point_spotlight
   * light_environment
   * light_directional

Code:
public plugin_init()    register_srvcmd("parse", "@parse_Hook") @parse_Hook(){         static const         _Light_entities[][] = {             "light", "light_spot",             "light_dynamic", "env_projectedtexture",             "point_spotlight", "light_environment",             "light_directional"         }     ;         for(new i; i < sizeof _Light_entities; i++)         if(_findEntityByName( _Light_entities[i] )) server_print("Found : %s", _Light_entities[i]);     } stock _findEntityByName( _className[], _entity = -1 ){         while((_entity = find_ent_by_class(_entity, _className)))         return true;         return false; }

Edit : I'm still searching if it exist or not or it I should create it ...
I wanted to see if it's just light_environment or the others light entities this is why I tried them all.
Maybe I'm getting something wrong.
__________________
XX was created just for giving evidence and not meant to damage public servers.
&We do not test on public servers.
Thank's.

Last edited by SpawnerF; 07-09-2017 at 18:37.
SpawnerF is offline
SpannerSpammer
Member
Join Date: Mar 2006
Old 07-10-2017 , 00:12   Re: Change light environment
Reply With Quote #2

light, light_spot and light_environment entities are all
removed as soon as they spawn (after their data is recorded
and processed by the server) unless they are part of a light/switch setup.

So, these entities will not exist soon after the map spawns.
You should probably try manipulating the key/value data before
the entity spawns, if that is possible.

For the light_environment entity you need to change
the _light key/value. It takes four int parameters:
red green blue and brightness. Change the brightness parameter.
__________________
[NeoTF|DEV]SpannerSpammer-[AoE]-
NeoTF Development Team.
http://steamcommunity.com/groups/neotf
SpannerSpammer 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 23:09.


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