Raised This Month: $ Target: $400
 0% 

Sprite in Front of a Players Face?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
panza
SourceMod Donor
Join Date: Feb 2005
Old 02-16-2005 , 10:59   Sprite in Front of a Players Face?
Reply With Quote #1

So here´s a code, token from "unhidden_radio", wich simulates a radiosprite OVER a Head from a specific Player, where "write_coord" is the relative position over his Head.

How can I place a Sprite in front of his Face (increase or decrease x oder y axis relative to his body)??? This would be a funny new way to transmitt some Messages via Sprite!

message_begin( MSG_ONE , SVC_TEMPENTITY, {0,0,0} , player)
write_byte(124)
write_byte(id)
write_coord(35)
write_short(radiosprite)
write_short(600)
message_end()

any Ideas?
panza is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-16-2005 , 13:55  
Reply With Quote #2

TE_PLAYERATTACHMENT can only be used to make things appear directly overtop the player (or perhaps in or under them if using a negative value for the coord), but you can't make it in front of them. Your best bet would be to use TE_SPRITE, although it won't stick to them.

Code:
   //TE_SPRITE (17) - additive sprite, plays 1 cycle    message_begin(MSG_BROADCAST,SVC_TEMPENTITY);    write_byte(17);    write_coord(spriteorigin[0]); // coord, coord, coord (position)    write_coord(spriteorigin[1]);    write_coord(spriteorigin[2]);    write_short(firespr); // short (sprite index)    write_byte(20); // byte (scale in 0.1's)      write_byte(200); // byte (brightness)    message_end();
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
panza
SourceMod Donor
Join Date: Feb 2005
Old 02-16-2005 , 15:31  
Reply With Quote #3

thx. I knew that alternative. But I was hoping that theres a way that the sprite stick at his face for a few seconds and when he rotate, the sprite is rotating too.
panza 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 19:23.


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