AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Transparent Sprite. (https://forums.alliedmods.net/showthread.php?t=62160)

Drak 10-19-2007 23:31

Transparent Sprite.
 
I can't seem get this sprite to go transparent.
(Making it now show up, with the black box around it)

Code:
CreateDot(Float:origin[3]) {     new dot = fm_create_entity("info_target");//engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"info_target"));     if(dot)     {         set_pev(dot,pev_classname,g_szDotClass);         set_pev(dot,pev_movetype,MOVETYPE_NONE)         set_pev(dot,pev_solid,SOLID_NOT)                     set_pev(dot,pev_rendermode,kRenderTransAlpha);         set_pev(dot,pev_renderfx,kRenderFxNone);         set_pev(dot,pev_renderamt,255);                     engfunc(EngFunc_SetModel,dot,"sprites/dot.spr");         engfunc(EngFunc_SetOrigin,dot,origin)     }     return 1 }

Anyone have any ideas on how to do it?

M249-M4A1 10-20-2007 01:36

Re: Transparent Sprite.
 
Did you try lowering the renderamt to like, 128?

Drak 10-20-2007 12:39

Re: Transparent Sprite.
 
Quote:

Originally Posted by M249-M4A1 (Post 544168)
Did you try lowering the renderamt to like, 128?

Yeah, which makes it transparent.. But.. Still has the black box around the sprite.
Oh.. Durr.. 'kRenderGlow' worked just fine..

Sylwester 10-21-2007 14:17

Re: Transparent Sprite.
 
Use "additive" texture format while saving your sprite or instead of entity use temp entity message (TE_SPRITE). Your sprite will be shown without any black color in it if you do that.


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

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