Raised This Month: $ Target: $400
 0% 

[SOLVED] Sprites


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mabaclu
Senior Member
Join Date: Jun 2010
Location: Portugal
Old 10-27-2011 , 14:41   [SOLVED] Sprites
Reply With Quote #1

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
__________________

Last edited by mabaclu; 10-29-2011 at 10:00. Reason: Solved
mabaclu is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 10-27-2011 , 23:00   Re: Sprites
Reply With Quote #2

  • 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.
__________________
ANTICHRISTUS is offline
mabaclu
Senior Member
Join Date: Jun 2010
Location: Portugal
Old 10-28-2011 , 09:50   Re: Sprites
Reply With Quote #3

Quote:
Originally Posted by ANTICHRISTUS View Post
  • 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 is offline
mabaclu
Senior Member
Join Date: Jun 2010
Location: Portugal
Old 10-28-2011 , 10:01   Re: Sprites
Reply With Quote #4

I want to do something like this (0:00):
http://www.youtube.com/watch?gl=BR&f...&v=q9bwz36rljM
__________________
mabaclu is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 10-28-2011 , 11:06   Re: Sprites
Reply With Quote #5

you are in the scripting help sub-forum, I gave you an example. editing your post is better than doubling.
__________________
ANTICHRISTUS is offline
mabaclu
Senior Member
Join Date: Jun 2010
Location: Portugal
Old 10-28-2011 , 11:14   Re: Sprites
Reply With Quote #6

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.
__________________

Last edited by mabaclu; 10-28-2011 at 20:44.
mabaclu is offline
mabaclu
Senior Member
Join Date: Jun 2010
Location: Portugal
Old 10-29-2011 , 10:00   Re: Sprites
Reply With Quote #7

Solved using set_rendering.
__________________
mabaclu is offline
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 14:27.


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