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

Issue with SetGlowColor input of prop_dynamic_glow


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kailo
Senior Member
Join Date: Sep 2014
Location: Moscow, Russia
Old 08-23-2015 , 03:53   Issue with SetGlowColor input of prop_dynamic_glow
Reply With Quote #1

I change glow color via
PHP Code:
AcceptEntityInput(entity"SetGlowColor \"255 0 0\""); // also first, i tried "SetGlowColor 255 0 0" 
Colors not changed and i got in console (with "developer 3"):
Code:
unhandled input: (SetGlowColor "255 0 0") -> (prop_dynamic_glow,prop_dynamic_glow)
unhandled input: (SetGlowColor 0 255 0) -> (prop_dynamic_glow,prop_dynamic_glow)
Also i created sipmle map with hammer. prop_dynamic_glow and button for switch glow color, works fine.
Any suggestions for fix this?

Last edited by Kailo; 08-23-2015 at 04:01.
Kailo is offline
Kailo
Senior Member
Join Date: Sep 2014
Location: Moscow, Russia
Old 08-23-2015 , 04:05   Re: Issue with SetGlowColor input of prop_dynamic_glow
Reply With Quote #2

Also i try 2 another inputs, nothing
Code:
unhandled input: (GlowColorRedValue 255) -> (prop_dynamic_glow,prop_dynamic_glow)
unhandled input: (GlowColorGreenValue 0) -> (prop_dynamic_glow,prop_dynamic_glow)
Kailo is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-23-2015 , 04:56   Re: Issue with SetGlowColor input of prop_dynamic_glow
Reply With Quote #3

You need to use one of the SetVariant functions (like SetVariantString or SetVariantColor) to set the actual value and just pass the input name to AcceptEntityInput.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 08-23-2015 at 04:56.
Powerlord is offline
Kailo
Senior Member
Join Date: Sep 2014
Location: Moscow, Russia
Old 08-23-2015 , 05:23   Re: Issue with SetGlowColor input of prop_dynamic_glow
Reply With Quote #4

Powerlord, thank you. I don't know that this works by this way.
My solution:
PHP Code:
stock void SetGlowColor(int entity, const char[] color)
{
    
char colorbuffers[3][4];
    
ExplodeString(color" "colorbufferssizeof(colorbuffers), sizeof(colorbuffers[]));
    
int colors[4];
    for (
int i 03i++)
        
colors[i] = StringToInt(colorbuffers[i]);
    
colors[3] = 255// Set alpha
    
SetVariantColor(colors);
    
AcceptEntityInput(entity"SetGlowColor");

Solved.

Last edited by Kailo; 08-23-2015 at 05:24.
Kailo 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 03:33.


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