hey,
i'm spawning a smoke prefab with Effect.server.Run("assets/bundled/prefabs/fx/smoke/generator_smoke.prefab", airplane.transform.position, Vector3.up, null, true);
But the prefab isnt kill himself. How can i set a alive time or kill the prefab?
Destroying/killing an effect prefab?
Discussion in 'Rust Development' started by Sir BenSon, Nov 8, 2016.
-
Wulf Community Admin
You'd have kill the entity it created I believe. So you'd need to scan for or find what entity it is.
-
I tested to create a prefab but i cant create an prefab. How to create a prefab?
Code:var ent = GameManager.server.CreatePrefab("assets/bundled/prefabs/fx/smoke/generator_smoke.prefab", airplane.transform.position, new Quaternion()); ent.Spawn(); //<- Doesn't work timer.Once(time, () => { ent.Kill(); //<- Doesn't work SpawnEntity(time); });Last edited by a moderator: Nov 9, 2016
