The Delayed Physics package provides a single script. Adding this script to an entity will enable physics on the entity when it takes damage.
This is useful in tandem with the gunScript’s impact physics property.
The primary reason this is useful is because placing physics enabled objects in the world can have unexpected effects, such as objects falling through the floor before it’s loaded, or an object spawning inside of one, causing it to fly off in space.
With this package, your entities can safely be placed whereever you like and will stay there until you shoot them.
- Install the Delayed Physics package
delayedPhysicsScriptto anything you want to apply physics to on damage
You will typically want to reset all of the entities when the round starts. If you’re using the gameScript, you can assign the
Reset function of
onRoundStart to achieve this.