Item_powerup

Discussion in 'Mapping Questions & Discussion' started by TravisTouchdown, Sep 8, 2016.

  1. TravisTouchdown

    TravisTouchdown L2: Junior Member

    Messages:
    67
    Positive Ratings:
    5
    I was looking threw the entities and was adding in my health and ammo when I found the item_powerup_crit and the item_powerup_uber so I added them into the map. I ran the map but they was not there. Can someone tell me how to get these to work?
     
  2. zahndah

    aa zahndah professional letter

    Messages:
    718
    Positive Ratings:
    627
    Your map needs to be in mannpower mode for this to work. To enable mannpower mode type in the console, sv_cheats 1, then tf_powerup_mode 1.
     
  3. TravisTouchdown

    TravisTouchdown L2: Junior Member

    Messages:
    67
    Positive Ratings:
    5
    I want them to be usable in online play. Maps for my MvM server.

    Will a server that wont have cheats on be able to play the map with them working?
     
  4. Crowbar

    aa Crowbar perfektoberfest

    Messages:
    1,429
    Positive Ratings:
    1,173
    If the server is yours, you sure can.
     
  5. Zeklyn

    Zeklyn L2: Junior Member

    Messages:
    79
    Positive Ratings:
    20
    If you're using a server hoster remember to change the server config or it wont be saved
     
  6. killohurtz

    aa killohurtz Distinction in Applied Carving

    Messages:
    1,003
    Positive Ratings:
    1,155
    The trigger_add_tf_player_condition entity might be a good alternative since it's "hard-coded" into the map, works independently from cvars like sv_cheats, and (I think) can be disabled for bots. You can get mostly the same effects, but it'll take a bit more work to set them up. I can go into more detail if this sounds like something you want.
     
  7. TravisTouchdown

    TravisTouchdown L2: Junior Member

    Messages:
    67
    Positive Ratings:
    5

    Ok could you. I tried entering the tf_powerup_mode 1 command into the server console and it says it not compatable with MVM.
     
  8. killohurtz

    aa killohurtz Distinction in Applied Carving

    Messages:
    1,003
    Positive Ratings:
    1,155
    These will work a little differently than Mannpower powerups since they can't be dropped/picked up again like flags, so this mini-tutorial assumes you're fine with putting them in fixed locations and using a "respawn" timer.

    First you'll need to create these 2 entities and set some keyvalues:
    • trigger_add_tf_player_condition: place this where you want the powerup to be
      • Condition: 5 for uber, 11 for crit (full list)
      • Duration: however long you want it to last
    • prop_dynamic: for the visual representation
      • Name: anything (unique to the powerup)
      • Model: one of the Mannpower icons (filter for "powerup")
      • Collisions: Not Solid
      • Default Animation: spin
    Then go to the trigger's outputs and add these four things:
    • OnStartTouch | !self | Disable | 0.00
    • OnStartTouch | !self | Enable | <desired respawn time in seconds>
    • OnStartTouch | <name of prop> | Disable | 0.00
    • OnStartTouch | <name of prop> | Enable | <desired respawn time in seconds>
    Lastly, switch to the trigger's Flags tab and check Clients and Disallow Bots.

    I can also go through randomizing powerup spawn locations if you'd like.
     
    • Like Like x 1
  9. Powerlord

    Powerlord L3: Member

    Messages:
    124
    Positive Ratings:
    59
    Crit and Uber already work differently from normal Mannpower runes.

    Crit respawned evey 60 seconds and lasted 30 seconds.
    Uber respawned every 180 seconds and lasted 30 seconds.

    Having said that, I think Valve largely removed those two powerups in favor of the Revenge powerup, which is a Crit powerup that only spawned if the the game was "significantly unbalanced" meaning that the other team had a significantly greater percentage of the normal runes than your team did.

    Not that the last part would matter if you're putting them in MvM.

    Useless Side note: In MannPower mode, the actual runes are item_powerup_rune and item_powerup_rune_temp (for Uber/Crit), but there is no way to directly set the rune types as it's not an exposed property. Instead, you had to use item_powerup_crit, item_powerup_uber, and info_powerup_spawn points to spawn them.
     
    • Agree Agree x 1
    Last edited: Sep 9, 2016
  10. TravisTouchdown

    TravisTouchdown L2: Junior Member

    Messages:
    67
    Positive Ratings:
    5
    So the prop_dynamic would be there the entire time, it just would only give the power up at the time I set it to?
     
  11. killohurtz

    aa killohurtz Distinction in Applied Carving

    Messages:
    1,003
    Positive Ratings:
    1,155
    Yes, both of these entities exist all the time, but disabling them just makes them invisible/inactive until re-enabled, simulating a "respawn" time. The trigger is the one giving players the powerup, while the prop does nothing but show players where the trigger is (because triggers are always invisible in-game).