Raised This Month: $ Target: $400
 0% 

Set kRenderTransColor for non BSP entities?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
11922911
Senior Member
Join Date: Dec 2011
Location: Yuen Long Country
Old 07-14-2015 , 00:11   Set kRenderTransColor for non BSP entities?
Reply With Quote #1

I found that BaseBuilder uses kRenderTransColor to set color for BSP objects.



----------
When I try to do the same thing on an non BSP entity, it doesn't seems to work.

PHP Code:
new ent EF_CreateNamedEntity(EF_AllocString("info_target");
if (
pev_valid(ent))
{    
    
EF_SetModel(ent"models/w_backpack.mdl");

    
set_pev(entpev_rendermodekRenderTransColor);
    
set_pev(entpev_rendercolorFloat:{0.0255.00.0});
    
set_pev(entpev_renderamt150.0);

Result:


As you can see, I'm trying to change a backpack model to green color, but the result is no green only the renderamt alpha works.
__________________
youtube:
@holla16

Last edited by 11922911; 07-15-2015 at 21:58.
11922911 is offline
grs4
Senior Member
Join Date: Dec 2010
Location: Poland
Old 07-15-2015 , 09:23   Re: Set kRenderTransColor for non BSP entities?
Reply With Quote #2

try using fakemeta
Code:
fm_set_rendering( entity , kRenderFxNone, red, green, blue, kRenderTransAdd, 255)
grs4 is offline
11922911
Senior Member
Join Date: Dec 2011
Location: Yuen Long Country
Old 07-15-2015 , 21:23   Re: Set kRenderTransColor for non BSP entities?
Reply With Quote #3

Quote:
Originally Posted by grs4 View Post
try using fakemeta
Code:
fm_set_rendering( entity , kRenderFxNone, red, green, blue, kRenderTransAdd, 255)
If you look into fakemeta_util.inc, the function basically does the same thing as what I did, it will give the same result.
__________________
youtube:
@holla16
11922911 is offline
grs4
Senior Member
Join Date: Dec 2010
Location: Poland
Old 07-16-2015 , 06:02   Re: Set kRenderTransColor for non BSP entities?
Reply With Quote #4

Yep, i know, but you should look at this:
kRenderFxNone ; kRenderTransAdd
grs4 is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 07-16-2015 , 20:11   Re: Set kRenderTransColor for non BSP entities?
Reply With Quote #5

i suggest you look into the zombie plague lasermine code
Depresie is offline
Old 07-17-2015, 18:22
Xalus
This message has been deleted by Xalus.
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 11:04.


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