Raised This Month: $51 Target: $400
 12% 

[CS:GO] Sprites


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 02-06-2016 , 11:08   [CS:GO] Sprites
Reply With Quote #1

Ciao guys,

I am trying to spawn and work with sprites but I got two problems:

1) Cannot change sprite color (I tried different render modes and even SetEntityRenderColor)
2) Seems like sprite cannot be scaled under 0.25 (I would like to go lower)

my code
PHP Code:
if ((iSprite CreateEntityByName("env_sprite")) != -1) {
    
DispatchKeyValue(iSprite"model""materials/something.vmt");
    
    
DispatchKeyValueFloat(iSprite"scale"0.125);    
    
DispatchKeyValue(iSprite"rendercolor""0 255 0");

    
DispatchKeyValue(iSprite"rendermode""0");
    
DispatchKeyValue(iSprite"spawnflags""1");

    
DispatchSpawn(iSprite);
    
TeleportEntity(iSpritefPosNULL_VECTORNULL_VECTOR);

Do you have any ideas guys? Did I miss something?
__________________
Plugins: TeamGames
Includes: Menu stocks, ColorVariables, DownloadTableConfig

> No help through PM, make a topic.
KissLick is offline
xines
Veteran Member
Join Date: Aug 2013
Location: Denmark
Old 02-08-2016 , 12:01   Re: [CS:GO] Sprites
Reply With Quote #2

For color did you remember to use:
PHP Code:
SetEntityRenderMode(iSpriteRENDER_TRANSCOLOR); 
then
PHP Code:
SetEntityRenderColor(iSprite02550255); 
Not sure if this is the case, but give it a try.

Also try adding this untop of "rendercolor"

PHP Code:
DispatchKeyValue(iSprite"RenderAmt""255"); 
RenderAmt = Alpha in RGBA.

For size try:

PHP Code:
DispatchKeyValue(iSprite"scale""0.125"); 
xines is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 02-13-2016 , 18:26   Re: [CS:GO] Sprites
Reply With Quote #3

I found out that I had bad shader in material and that caused the problem with coloring.
However, the scaling doesn't seem to work properly, I can only get sprite to scale like 0.25, 0.5, 0.75, 1.0 etc...

I guess I just have to make the texture smaller...

Anyway, thx for your income! ;-)
__________________
Plugins: TeamGames
Includes: Menu stocks, ColorVariables, DownloadTableConfig

> No help through PM, make a topic.
KissLick is offline
xines
Veteran Member
Join Date: Aug 2013
Location: Denmark
Old 02-13-2016 , 18:40   Re: [CS:GO] Sprites
Reply With Quote #4

Quote:
Originally Posted by KissLick View Post
I found out that I had bad shader in material and that caused the problem with coloring.
However, the scaling doesn't seem to work properly, I can only get sprite to scale like 0.25, 0.5, 0.75, 1.0 etc...

I guess I just have to make the texture smaller...

Anyway, thx for your income! ;-)
No problem !

However did you try to change your:
PHP Code:
DispatchKeyValueFloat(iSprite"scale"0.125); 
To:
PHP Code:
DispatchKeyValue(iSprite"scale""0.125"); 
Not sure if result is the same.
xines is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 02-14-2016 , 11:28   Re: [CS:GO] Sprites
Reply With Quote #5

Quote:
Originally Posted by xines View Post
No problem !

However did you try to change your:
PHP Code:
DispatchKeyValueFloat(iSprite"scale"0.125); 
To:
PHP Code:
DispatchKeyValue(iSprite"scale""0.125"); 
Not sure if result is the same.
Yeah I did, but without success :-/
__________________
Plugins: TeamGames
Includes: Menu stocks, ColorVariables, DownloadTableConfig

> No help through PM, make a topic.
KissLick is offline
xines
Veteran Member
Join Date: Aug 2013
Location: Denmark
Old 02-14-2016 , 11:53   Re: [CS:GO] Sprites
Reply With Quote #6

Quote:
Originally Posted by KissLick View Post
Yeah I did, but without success :-/
Well, i think making the material smaller is the only option then, luckily thats also easier
xines 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 09:30.


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