Help me plan this demoman thing

Discussion in 'Mapping Questions & Discussion' started by bob+M|M+, Apr 23, 2008.

  1. bob+M|M+

    bob+M|M+ L6: Sharp Member

    Messages:
    348
    Positive Ratings:
    185
    I have limited time when I can use a PC, so I'd like to plan this in advance.

    I want to make a glass window that will break and explode upon a sticky/pipe TOUCH, but not allow a player to pass unless broken. The glass will respawn a couple seconds later. I also want the sticky/pipe to dissapear upon impact.

    [​IMG]

    a lot of this stuff will be new to me so I'm not really sure where to start. (Is this even possible?) Any comments greatly appreciated. I just need something to point me in the right direction. (maybe an entity list?)

    Thanks,
    bob
     
  2. bob+M|M+

    bob+M|M+ L6: Sharp Member

    Messages:
    348
    Positive Ratings:
    185
  3. Pseudo

    Pseudo L6: Sharp Member

    Messages:
    319
    Positive Ratings:
    149
    I think this is possible. The window will be a func_breakable. Set the "Material Type" to Glass and check the "Only Break on Trigger" flag.

    Make a trigger_multiple in front of the window. Stickybombs and pipes are physics objects, so they will activate a trigger_multiple with the "Applies to Physics Objects" flag checked. Uncheck the "Applies to Clients" flag so that players will not trigger it. OnStartTouch send the window a Break input.

    To remove the object that hit the window, have OnStartTouch with the target !activator. Send this target a Kill input. Break might work for these also. To make it so the trigger doesn't kill bombs after the window is broken, have it send itself a Disable input.

    To make the window respawn, create a point_template. For the Template01 keyvalue, select the window. Check both the "Don't remove template entities" and "Preserve entity names" flags. Add another OnStartTouch to the trigger_multiple to send the point_template a ForceSpawn input. Give this input a delay of however many seconds you want. The point_template would then have an output OnEntitySpawned Enable the trigger_multiple.
     
    • Thanks Thanks x 3
  4. bob+M|M+

    bob+M|M+ L6: Sharp Member

    Messages:
    348
    Positive Ratings:
    185
    wow! Thanks Pseudo I appreciate it. You probably saved me like 6 hours of work!
     
  5. DJive

    aa DJive Cake or Death?

    Messages:
    1,466
    Positive Ratings:
    736
    Give a thank =)
     
  6. bob+M|M+

    bob+M|M+ L6: Sharp Member

    Messages:
    348
    Positive Ratings:
    185
    ah of course how did I miss that. -_-

    thanks again : ]
     
    Last edited: Apr 27, 2008
  7. Vander

    Vander L8: Fancy Shmancy Member

    Messages:
    507
    Positive Ratings:
    111
    /bow Psuedo is da man!
     
  8. bob+M|M+

    bob+M|M+ L6: Sharp Member

    Messages:
    348
    Positive Ratings:
    185
    Ok so I tried out what you suggested Psuedo. Unfortunately the trigger_multiple can't be activated by the stickies/pipes under any condition. (internal hammer/tf2 problem I assume)

    func_breakable DID however break quite nicely from the pipes/stickies when you check "only physics objects" and I got everything to work from using the OnBreak output.

    The problem I'm dealing with now is if a sticky/pipe or player is in the respawn area of the window when it respawns, the game crashes. ~_~

    (btw "kill" worked perfectly in conjunction with !activator to silently remove the pipes/stickies. "break" did nothing though)
     
    Last edited: Apr 27, 2008
  9. Pseudo

    Pseudo L6: Sharp Member

    Messages:
    319
    Positive Ratings:
    149
    Two ideas: A trigger_push in the window area maybe. Start it disabled. Check the "applies to clients" and "applies to physics objects" flags. Set the push direction and speed. When you want the window to respawn, Enable the trigger_push, have a delay of a second or two, then disable the trigger_push and spawn the window. I'm not sure if it will push a sticky that is attached to a wall. You can make the area around the window a func_brush to prevent stickies from sticking to it.

    Another option, and it may work better if you used both the trigger_push and this, would be to use a env_entity_maker. This is like a more advanced version of the point_template (you'll need to keep the point_template though). Set it up to spawn your point_template. In the maker's flags, check "ForceSpawn: Only if there's room". You'll then be sending the env_entity_maker the ForceSpawn input instead of the template. You could add a OnEntityFailedSpawn output to the maker with a delay of several seconds to ForceSpawn again, so that it will keep trying to spawn the window until the area is clear.
     
    • Thanks Thanks x 1
    Last edited: Apr 27, 2008
  10. bob+M|M+

    bob+M|M+ L6: Sharp Member

    Messages:
    348
    Positive Ratings:
    185
    wow tf2 for hammer is really buggy. trigger_push also doesn't work for pipe/stickies under any circumstance -_-

    but I used the env_entity_maker and now it doesn't crash anymore so it's all good

    For some reason the window still spawns on you regardless if you are in the way resulting in you getting stuck, but in that situation you can bottle yourself out which is fine.

    much thanks Pseudo :)