Why can't i scale a model using math_counter

Discussion in 'Mapping Questions & Discussion' started by circl, Oct 8, 2019.

  1. circl

    circl L1: Registered

    Messages:
    29
    Positive Ratings:
    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.
     
  2. Da Spud Lord

    aa Da Spud Lord L0: Crappy Member

    Messages:
    1,127
    Positive Ratings:
    769
    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).
     
  3. circl

    circl L1: Registered

    Messages:
    29
    Positive Ratings:
    0
    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.