Solved] Button doesn't reset after winning

Discussion in 'Mapping Questions & Discussion' started by Veliass, Jan 15, 2017.

  1. Veliass

    Veliass L1: Registered

    Messages:
    18
    Positive Ratings:
    4
    So i'm making a deathrun map. But i have a problem. After winning, the buttons doesn't reset. Can you help me ?
     
  2. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,071
    Positive Ratings:
    832
    Hello, there. Welcome to tf2maps.net. I am a fellow Deathrun mapper. I made dr_castle_steveh, am working on dr_steamworks_extreme and helped out a little with dr_bank.

    When a round changes in TF2, nearly every entity resets. There are some exceptions but nothing that would normally interfere with your trap logic. If you have entities that aren't resetting, then either the round has not changed or your trap logic is broken. If you send me your VMF or a recently-compiled BSP I will take a look.
     
  3. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,071
    Positive Ratings:
    832
    When you test a Deathrun map locally, the game treats it as a box with no game mode, so if all the players on one team die, they just respawn and there is never a winner. If you run a map on a server with a deathrun plugin enabled it gets treated as if it's an arena map, so players never respawn and when one team is all dead the other is declared the victor and the map is reset.

    If you want to simulate a round reset when running your map locally, there are a couple of ways to do it.
    1. Insert a tf_logic_arena entity in your map. In order to play test it you require a player on each team, so you will need to spawn a puppet bot using the console command bot.
    2. Trigger a round win for the team of your choice by sending RoundWin to a game_round_win entity. You can have one configured for each team.
    The console command mp_restartgame 1 will reset the map whenever you like. I've tested it with your map, and the traps are reset.
     
    • Thanks Thanks x 1
  4. Veliass

    Veliass L1: Registered

    Messages:
    18
    Positive Ratings:
    4
    Ok, thank you so much.
     
    • Like Like x 1