I would like to know how it is possible or if it is even possible to stop the airdrop spawned by the supply signal (latest Rust) from spawning
Stopping Supply Signal airdrop from spawning (LUA)
Discussion in 'Rust Development' started by LaserHydra, May 15, 2015.
-
Once you have done this I can help you. -
In the decompiled Assemply file?
-
-
Thats all I found... As I said, im not that great in searching through the decompiled data..
-
Code:public class SupplySignal : TimedExplosive { public SupplySignal() { } public override void Explode() { GameManager gameManager = GameManager.server; Vector3 vector3 = new Vector3(); Quaternion quaternion = new Quaternion(); BaseEntity baseEntity = gameManager.CreateEntity("events/cargo_plane", vector3, quaternion, true); if (baseEntity) { baseEntity.GetComponent<CargoPlane>().InitDropPosition(base.GetEstimatedWorldPosition()); baseEntity.Spawn(true); } Effect.server.Run(this.explosionEffect.resourcePath, this, 0, Vector3.zero, Vector3.up, null, true); base.Invoke("FinishUp", 120f); } public void FinishUp() { base.Kill(BaseNetworkable.DestroyMode.None); } }
-
You mean updating my assembly file? I got the latest Rust version though...
-
-
-
Just use the one that you download when installing oxide.
-
okay.
Got it now:
Code:using System; using UnityEngine;public class SupplySignal : TimedExplosive { public SupplySignal() { } public override void Explode() { GameManager gameManager = GameManager.server; Vector3 vector3 = new Vector3(); Quaternion quaternion = new Quaternion(); BaseEntity baseEntity = gameManager.CreateEntity("events/cargo_plane", vector3, quaternion, true); if (baseEntity) { baseEntity.GetComponent<CargoPlane>().InitDropPosition(base.GetEstimatedWorldPosition()); baseEntity.Spawn(true); } Effect.server.Run(this.explosionEffect.resourcePath, this, 0, Vector3.get_zero(), Vector3.get_up(), null, true); base.Invoke("FinishUp", 120f); } public void FinishUp() { base.Kill(BaseNetworkable.DestroyMode.None); } }
-
-
-
-
-
Write the code to do the following:
Code:function ThrowSignalHook local planes = GetAllCargoPlanes() if planes.length == 1 then planes[0]:Destroy() else local lowestTime = GetSecondsTaken(planes[0]) local lastSpawnedPlane = planes[0] for plane in planes do if GetSecondsTaken(plane) < lowestTime then lowestTime = GetSecondsTaken(plane) lastSpawnedPlane = plane end if end lastSpawnedPlane:Destroy() end if end