I'm working on a Garry's Mod map and I want a brush to cycle through rainbow colors--I set the brush to the "Color" rendermode and left it all at default 255 values, I have 3 math_colorblend entities to cycle through colors (M->Y,Y->C,C->M), a math_counter with a logic timer that updates the value by 1 every 0.25s, and every time the counter hits its max value of 101, it fires an output to a logic_case/math_counter that tells the brush which colorblend entity that cycles between 1-3. The trouble is I'm trying to use the logic_case to tell the brush which color to use between the 3 blending entities as e.g.
OnCase01 colorblend1 AddOutput OutColor coreColor:Color::0:-1
or
OnCase01 coreColor AddOutput OutColor colorblend1:Color::0:-1
neither of which change the color. I'm not very familiar with AddOutput but I can't seem to find another way to do so that will let me "switch" between math_colorblends.
#Setting Color Through AddOutput
1 messages · Page 1 of 1 (latest)
Use lua
I don't have any lua experience--I think it would just be easier for me if I could change math_colorblend's colormin and colormax keyvalues on the fly with AddOutput but at runtime it doesn't want to change and I can't figure out why.
Addoutput would be a good way to do it
If for example you have 3 math colorblend in a point template, so you can respawn them at any time, that will help too
The 3 colorblend would basically not have any output on them per default
And you would addoutput on only the one you want, an output to send its color to a brush
And when you wanna change which colorblend is used, you can kill all 3 of them, and spawn the point template to make them spawn again
And you can then addoutput on a new one
@abstract pivot
I don't know how your whole system is right now, but you should be able to do this
I dunno if you want a logic case, with pickrandom to pick the next color blend
Or just like, go from one to another
Shouldn't be hard either way
Aye! Thank you for the pointers, I’m glad I wasn’t totally off-base :) I’ll update if any issues crop up
also just saw the exact output you used
the syntax here is incorrect for addoutput
Addoutput got 2 way to be used
Add a new output:
OnWhatever > entity > AddOutput >
outputname entity:input:parameter:delay:once_or_more> delay
what's important to see is that between the outputname and the entity, there is no :
whereas, there is a : for the other parameters
Modify key values of an entity: (wont work for everything in game/entity wont get updated)
OnWhatever > entity > AddOutput >
key new_value> delay
@abstract pivot
so assuming changing colormin and colormax value is possible
but it may not have any effect on this entity, cause i assume the entity is kinda initialized with its hammer values when it spawn
OnUser1 > !self > AddOutput > colormax 255 255 0 > delay=0
OnUser1 > !self > AddOutput > colormin 255 0 255 > delay=0
as you can see, compared to what you had in your image, there is no :