1. Oxide for Rust Legacy has been discontinued and is no longer supported. No updates or additions will be made, and Rust Legacy-specific plugin submissions will no longer be accepted. We recommend upgrading to the latest version of Rust as able.
    Dismiss Notice
  1. mcnovinho08

    mcnovinho08 Wood Hoarder Plugin Developer

    Hello, how can I detect the c4 in the structure, even if it does not take damage.
  2. totalgaming-NL

    totalgaming-NL Scavenger

    how do you mean
  3. #KodakPlay!!!

    #KodakPlay!!! Scavenger Plugin Developer

    Code (Text):
     void CheckPositionExplosive(DeployableObject deployedEntity, IDeployableItem deployableItem){
                if(Vector3.Distance(deployedEntity.transform.position < + 5f)
                    deployableItem.character.GetComponent<Inventory>().AddItemAmount(deployableItem.datablock, 1);
    Code (Text):
    void OnItemDeployed(DeployableObject component, IDeployableItem item){
                         cachedCollider = cachedhitInstance.physicalColliderReferenceOnly;
                         if (cachedCollider == null) return null;
                         if (!(cachedCollider.gameObject.name.Contains("Wall"))) return null;
                         if(deployedEntity.GetComponent<TimedExplosive>() || deployedEntity.GetComponent<TimedGrenade>())
                               timer.Once(0.2f, () => CheckPositionExplosive(deployedEntity, deployableItem));
    Is this what you wanted?
    Last edited by a moderator: Aug 4, 2017