AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED] Sprites (https://forums.alliedmods.net/showthread.php?t=170667)

mabaclu 10-27-2011 14:41

[SOLVED] Sprites
 
I need to make some sprites appear as checkpoints in my map. I have created a small green sprite file and I wrote the following code:

Code:

public checkpoint_sprite(Float:fOrigin[3])
{               
        new origin[3]
        origin[0] = floatround(fOrigin[0])
        origin[1] = floatround(fOrigin[1])
        origin[2] = floatround(fOrigin[2])
       
        message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
        write_byte(TE_GLOWSPRITE)
        write_coord(origin[0])
        write_coord(origin[1])
        write_coord(origin[2])
        write_short(exploSpr)
        write_byte(99999999999999999999)
        write_byte(30)
        write_byte(100)
        message_end()
}

The problem is that the sprite is always facing the player and sometimes it disappears. Also, if possible, I'd like some transparency gradient (less transparent at the bottom, totally transparent at the top).
Thanks

ANTICHRISTUS 10-27-2011 23:00

Re: Sprites
 
  • I don't know if the weapon floating plugin (by GHW_Chronic) will help you.
  • to make it transparent, make it darkest and remove the black color. afaik, it's like in models.

mabaclu 10-28-2011 09:50

Re: Sprites
 
Quote:

Originally Posted by ANTICHRISTUS (Post 1584631)
  • I don't know if the weapon floating plugin (by GHW_Chronic) will help you.
  • to make it transparent, make it darkest and remove the black color. afaik, it's like in models.

But that plugin only works with models, with sprites I have to use a Half-Life Temp Entity I think.

mabaclu 10-28-2011 10:01

Re: Sprites
 
I want to do something like this (0:00):
http://www.youtube.com/watch?gl=BR&f...&v=q9bwz36rljM

ANTICHRISTUS 10-28-2011 11:06

Re: Sprites
 
you are in the scripting help sub-forum, I gave you an example. editing your post is better than doubling.

mabaclu 10-28-2011 11:14

Re: Sprites
 
I've managed to create a transparent sprite and it works well with TE_GLOWSPRITE, but when the center of it is hidden by a wall, the whole sprite is not seen.
So I used entities as in Chronic's plugin, but when I try to make the sprite transparent with entities it disappears completely.

Code:

entity_set_int(ent,EV_INT_rendermode,kRenderTransAdd);
set_pev(ent,pev_rendermode,kRenderTransAdd);

As you can see, I've tried using Engine and Fakemeta, but the sprite simply disappears with that.

mabaclu 10-29-2011 10:00

Re: Sprites
 
Solved using set_rendering.


All times are GMT -4. The time now is 14:27.

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