Raised This Month: $ Target: $400
 0% 

pev_light_level from custom entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
schmurgel1983
Veteran Member
Join Date: Aug 2006
Location: Germany
Old 04-15-2011 , 07:40   pev_light_level from custom entity
Reply With Quote #1

how to figure out pev_light_level from a custom created entity (info_target)?

look video on youtube

u see the light_level is changing on the entity, but i can't figure out with pev_light_level.
only work on player? why xD
__________________

Working on:
nothing

Last edited by schmurgel1983; 04-15-2011 at 08:14.
schmurgel1983 is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 04-15-2011 , 23:57   Re: pev_light_level from custom entity
Reply With Quote #2

I already asked that when I made that model you're using a few years back, I had the same issue:
http://forums.alliedmods.net/showthread.php?t=87333
No solid replies.
__________________
Hunter-Digital is offline
schmurgel1983
Veteran Member
Join Date: Aug 2006
Location: Germany
Old 04-16-2011 , 04:05   Re: pev_light_level from custom entity
Reply With Quote #3

yes i've seen, but just ask again.
i've test on entity offsets from 1 to 2000 no result.
the light level is changed, but no stored?
__________________

Working on:
nothing
schmurgel1983 is offline
schmurgel1983
Veteran Member
Join Date: Aug 2006
Location: Germany
Old 04-16-2011 , 06:35   Re: pev_light_level from custom entity
Reply With Quote #4

with engfunc(EngFunc_GetEntityIllum, entity) i get the current value, from the lighting level (values from 0 to 360), all fm & ham hooks failed...

no one can help?
__________________

Working on:
nothing
schmurgel1983 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-16-2011 , 07:00   Re: pev_light_level from custom entity
Reply With Quote #5

I think pev_light_level would be automatically set with the right value. What is "spot" exactly ? I'm confused, where is your entity ?
__________________
Arkshine is offline
schmurgel1983
Veteran Member
Join Date: Aug 2006
Location: Germany
Old 04-16-2011 , 07:48   Re: pev_light_level from custom entity
Reply With Quote #6

video: i've clamp all this from 50 to 150
spot is the player aim end,
if i pev_light_level on the entity (info_target) its all time 0.

attach 2 pic's


jpeg 97.7 KB x:620 y:280 ... nerv.


EDIT:
Illumination
Code:
player.cpp
//=========================================================
// Illumination 
// return player light level plus virtual muzzle flash
//=========================================================
int CBasePlayer :: Illumination( void )
{
    int iIllum = CBaseEntity::Illumination( );

    iIllum += m_iWeaponFlash;
    if (iIllum > 255)
        return 255;
    return iIllum;
}

player.h
class CBasePlayer : public CBaseMonster
{
public:
    int Illumination( void );
}

cbase.h
//
// Base Entity.  All entity types derive from this
//
class CBaseEntity 
{
public:
    virtual int Illumination( ) { return GETENTITYILLUM( ENT( pev ) ); };
};

hl_baseentity.cpp
int CBasePlayer :: Illumination( void ) { return 0; }
Attached Files
File Type: zip pic's.zip (293.0 KB, 98 views)
__________________

Working on:
nothing

Last edited by schmurgel1983; 04-16-2011 at 08:19.
schmurgel1983 is offline
schmurgel1983
Veteran Member
Join Date: Aug 2006
Location: Germany
Old 04-17-2011 , 21:02   Re: pev_light_level from custom entity
Reply With Quote #7

solved: FM_AddToFullPack -.-"

youtube
__________________

Working on:
nothing
schmurgel1983 is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 04-17-2011 , 22:27   Re: pev_light_level from custom entity
Reply With Quote #8

THAT's solved ? The model's light still changes.
__________________
Hunter-Digital is offline
schmurgel1983
Veteran Member
Join Date: Aug 2006
Location: Germany
Old 04-18-2011 , 03:24   Re: pev_light_level from custom entity
Reply With Quote #9

yes i reverse the light from entity, in dark places it's more brighter and on bright places ist more darker ^^
so it's solved for me i can change the light level what i want.

EDIT: look video from post 1 and then from post 7 and compare
__________________

Working on:
nothing

Last edited by schmurgel1983; 04-18-2011 at 03:27.
schmurgel1983 is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 04-18-2011 , 03:51   Re: pev_light_level from custom entity
Reply With Quote #10

Oh right... still, you should keep the lightlevel to a fixed value, it'll look better.

So what did you actually change in addtofullpack ?
__________________
Hunter-Digital is offline
Reply


Thread Tools
Display Modes

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 20:01.


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