AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Sprite in Front of a Players Face? (https://forums.alliedmods.net/showthread.php?t=10340)

panza 02-16-2005 10:59

Sprite in Front of a Players Face?
 
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?

XxAvalanchexX 02-16-2005 13:55

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();

panza 02-16-2005 15:31

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.


All times are GMT -4. The time now is 19:23.

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