AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Rendering Entites? (https://forums.alliedmods.net/showthread.php?t=50617)

Drak 01-30-2007 08:00

Rendering Entites?
 
Iv been trying to figure out how to render NPC's/Entites with fakemeta, this is what i have so far:
Code:
public render_test(id) {     new Ent,body     get_user_aiming(id,Ent,body,300)     if(!is_valid_ent(Ent)) return PLUGIN_HANDLED     set_pev(Ent, pev_renderfx, kRenderFxNone)     set_pev(Ent, pev_rendercolor, 255,0,0)     set_pev(Ent, pev_rendermode, kRenderNormal)     set_pev(Ent, pev_renderamt, 135.0)     return PLUGIN_HANDLED }
But doesn't seem todo anything, no errors or anything.

dutchmeat 01-30-2007 08:21

Re: Rendering Entites?
 
you should debug if the ent passes the first IF statement.

lunarwolfx 01-30-2007 08:54

Re: Rendering Entites?
 
Quote:

Originally Posted by SixTwin (Post 433458)
Iv been trying to figure out how to render NPC's/Entites with fakemeta, this is what i have no far:
Code:
public render_test(id) {     new Ent,body     get_user_aiming(id,Ent,body,300)     if(!is_valid_ent(Ent)) return PLUGIN_HANDLED     set_pev(Ent, pev_renderfx, kRenderFxNone)     set_pev(Ent, pev_rendercolor, 255,0,0)     set_pev(Ent, pev_rendermode, kRenderNormal)     set_pev(Ent, pev_renderamt, 135.0)     return PLUGIN_HANDLED }
But doesn't seem todo anything, no errors or anything.


that's because KRenderFxNone and KRenderNormal are used to make the entity go back to normal.

Replace KRenderNormal with KRenderTransAlpha, and that will make the entity transparent.

Drak 01-30-2007 13:41

Re: Rendering Entites?
 
Quote:

Originally Posted by lunarwolfx (Post 433465)
that's because KRenderFxNone and KRenderNormal are used to make the entity go back to normal.

Replace KRenderNormal with KRenderTransAlpha, and that will make the entity transparent.

Ah, thank you that worked.


All times are GMT -4. The time now is 00:34.

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