private void DoSafeExplosion(Vector2 position) { ExplosionData data = DataCloners.CopyExplosionData(GameManager.Instance.Dungeon.sharedSettingsPrefab.DefaultExplosionData); data.ignoreList.Add(Owner.specRigidbody); Exploder.Explode(position, data, Vector2.zero); }
private void Start() { this.m_projectile = base.GetComponent <Projectile>(); BulletScriptSource source = this.m_projectile.gameObject.GetOrAddComponent <BulletScriptSource>(); this.m_projectile.gameObject.AddComponent <BulletSourceKiller>(); var bulletScriptSelected = new CustomBulletScriptSelector(typeof(GunjurerSlamPlayerScript)); AIBulletBank bulletBank = DataCloners.CopyAIBulletBank(EnemyDatabase.GetOrLoadByGuid("206405acad4d4c33aac6717d184dc8d4").bulletBank); bulletBank.OnProjectileCreated += this.OnBulletSpawned; foreach (AIBulletBank.Entry bullet in bulletBank.Bullets) { bullet.BulletObject.GetComponent <Projectile>().BulletScriptSettings.preventPooling = true; } source.BulletManager = bulletBank; source.BulletScript = bulletScriptSelected; source.Initialize();//to fire the script once GunjurerSlamPlayerScript spawnedScript = source.RootBullet as GunjurerSlamPlayerScript; spawnedScript.aimDirection = this.m_projectile.Direction.ToAngle(); /*if (this.m_projectile.ProjectilePlayerOwner() != null) * { * spawnedScript.overrideSpeed *= this.m_projectile.ProjectilePlayerOwner().stats.GetStatValue(PlayerStats.StatType.ProjectileSpeed); * }*/ }
protected override void OnPickedUpByPlayer(PlayerController player) { if (DataForProjectiles == null) { DataForProjectiles = DataCloners.CopyExplosionData(StaticExplosionDatas.explosiveRoundsExplosion); } if (!DataForProjectiles.ignoreList.Contains(player.specRigidbody)) { DataForProjectiles.ignoreList.Add(player.specRigidbody); } base.OnPickedUpByPlayer(player); }
private void Update() { foreach (Projectile proj in StaticReferenceManager.AllProjectiles) { if (proj && proj.Owner != null) { if (proj.Owner is PlayerController) { if (proj.GetComponent <FerroboltOrbController>()) { if (Vector2.Distance(proj.sprite.WorldCenter, m_projectile.sprite.WorldCenter) < 1) { ExplosionData boom = DataCloners.CopyExplosionData(StaticExplosionDatas.explosiveRoundsExplosion); boom.ignoreList.Add(proj.Owner.specRigidbody); Exploder.Explode(proj.sprite.WorldCenter, boom, Vector2.zero); proj.DieInAir(); m_projectile.DieInAir(); } } } } } }
private void OnHitEnemy(Projectile bullet, SpeculativeRigidbody enemy, bool fatal) { if (bullet.Owner is PlayerController && (bullet.Owner as PlayerController).PlayerHasActiveSynergy("Parallel Lines")) { if (UnityEngine.Random.value <= 0.1f) { if (UnityEngine.Random.value <= 0.5f) { GameObject silencerVFX = (GameObject)ResourceCache.Acquire("Global VFX/BlankVFX_Ghost"); AkSoundEngine.PostEvent("Play_OBJ_silenceblank_small_01", base.gameObject); GameObject gameObject = new GameObject("silencer"); SilencerInstance silencerInstance = gameObject.AddComponent <SilencerInstance>(); float additionalTimeAtMaxRadius = 0.25f; silencerInstance.TriggerSilencer(bullet.specRigidbody.UnitCenter, 25f, 5f, silencerVFX, 0f, 3f, 3f, 3f, 250f, 5f, additionalTimeAtMaxRadius, bullet.Owner as PlayerController, false, false); } else { ExplosionData data = DataCloners.CopyExplosionData(StaticExplosionDatas.explosiveRoundsExplosion); data.ignoreList.Add(bullet.ProjectilePlayerOwner().specRigidbody); Exploder.Explode(bullet.specRigidbody.UnitCenter, data, Vector2.zero); } } } }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Butchers Knife", "butchersknife"); Game.Items.Rename("outdated_gun_mods:butchers_knife", "nn:butchers_knife"); var behav = gun.gameObject.AddComponent <ButchersKnife>(); behav.preventNormalReloadAudio = true; behav.preventNormalFireAudio = true; behav.overrideNormalFireAudio = "Play_WPN_blasphemy_shot_01"; gun.gunSwitchGroup = (PickupObjectDatabase.GetById(417) as Gun).gunSwitchGroup; gun.SetShortDescription("Word of Kaliber"); gun.SetLongDescription("Cuts enemies to bits." + "\n\nForged and sharpened by a Gun Cultist who believed she heard the voice of Kaliber speaking to her... asking her for a sacrifice... her son."); gun.SetupSprite(null, "butchersknife_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 16); gun.SetAnimationFPS(gun.chargeAnimation, 8); gun.SetAnimationFPS(gun.reloadAnimation, 1); gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false); gun.AddPassiveStatModifier(PlayerStats.StatType.Curse, 2f, StatModifier.ModifyMethod.ADDITIVE); //GUN STATS gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.Charged; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.DefaultModule.cooldownTime = 1f; gun.gunClass = GunClass.CHARGE; gun.DefaultModule.angleVariance = 1f; gun.DefaultModule.numberOfShotsInClip = 1; Projectile projectile = DataCloners.CopyFields <SuperPierceProjectile>(Instantiate(gun.DefaultModule.projectiles[0])); gun.DefaultModule.projectiles[0] = projectile; projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); projectile.baseData.damage *= 0.2f; projectile.baseData.speed *= 0.7f; projectile.pierceMinorBreakables = true; projectile.AdditionalScaleMultiplier *= 1f; projectile.baseData.range *= 1000f; projectile.SetProjectileSpriteRight("butchersknife_projectile", 29, 7, false, tk2dBaseSprite.Anchor.MiddleCenter, 35, 14); projectile.specRigidbody.CollideWithTileMap = false; NoCollideBehaviour nocollide = projectile.gameObject.GetOrAddComponent <NoCollideBehaviour>(); nocollide.worksOnEnemies = false; nocollide.worksOnProjectiles = true; PierceProjModifier pierce = projectile.gameObject.GetOrAddComponent <PierceProjModifier>(); pierce.penetration = 1000; TickDamageBehaviour tickdmg = projectile.gameObject.GetOrAddComponent <TickDamageBehaviour>(); tickdmg.damageSource = "Butchers Knife"; tickdmg.starterDamage = 3f; ProjectileModule.ChargeProjectile chargeProj = new ProjectileModule.ChargeProjectile { Projectile = projectile, ChargeTime = 0f, }; gun.DefaultModule.chargeProjectiles = new List <ProjectileModule.ChargeProjectile> { chargeProj }; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("ButchersKnife Clip", "NevernamedsItems/Resources/CustomGunAmmoTypes/butchersknife_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/butchersknife_clipempty"); gun.reloadTime = 5f; gun.SetBaseMaxAmmo(35); gun.quality = PickupObject.ItemQuality.S; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).wrapMode = tk2dSpriteAnimationClip.WrapMode.LoopSection; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).loopStart = 0; ETGMod.Databases.Items.Add(gun, null, "ANY"); gun.barrelOffset.transform.localPosition = new Vector3(0.87f, 0.25f, 0f); ButchersKnifeID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Guneonate", "guneonate"); Game.Items.Rename("outdated_gun_mods:guneonate", "nn:guneonate"); var behav = gun.gameObject.AddComponent <Guneonate>(); behav.overrideNormalFireAudio = "Play_VO_bashellisk_hiss_01"; behav.overrideNormalReloadAudio = "Play_BOSS_bashellisk_swallow_01"; behav.preventNormalFireAudio = true; behav.preventNormalReloadAudio = true; gun.SetShortDescription("Babyconda"); gun.SetLongDescription("A hatchling ammoconda, formed from fresh discarded bullet casings." + "\n\nIt seems to have self esteem issues."); gun.SetupSprite(null, "guneonate_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 10); gun.SetAnimationFPS(gun.idleAnimation, 10); gun.SetAnimationFPS(gun.reloadAnimation, 1); gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false); //GUN STATS gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 1f; gun.DefaultModule.cooldownTime = 0.45f; gun.DefaultModule.angleVariance = 0; gun.DefaultModule.numberOfShotsInClip = 3; gun.barrelOffset.transform.localPosition = new Vector3(2.0f, 0.25f, 0f); gun.SetBaseMaxAmmo(200); gun.ammo = 200; gun.gunClass = GunClass.SILLY; //BULLET STATS HelixProjectileButLessShit projectile = DataCloners.CopyFields <HelixProjectileButLessShit>(Instantiate(gun.DefaultModule.projectiles[0])); projectile.SpawnShadowBulletsOnSpawn = true; projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); projectile.baseData.damage *= 2f; projectile.baseData.force *= 1f; projectile.baseData.speed *= 0.5f; projectile.baseData.range *= 2f; PierceProjModifier pierce = projectile.gameObject.GetOrAddComponent <PierceProjModifier>(); pierce.penetration++; pierce.penetratesBreakables = true; //AutoDoShadowChainOnSpawn snakeness = projectile.gameObject.GetOrAddComponent<AutoDoShadowChainOnSpawn>(); projectile.NumberInChain = 5; projectile.pauseLength = 0.05f; projectile.SetProjectileSpriteRight("12x12_yellowenemy_projectile", 12, 12, true, tk2dBaseSprite.Anchor.MiddleCenter, 10, 10); gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Guneonate Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/guneonate_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/guneonate_clipempty"); gun.DefaultModule.projectiles[0] = projectile; gun.quality = PickupObject.ItemQuality.S; ETGMod.Databases.Items.Add(gun, null, "ANY"); GuneonateID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("W3irdstar", "w3irdstar"); Game.Items.Rename("outdated_gun_mods:w3irdstar", "nn:w3irdstar"); var behav = gun.gameObject.AddComponent <W3irdstar>(); behav.overrideNormalFireAudio = "Play_WPN_seriouscannon_shot_01"; behav.preventNormalFireAudio = true; gun.SetShortDescription("Weird Champion"); gun.SetLongDescription("This wiggly weapon proves that we are all made of... star... squooge."); gun.SetupSprite(null, "w3irdstar_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 10); gun.SetAnimationFPS(gun.idleAnimation, 10); gun.SetAnimationFPS(gun.reloadAnimation, 1); gun.SetAnimationFPS(gun.chargeAnimation, 6); gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false); GameObject bulletDeath = VFXToolbox.CreateVFX("W3irdstar MidairDeath", new List <string>() { "NevernamedsItems/Resources/MiscVFX/GunVFX/W3irdstar/w3irdstar_impact_001", "NevernamedsItems/Resources/MiscVFX/GunVFX/W3irdstar/w3irdstar_impact_002", "NevernamedsItems/Resources/MiscVFX/GunVFX/W3irdstar/w3irdstar_impact_003", "NevernamedsItems/Resources/MiscVFX/GunVFX/W3irdstar/w3irdstar_impact_004", }, 15, //FPS new IntVector2(20, 20), //Dimensions tk2dBaseSprite.Anchor.MiddleCenter, //Anchor false, //Uses a Z height off the ground 0 //The Z height, if used ); gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).wrapMode = tk2dSpriteAnimationClip.WrapMode.LoopSection; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).loopStart = 2; //GUN STATS gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.Charged; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 1f; gun.DefaultModule.cooldownTime = 0.45f; gun.DefaultModule.angleVariance = 0; gun.DefaultModule.numberOfShotsInClip = 2; gun.barrelOffset.transform.localPosition = new Vector3(35f / 16f, 12f / 16f, 0f); gun.SetBaseMaxAmmo(80); gun.ammo = 80; gun.gunClass = GunClass.SILLY; GameObject baseproj = gun.DefaultModule.projectiles[0].gameObject.InstantiateAndFakeprefab(); gun.DefaultModule.projectiles[0] = baseproj.GetComponent <Projectile>(); //BULLET STATS HelixProjectileButLessShit projectile = DataCloners.CopyFields <HelixProjectileButLessShit>(Instantiate(gun.DefaultModule.projectiles[0])); projectile.SpawnShadowBulletsOnSpawn = false; projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); projectile.baseData.damage = 20f; projectile.baseData.force *= 2f; projectile.baseData.speed *= 0.5f; projectile.baseData.range = 12f; projectile.hitEffects.overrideMidairDeathVFX = bulletDeath; projectile.hitEffects.alwaysUseMidair = true; projectile.SetProjectileSpriteRight("w3irdstar_largeproj", 20, 20, true, tk2dBaseSprite.Anchor.MiddleCenter, 10, 10); EvenRadialBurstHandler burst = projectile.gameObject.AddComponent <EvenRadialBurstHandler>(); burst.numberToSpawn = 40; burst.PostProcess = false; //MINI BULLETS GameObject split = (PickupObjectDatabase.GetById(56) as Gun).DefaultModule.projectiles[0].gameObject.InstantiateAndFakeprefab(); HelixProjectileButLessShit projectile2 = DataCloners.CopyFields <HelixProjectileButLessShit>(split.GetComponent <Projectile>()); projectile2.SpawnShadowBulletsOnSpawn = false; projectile2.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile2.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile2); projectile2.baseData.damage = 5f; projectile2.baseData.range = 20f; projectile2.hitEffects.overrideMidairDeathVFX = bulletDeath; projectile2.hitEffects.alwaysUseMidair = true; projectile2.SetProjectileSpriteRight("w3irdstar_smallproj", 12, 12, true, tk2dBaseSprite.Anchor.MiddleCenter, 6, 6); burst.projectileToSpawn = projectile2; ProjectileModule.ChargeProjectile chargeproj = new ProjectileModule.ChargeProjectile { Projectile = projectile, ChargeTime = 0.5f, }; gun.DefaultModule.chargeProjectiles = new List <ProjectileModule.ChargeProjectile> { chargeproj }; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("W3irdstar Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/w3irdstar_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/w3irdstar_clipempty"); gun.quality = PickupObject.ItemQuality.A; ETGMod.Databases.Items.Add(gun, null, "ANY"); W3irdstarID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("The Thin Line", "thinline"); Game.Items.Rename("outdated_gun_mods:the_thin_line", "nn:the_thin_line"); gun.gameObject.AddComponent <TheThinLine>(); gun.SetShortDescription("Scienced To The Max"); gun.SetLongDescription("A slimmed down, pocket version of the tachyon projectile emmitter known as the Fat Line." + "\n\nIt's projectiles defy each other, and have volatile effects upon meeting."); gun.SetupSprite(null, "thinline_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 10); gun.gunSwitchGroup = (PickupObjectDatabase.GetById(562) as Gun).gunSwitchGroup; for (int i = 0; i < 2; i++) { gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false); } //GUN STATS gun.reloadTime = 1f; gun.barrelOffset.transform.localPosition = new Vector3(1.37f, 0.87f, 0f); gun.SetBaseMaxAmmo(260); gun.ammo = 200; gun.gunClass = GunClass.PISTOL; foreach (ProjectileModule mod in gun.Volley.projectiles) { mod.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic; mod.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; mod.cooldownTime = 0.20f; mod.numberOfShotsInClip = 6; mod.angleVariance = 0f; if (mod != gun.DefaultModule) { Projectile projectile = DataCloners.CopyFields <TachyonProjectile>(Instantiate(mod.projectiles[0])); projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); projectile.baseData.damage *= 2f; projectile.baseData.speed *= 0.5f; projectile.pierceMinorBreakables = true; ThinLineCollidee collidee = projectile.gameObject.GetOrAddComponent <ThinLineCollidee>(); mod.ammoCost = 0; projectile.AnimateProjectile(new List <string> { "thinline_pinkproj_001", "thinline_pinkproj_002", "thinline_pinkproj_003", "thinline_pinkproj_004", "thinline_pinkproj_005", "thinline_pinkproj_006", }, 10, true, new List <IntVector2> { new IntVector2(10, 10), new IntVector2(10, 10), new IntVector2(10, 10), new IntVector2(10, 10), new IntVector2(10, 10), new IntVector2(10, 10), }, AnimateBullet.ConstructListOfSameValues(true, 6), AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 6), AnimateBullet.ConstructListOfSameValues(true, 6), AnimateBullet.ConstructListOfSameValues(false, 6), AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 6), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 6), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 6), AnimateBullet.ConstructListOfSameValues <Projectile>(null, 6)); mod.projectiles[0] = projectile; } else { Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(mod.projectiles[0]); projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); projectile.baseData.damage *= 2f; projectile.baseData.speed *= 0.5f; projectile.AnimateProjectile(new List <string> { "thinline_blueproj_001", "thinline_blueproj_002", "thinline_blueproj_003", "thinline_blueproj_004", "thinline_blueproj_005", "thinline_blueproj_006", }, 10, true, new List <IntVector2> { new IntVector2(10, 10), new IntVector2(10, 10), new IntVector2(10, 10), new IntVector2(10, 10), new IntVector2(10, 10), new IntVector2(10, 10), }, AnimateBullet.ConstructListOfSameValues(true, 6), AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 6), AnimateBullet.ConstructListOfSameValues(true, 6), AnimateBullet.ConstructListOfSameValues(false, 6), AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 6), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 6), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 6), AnimateBullet.ConstructListOfSameValues <Projectile>(null, 6)); mod.ammoCost = 1; ThinLineCollision collider = projectile.gameObject.GetOrAddComponent <ThinLineCollision>(); mod.projectiles[0] = projectile; } } gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Thinline Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/thinline_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/thinline_clipempty"); gun.quality = PickupObject.ItemQuality.B; ETGMod.Databases.Items.Add(gun, null, "ANY"); gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.PURCHASED_THETHINLINE, true); gun.AddItemToDougMetaShop(25); ID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("CARRION", "carrion2"); Game.Items.Rename("outdated_gun_mods:carrion", "nn:carrion"); var behav = gun.gameObject.AddComponent <Carrion>(); behav.preventNormalFireAudio = true; gun.SetShortDescription("Fresh Meat"); gun.SetLongDescription("A wormlike colony of bizarre organisms. Unknown origin." + "\n\nIt has three base desires. \nTo grow. \nTo Spread. \nTo Feed."); gun.SetupSprite(null, "carrion2_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 13); gun.SetAnimationFPS(gun.idleAnimation, 13); gun.isAudioLoop = true; gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false); //GUN STATS gun.doesScreenShake = false; gun.DefaultModule.ammoCost = 5; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.Beam; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 1f; gun.muzzleFlashEffects.type = VFXPoolType.None; gun.DefaultModule.cooldownTime = 0.001f; gun.DefaultModule.numberOfShotsInClip = 600; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.BEAM; gun.barrelOffset.transform.localPosition = new Vector3(0.75f, 0.56f, 0f); gun.SetBaseMaxAmmo(600); gun.ammo = 600; gun.gunClass = GunClass.SILLY; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).wrapMode = tk2dSpriteAnimationClip.WrapMode.LoopSection; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).loopStart = 0; //SUB TENTACLE #region subtentacle Projectile subTendrilProj = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(86) as Gun).DefaultModule.projectiles[0]); BasicBeamController subTendrilComp = subTendrilProj.GenerateBeamPrefab( "NevernamedsItems/Resources/BeamSprites/carrionsubtendril_mid_001", new Vector2(4, 2), new Vector2(0, 1), new List <string>() { "NevernamedsItems/Resources/BeamSprites/carrionsubtendril_mid_001" }, 13, //Impact null, -1, null, null, //End new List <string>() { "NevernamedsItems/Resources/BeamSprites/carrionsubtendril_end_001" }, 13, new Vector2(6, 2), new Vector2(0, 1), //Beginning new List <string>() { "NevernamedsItems/Resources/BeamSprites/carrionsubtendril_start_001" }, 13, new Vector2(7, 2), new Vector2(0, 1), //Other Variables 0 ); subTendrilProj.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(subTendrilProj.gameObject); UnityEngine.Object.DontDestroyOnLoad(subTendrilProj); subTendrilProj.baseData.damage = 10f; subTendrilProj.baseData.force *= 1f; subTendrilProj.baseData.range = 3.5f; subTendrilComp.ProjectileAndBeamMotionModule = new HelixProjectileMotionModule(); subTendrilComp.boneType = BasicBeamController.BeamBoneType.Projectile; subTendrilComp.penetration = 1; subTendrilComp.homingRadius = 10; subTendrilComp.homingAngularVelocity = 1000; CarrionSubTendrilController subtendril = subTendrilProj.gameObject.AddComponent <CarrionSubTendrilController>(); #endregion //MAIN TENTACLE #region maintentacle List <string> BeamAnimPaths = new List <string>() { "NevernamedsItems/Resources/BeamSprites/carrion2_mid_001", "NevernamedsItems/Resources/BeamSprites/carrion2_mid_002", "NevernamedsItems/Resources/BeamSprites/carrion2_mid_003", "NevernamedsItems/Resources/BeamSprites/carrion2_mid_004", "NevernamedsItems/Resources/BeamSprites/carrion2_mid_005", }; List <string> BeamEndPaths = new List <string>() { "NevernamedsItems/Resources/BeamSprites/carrion2_end_001", "NevernamedsItems/Resources/BeamSprites/carrion2_end_002", "NevernamedsItems/Resources/BeamSprites/carrion2_end_003", "NevernamedsItems/Resources/BeamSprites/carrion2_end_004", "NevernamedsItems/Resources/BeamSprites/carrion2_end_005", }; //BULLET STATS Projectile projectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(86) as Gun).DefaultModule.projectiles[0]); BasicBeamController beamComp = projectile.GenerateBeamPrefab( "NevernamedsItems/Resources/BeamSprites/carrion2_mid_001", new Vector2(16, 5), new Vector2(0, 6), BeamAnimPaths, 13, //Impact null, -1, null, null, //End BeamEndPaths, 13, new Vector2(10, 5), new Vector2(0, 6), //Beginning null, -1, null, null, //Other Variables 0 ); projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); projectile.baseData.damage = 30f; projectile.baseData.force *= 1f; projectile.baseData.range = 8; projectile.baseData.speed *= 3; beamComp.boneType = BasicBeamController.BeamBoneType.Projectile; beamComp.startAudioEvent = "Play_WPN_demonhead_shot_01"; beamComp.endAudioEvent = "Stop_WPN_All"; beamComp.penetration = 1; beamComp.homingRadius = 5; beamComp.homingAngularVelocity = 300; CarrionMainTendrilController mainTendril = projectile.gameObject.AddComponent <CarrionMainTendrilController>(); mainTendril.subTendrilPrefab = subTendrilProj.gameObject; gun.DefaultModule.projectiles[0] = projectile; #endregion //ESCAPING WIGGLER #region escapingwiggler Projectile wiggler = DataCloners.CopyFields <HelixProjectile>(Instantiate((PickupObjectDatabase.GetById(56) as Gun).DefaultModule.projectiles[0])); wiggler.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(wiggler.gameObject); UnityEngine.Object.DontDestroyOnLoad(wiggler); wiggler.baseData.speed *= 1f; wiggler.baseData.damage = 20; wiggler.baseData.range *= 10f; HomingModifier homing = wiggler.gameObject.GetOrAddComponent <HomingModifier>(); homing.HomingRadius = 10; homing.AngularVelocity = 200; PierceProjModifier piercing = wiggler.gameObject.GetOrAddComponent <PierceProjModifier>(); piercing.penetratesBreakables = true; piercing.penetration++; wiggler.SetProjectileSpriteRight("carrion_wiggler", 5, 5, true, tk2dBaseSprite.Anchor.MiddleCenter, 5, 5); EasyTrailBullet trail = wiggler.gameObject.AddComponent <EasyTrailBullet>(); trail.TrailPos = projectile.transform.position; trail.StartWidth = 0.31f; trail.EndWidth = 0; trail.LifeTime = 0.3f; trail.BaseColor = ExtendedColours.carrionRed; trail.EndColor = ExtendedColours.carrionRed; EscapingWigglerProjectile = wiggler; #endregion gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = "Carrion Clip"; gun.quality = PickupObject.ItemQuality.S; //S ETGMod.Databases.Items.Add(gun, null, "ANY"); CarrionForme1ID = gun.PickupObjectId; }