So I found a bit of code. if this relates to timed explosives, can it be used to stop a C4 from exploding? Or is this something different.
Code:using UnityEngine;public class TimedRemoval : MonoBehaviour, INeedsToStartDisabled { public Object objectToDestroy; public float removeDelay; public TimedRemoval() { this.removeDelay = 1f; base.\u002Ector(); } private void OnEnable() { Object.Destroy(this.objectToDestroy, this.removeDelay); } }
Stopping C4 from exploding?
Discussion in 'Rust Development' started by DylanSMR, Feb 27, 2016.
-
Why don't you test it and see?
-
Ehh, been busy with something else recently. Decided I would ask you guys.
-
Well just looking at it, it looks like it destroys a specified object after 1 second upon being enabled. You could apply this to any entity it seems. I suppose this could be applied to C4 but I doubt it would just stop the explosion, it would probably remove the C4 itself.
