AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   pev_light_level from custom entity (https://forums.alliedmods.net/showthread.php?t=154921)

schmurgel1983 04-15-2011 07:40

pev_light_level from custom entity
 
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

Hunter-Digital 04-15-2011 23:57

Re: pev_light_level from custom entity
 
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.

schmurgel1983 04-16-2011 04:05

Re: pev_light_level from custom entity
 
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?

schmurgel1983 04-16-2011 06:35

Re: pev_light_level from custom entity
 
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?

Arkshine 04-16-2011 07:00

Re: pev_light_level from custom entity
 
I think pev_light_level would be automatically set with the right value. What is "spot" exactly ? I'm confused, where is your entity ?

schmurgel1983 04-16-2011 07:48

Re: pev_light_level from custom entity
 
1 Attachment(s)
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; }


schmurgel1983 04-17-2011 21:02

Re: pev_light_level from custom entity
 
solved: FM_AddToFullPack -.-"

youtube

Hunter-Digital 04-17-2011 22:27

Re: pev_light_level from custom entity
 
THAT's solved ? The model's light still changes.

schmurgel1983 04-18-2011 03:24

Re: pev_light_level from custom entity
 
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

Hunter-Digital 04-18-2011 03:51

Re: pev_light_level from custom entity
 
Oh right... still, you should keep the lightlevel to a fixed value, it'll look better.

So what did you actually change in addtofullpack ?


All times are GMT -4. The time now is 20:01.

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