Help with breakable objects

boykevin

L1: Registered
Dec 30, 2007
41
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
 

AWESOME-O

L10: Glamorous Member
Mar 20, 2008
779
132
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?
 

boykevin

L1: Registered
Dec 30, 2007
41
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
 

teddyruxpin

Sr. Hygiene Technician
Mar 24, 2008
83
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