AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   I have a few questions (Entities/Sprites) (https://forums.alliedmods.net/showthread.php?t=306856)

GoldNux 04-16-2018 22:11

I have a few questions (Entities/Sprites)
 
I'm trying to understand how to create and manipulate entities but the tutorials I find are a little weak. Let's say I use the following code to spawn a sprite above a players head:

Code:
                        new vec1[3]             get_user_origin(id, vec1)                         message_begin(MSG_ALL, SVC_TEMPENTITY);             write_byte(TE_PLAYERATTACHMENT);             write_byte(id);             write_coord(80);             write_short(g_flash_sprite);             write_short(200);             message_end();

First I would like to know how to move the sprite.
I know I can change "write_coord", but it only makes it go higher.
What if I want to make it go to the left or right?

I have tried to insert coordinates but it crashed my server.
I would also like to know what part of the coordinates that define height etc.

I also want to know how to change the scale of my sprite.
And how to make a transparent sprite. I have downloaded four different software and followed many guides and I just can't make the tranparency work.

1. I create a 72x72 .bmp file, with the transparent part totally black and the rest in grey/white.
2. I convert it to 256 colors with a software
3. I load it in Sprite Explorer and export a .spr file with the additive transparency setting.

I have downloaded other peoples sprites and they seem to work, but not my own.

Thank you very much!


All times are GMT -4. The time now is 04:44.

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