Custom Powerups?

Discussion in 'Mapping Questions & Discussion' started by Lain, May 8, 2015.

  1. Lain

    aa Lain Resident wrong opinion holder

    Messages:
    733
    Positive Ratings:
    661
    Does anyone has a prefab/tutorial for something like custom powerups? Like, you take it and it gives you an Overheal, Damage Resist or a Speed Boost?

    I probably wont reply for around >10 hours since I am gonna be sleeping after this, but anyone who can help, thanks! :)
     
  2. henke37

    aa henke37

    Messages:
    1,913
    Positive Ratings:
    448
    Not really possible. But you can attempt to fake it using the condition triggers.
     
  3. Lain

    aa Lain Resident wrong opinion holder

    Messages:
    733
    Positive Ratings:
    661
    Oh I know that it's impossible without some triggers ad stuff, that's basically what I am asking.
     
  4. Egan

    aa Egan

    Messages:
    1,318
    Positive Ratings:
    1,507
    Yeah you would be able to use a trigger_add_tf_player_condition for this, as Henke says.

    You could do any of the conditions listed here, set a duration (like of 20 seconds, or 99999 for basically-infinite), and then give the trigger entity an output of: OnTrigger - !self - Disable. You could then add an Enable output on a delay if you want it to be re-enabled thereafter.
     
    • Thanks Thanks x 1
  5. NeonHeights

    NeonHeights L1: Registered

    Messages:
    25
    Positive Ratings:
    5
    This would be your best bet, I believe the OnStartTouch and OnEndTouch of the trigger_add_tf_player_condition dont work properly so you'll have to make a trigger_multiple brush the same size and tell it to disable itself and the tf_player_condition when its touched.

    I recreated a couple powerups from Mann-Power using this method with prop_dynamics to represent the spinning/floating powerup, ambient_generics to trigger the touch sound, and a tf_player_condition to force the actual crit-boost or whatever condition on the player for X seconds.

    I can send you the vmf if youd like so you can see how I did it
     
    • Thanks Thanks x 1
  6. Lain

    aa Lain Resident wrong opinion holder

    Messages:
    733
    Positive Ratings:
    661
    I would love a VMF, I really suck at entity work at the moment.
     
  7. NeonHeights

    NeonHeights L1: Registered

    Messages:
    25
    Positive Ratings:
    5
    No problem! The example included in this VMF toggles crits on you for 10 seconds. The power-up disappears (Is consumed) when you touch it, then respawns after 300 seconds (which totals to 5 minutes). The respawn time can be changed in the outputs on the trigger_multiple.

    Note the prop_dynamic does absolutely nothing except show where the power up is. You can change it to any other model you'd like or sub it out for a func_brush or something. Its just there for looks. The ambient_generic is just there for added effects. LMK if you have any more questions

    https://www.dropbox.com/s/qbzj3ogetktt68i/neonheights_critpowerup.vmf?dl=0

    EDIT: Just noticed I have a bunch of outputs on the tf_add_player_condition. You can delete all of those! They don't do anything. The only outputs that matter are the ones on the trigger_multiple
     
    Last edited: May 14, 2015