Help with breakable objects

Discussion in 'Mapping Questions & Discussion' started by boykevin, Sep 20, 2008.

  1. boykevin

    boykevin L1: Registered

    Messages:
    41
    Positive Ratings:
    0
    im making an arena map and i want to make the func_breakable objects unbreakable until the game actually starts like when the timer goes out to start

    anyway to do that
     
  2. AWESOME-O

    AWESOME-O L10: Glamorous Member

    Messages:
    782
    Positive Ratings:
    66
    can you be more specific?
    Like, do you want it to be breakable when the Capture point get activated, or do you want it to break when the spawn time is over?
     
  3. boykevin

    boykevin L1: Registered

    Messages:
    41
    Positive Ratings:
    0
    i mean i dont want it to be breakable until the round starts
    you know when the arena mode when it starts it has 10 seconds before everyone can move and kill
    i want it to be disabled until the timer goes to 0 and everyone can fight
     
  4. teddyruxpin

    teddyruxpin Sr. Hygiene Technician

    Messages:
    83
    Positive Ratings:
    26
    I see 2 ways you can do this. There is likely a much better methods but these should work.

    1: Create a func_brush that is a bit larger then the object and encase the object with this brush. Set the brush to nodraw texture so it is invisible solid brush and create a OnRoundStart input that will kill this brush when the round starts. You could also tie this to a trigger_multiple in the spawn room to kill when the player passes through it.

    2: Create the object as normal but set its health to '0' this will make the object unbreakable. Then when the game starts using a OnRoundStart or trigger similar to the method above send an output to the object and 'AddHealth' setting it to the amount you wish it to have so it will now break. You could also give it a very large amount of health and use the RemoveHealth output to lower it to an amount that it will break.

    * AddHealth <integer>

    Adds health to the breakable. If the breakable's health reaches zero it will break.

    * RemoveHealth <integer>

    Removes health from the breakable. If the breakable's health reaches zero it will break.

    Hopefully there is an easier method then the above that just allows you to enable / disable the func_breakable but I am not able to see one in the dev wiki.

    -Teddy
     
    • Thanks Thanks x 1
  5. AWESOME-O

    AWESOME-O L10: Glamorous Member

    Messages:
    782
    Positive Ratings:
    66
    I think its doable but i'm not sure how though
     
  6. AWESOME-O

    AWESOME-O L10: Glamorous Member

    Messages:
    782
    Positive Ratings:
    66
    nvm, Teddy beaten me
     
  7. boykevin

    boykevin L1: Registered

    Messages:
    41
    Positive Ratings:
    0
    thanks teddy