SlashCo Wiki

SlashCo.BustDoor

  SlashCo.BustDoor( Player slasher, Entity target, number or Vector force, function callback, any noRecursive )

Description

Opens and then breaks every door entity sharing target's name within 100 units, replacing them with physical sc_broken_door props that get pushed away by force.
The callback is invoked with false if target is invalid, if no matching door was found, or if slasher became invalid while the doors were breaking.

Arguments

1Player slasher

The slasher busting the door, used as the origin for the applied force

2Entity target

A door entity; every door sharing its name is busted

3number or Vector force

The force applied to the broken door props. A number is applied along the slasher's forward direction

4function callback

Called once with (success, props) once the doors have been busted, or with (false) on failure

5any noRecursive

Unused