Announcement

Collapse
No announcement yet.

Super simple shotgun!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    Yes, true. I believe it's a mistake in my code!
    I will check it out!

    Comment


      #32
      I'm having a problem with the instantfire projectiles not showing up as well. In my case, however, the FireEffects do not appear to show up at all for the InstantFire mode. Here is my source code:

      Code:
      class AutoShotgun extends Base_Shotgun;
      
      defaultproperties
      {
              /* WEAPON FIRE PROPERTIES! */
      	ShotCost(0)=0 // keep these for testing purpose!
      	ShotCost(1)=0
      	MaxAmmoCount=1
      	
      	/* CUSTOM CHECKS FOR SHOTGUN! */
      	bIsShotGun=true
              Shells=8 // We want 8 shells!
              
              /* WEAPON FIRING MODES! */
      	FiringStatesArray(0)=WeaponFiring
      	FiringStatesArray(1)=WeaponFiring
      	WeaponFireTypes(0)=EWFT_Projectile // First fire mode is a projectile
      	WeaponFireTypes(1)=EWFT_InstantHit // second is a instanthit!
      
      	WeaponProjectiles(0)=class'UTProj_AutoShotgun' // Same as UTProjMantaBolt, but with modified Damage and Scaling Settings
      	FireInterval(0)=+0.3 // Fire speed!
      	Spread(0)=0.2 // the spread of the bullets!
      	Spread(1)=0.2
      	InstantHitDamage(1)=25
      	InstantHitDamageTypes(1)=class'UTDmgType_ShockPrimary'
      
      	// Weapon SkeletalMesh
      	Begin Object class=AnimNodeSequence Name=MeshSequenceA
      	End Object
              AttachmentClass=class'UTAttachment_ShockRifle'
      
      	// Weapon SkeletalMesh
      	Begin Object Name=FirstPersonMesh
      		SkeletalMesh=SkeletalMesh'WP_ShockRifle.Mesh.SK_WP_ShockRifle_1P'
      		AnimSets(0)=AnimSet'WP_ShockRifle.Anim.K_WP_ShockRifle_1P_Base'
      		AnimSets(1)=AnimSet'WP_ShockRifle.Anim.K_WP_ShockRifle_1P_Base'
      		Animations=MeshSequenceA
      		Rotation=(Yaw=-16384)
      		FOV=60.0
      	End Object
      
      	Begin Object Name=PickupMesh
      		SkeletalMesh=SkeletalMesh'WP_ShockRifle.Mesh.SK_WP_ShockRifle_3P' // either keep this or change to your 3rd person mesh.
      	End Object
      
      	FireOffset=(X=17,Y=0)
      	PlayerViewOffset=(X=14,Y=0,Z=-10.0) // Correction for Shockrifle
      And here is the Base_Shotgun Class:
      Code:
      Class Base_Shotgun extends UTWeapon;
      
      var bool bIsShotGun;
      var int Shells; // Amount of bullets to be shot!
      
      simulated function Projectile ProjectileFire()
      {
                   local int s;
      
       if (bIsShotGun == true)
       {
                  for(s=0; s < Shells; s++)
                  {
                      super.ProjectileFire(); //Here I changed it to keep looping instead of returning
                  }
              }
              else 
              {
                 return super.ProjectileFire();
              }
              return None;
      }
      Any help would be very greatly appreciated!

      Comment


        #33
        I get errors when I try to switch the mesh to the Rocket Launcher one. What might I be doing wrong?

        Comment


          #34
          Sorry for digging up such an old thread, btw.

          Comment

          Working...
          X