This is specific to this particular effect. No other effect has caused be any trouble to date.
This is the error in question:Code:string fire = "assets/bundled/prefabs/fx/player/onfire.prefab";void doBurningEffects(BaseCombatEntity target) { BasePlayer player = target as BasePlayer; Vector3 entityPosition=target.GetEstimatedWorldPosition(); Vector3 burnPosition=new Vector3(entityPosition.x, entityPosition.y+1f, entityPosition.z); if(player!=null&&burningEntities.ContainsKey(player)) { global::Effect.server.Run(fire, player, 8, burnPosition, burnPosition); timer.Once(2.5f, () => { doBurningEffects(target); }); } }
Seems like the issue is sourceConnection being null. Any idea what to list instead?Code:at (wrapper managed-to-native) UnityEngine.Behaviour:set_enabled (bool) at PrefabInfo.SetBehaviourEnabled (Boolean state) [0x00000] in <filename unknown>:0 at PrefabInfoEx.AwakeFromInstantiate (UnityEngine.GameObject gameObject) [0x00000] in <filename unknown>:0 at EffectLibrary.CreateEffect (System.String strPrefab, .Effect effect) [0x00000] in <filename unknown>:0 at EffectLibrary.GenericEffectSpawn (.Effect effect) [0x00000] in <filename unknown>:0 at EffectLibrary.Run (.Effect fx) [0x00000] in <filename unknown>:0 at EffectNetwork.OnReceivedEffect (Network.Message msg) [0x00000] in <filename unknown>:0 at Client.OnNetworkMessage (Network.Message packet) [0x00000] in <filename unknown>:0 at Facepunch.Network.Raknet.Client.HandleMessage () [0x00000] in <filename unknown>:0
Thank you in advance!
Adding a new burning debuff, having some issues with effects.
Discussion in 'Rust Development' started by rotten, Aug 26, 2017.
-
Attached Files:
Last edited by a moderator: Aug 26, 2017 -
-
Where are you calling this method from? Like a hook, command? That's probably the reason. Also, the actual exception name would be useful to include in the error, not where it errored
-
[DOUBLEPOST=1503803507][/DOUBLEPOST]And yeah, I'm calling it from a hook.Attached Files:
-
-
Which hook?
-
-
Wulf Community Admin
-
-
[DOUBLEPOST=1503845470][/DOUBLEPOST]The error occurs when the effect "plays out". The visual effect lasts for maybe 3 or so seconds, the sound lasts for more. Once the sound ends, this error occurs. Sometimes the effect kicks the player when it's created. -
I've resorted to attaching a FireBall to a player, instead. Thanks for help.
-
-
Wulf Community Admin
-
-
Wulf Community Admin