Custom Powerups?

Lain

lobotomy success story
aa
Jan 8, 2015
724
757
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! :)
 

henke37

aa
Sep 23, 2011
2,075
515
Not really possible. But you can attempt to fake it using the condition triggers.
 

Lain

lobotomy success story
aa
Jan 8, 2015
724
757
Oh I know that it's impossible without some triggers ad stuff, that's basically what I am asking.
 

NeonHeights

L1: Registered
Apr 27, 2012
25
5
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.

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
 

Lain

lobotomy success story
aa
Jan 8, 2015
724
757
I would love a VMF, I really suck at entity work at the moment.
 

NeonHeights

L1: Registered
Apr 27, 2012
25
5
I would love a VMF, I really suck at entity work at the moment.

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: