Change Skin of entitys

Discussion in 'Mapping Questions & Discussion' started by yelta_, Dec 27, 2019.

  1. yelta_

    yelta_ L1: Registered

    Positive Ratings:
    On my koth map I have two prop_statistics sign003.mdl. I want them to quickly change their skin when the point is captured, or while the point is being captured. Something like this:
    while Capturepoint.capturing == True:
    sign003.mld(skin) = random.randrange(0, 6)
    If you understand, what I mean. Is there some way of doing this with the hammer entitys?
  2. Sappykun

    Sappykun L1: Registered

    Positive Ratings:
    I don't believe you can change the skin of a prop_static entity - you'll need to make them both prop_dynamic entities.
    There may be a Skin/SetSkin/ChangeSkin input for
    prop_dynamic entities. If that doesn't exist, you should be able to use AddOutput to change the skin property. Target prop_name with the input AddOutput and send the value skin <n>.
    If you want a random skin, use a logic_case with however many cases you want and send it the input PickRandom/Shuffle.
    Last edited: Dec 28, 2019
  3. Narpas

    aa Narpas Takes way to long to make and update maps

    Positive Ratings:
    Yes, prop_dynamics have a "Skin" input, as is listed on the VDC page. This is how the metal capture point plate changes colour depending on who owns the point. To do what you want to achieve, you should create a logic_timer with the "Refire Interval" keyvalue set to how long in seconds you want between skin cycles, and the "Start Disabled" keyvalue set to True. In the outputs for the trigger_capture_area of your control point, add the outputs "OnStartCap", "OnBreakCap", and "OnEndCap". Have all of them target the logic_timer. Set the input of the "OnStartCap" to "Enable", and the inputs for both the "OnBreakCap" and "OnEndCap" to "Disable". Next, create a logic_case, as Sappy said; add as many "OnCase[Number]" outputs as you want, and have each of them input your prop_dynamic with "Skin" and a parameter override of whichever skin you want for that output. Next, add an "OnTimer" output to your logic_timer, and input the logic_case with either "PickRandom" or "PickRandomShuffle" depending on whether or not you want it to cycle through ever choice before choosing the same one again. I hope this probably-too-in-depth guide helped you!