Displaying a Keyvalue as a message

Discussion in 'Mapping Questions & Discussion' started by biskuu, May 20, 2016.

  1. biskuu

    biskuu L2: Junior Member

    Messages:
    97
    Positive Ratings:
    17
    Hey guys, I am looking for a way to use something like 'game_text' in order to display on-screen to the player the current value of the 'Strength' Keyvalue of a 'func_breakable'.

    Is that at all possible to do? Thanks a lot! :>
     
  2. Egan

    aa Egan

    Messages:
    1,319
    Positive Ratings:
    1,522
    The only way I know how to do it is to use multiple logic_compare to compare the health outputted from the func_breakable using its OnHealthChanged output.

    So make some logic_compare with values set up as 0.75, 0.50, 0.25, 0.05, etc. Set compare value on each to 1. Use OnHealthChanged on the breakable to fire SetCompareValue on each of these using a wildcard target, then 0.05 afterwards (idk if you can do instantly tbh) fire all of their Compare inputs as well. On each logic_compare output OnGreaterThan is where you can trigger the game_text displays (when its value becomes greater than the compare value).

    [​IMG]

    [​IMG]
     
    • Agree Agree x 1
  3. biskuu

    biskuu L2: Junior Member

    Messages:
    97
    Positive Ratings:
    17
    Very interesting, thank you!!