Why can't i scale a model using math_counter

circl

L1: Registered
Jul 24, 2019
29
0
Code:
!! ERROR: bad input/output link:
!! prop_dynamic(happy-barrel,SetModelScale) doesn't match type from math_counter(barrel-size-control)
I keep getting this but i don't know why. I will provide more info if you ask.
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
The reason for the error is because math_counter outputs a "float" (floating-point number, which is fancy computer lingo for a single number with a decimal), while prop_dynamic's SetModelScale input accepts a "vector", which is a series of multiple values. In this case, SetModelScale accepts two values: one for the new scale of the model, and the second for the number of seconds the model should take to resize itself.

As per how this difference can be rectified? Beats me. No entity that I know of can convert numbers to vectors. A few entities, like logic_lineto, are capable of outputting vectors, but those aren't meant to be general purpose and could be tricky to use, as well as possibly outputting vectors with too many values (which may or may not be an issue).
 

circl

L1: Registered
Jul 24, 2019
29
0
The reason for the error is because math_counter outputs a "float" (floating-point number, which is fancy computer lingo for a single number with a decimal), while prop_dynamic's SetModelScale input accepts a "vector", which is a series of multiple values. In this case, SetModelScale accepts two values: one for the new scale of the model, and the second for the number of seconds the model should take to resize itself.

As per how this difference can be rectified? Beats me. No entity that I know of can convert numbers to vectors. A few entities, like logic_lineto, are capable of outputting vectors, but those aren't meant to be general purpose and could be tricky to use, as well as possibly outputting vectors with too many values (which may or may not be an issue).
Ah, might as well write down all the values I want to use into a logic_case and call it a day. For the vector part, I didn't realize that since it will accept a single float since I don't need the resize time anyway. Starting out in map making but I grasped floats and vectors before I knew how to open hammer.