Skip to content

OnClientProjectileEffectCreate

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private object OnClientProjectileEffectCreate( Network.Connection sourceConnection, BaseProjectile instance, string prefabName )
{
    Puts( "OnClientProjectileEffectCreate works!" );
    return null;
}

Location

  • BaseProjectile::CreateProjectileEffectClientside(string prefabName, UnityEngine.Vector3 pos, UnityEngine.Vector3 velocity, int seed, Network.Connection sourceConnection, bool silenced, bool forceClientsideEffects, List<Network.Connection> targets, float distanceOverride)
csharp
protected void CreateProjectileEffectClientside(string prefabName, Vector3 pos, Vector3 velocity, int seed, Connection sourceConnection, bool silenced = false, bool forceClientsideEffects = false, List<Connection> targets = null, float distanceOverride = 0f)
{
	if (Interface.CallHook("OnClientProjectileEffectCreate", sourceConnection, this, prefabName) == null)
	{
		Effect effect = reusableInstance;
		effect.InitWithSourceEntity(Effect.Type.Projectile, this, pos, velocity, sourceConnection);
		effect.scale = (silenced ? 0f : 1f);
		if (forceClientsideEffects)
//---

Released under the MIT License.