Page 2 of 9

Re: Special Operations: Action Tactical mod [IN PROGRESS]

Posted: Fri Aug 10, 2012 11:58 am
by lizardcommando
Image
Model 1887
This gun may not be standard issue amongst special forces groups around the world, but it sure as hell fun to use when your blasting away enemy soldiers and demons! Its small spread is suitable for sniping at medium ranges. The only downside to this gun is its long reload time.



The original sprites were from JoeyTD.

Re: Special Operations: Action Tactical mod [New weapon + vi

Posted: Fri Aug 10, 2012 12:28 pm
by TypeSaucy
i like it. thing is, in my opinion, the arm looks awkward during the lever-action animation.

Re: Special Operations: Action Tactical mod [New weapon + vi

Posted: Fri Aug 10, 2012 12:34 pm
by lizardcommando
Yeah, I know. I didn't really have a lot to work with in terms of the resources available.

Re: Special Operations: Action Tactical mod [New weapon + vi

Posted: Fri Aug 10, 2012 1:08 pm
by TypeSaucy
i'm assuming that this is the only lever-action shotgun you came across with?

Re: Special Operations: Action Tactical mod [New weapon + vi

Posted: Fri Aug 10, 2012 2:12 pm
by -Ghost-
I found one here that might work for you:
Image

http://forum.realm667.com/viewtopic.php?f=4&t=1162

Re: Special Operations: Action Tactical mod [New weapon + vi

Posted: Fri Aug 10, 2012 2:31 pm
by TypeSaucy
well, tbh ghost, this looks almost exactly the same as the one he has now... only that there's no arm popping out, and it has doomguy's hands on it.

Re: Special Operations: Action Tactical mod [New weapon + vi

Posted: Fri Aug 10, 2012 2:47 pm
by lizardcommando
Yeah, that's the exact same one. I just added JoeyTD's arms from his abandoned WW2 mod and added the extended arm. I think the problem right now is that the player's arm is too short. I'm gonna have to extend it.

Re: Special Operations: Action Tactical mod [New weapon + vi

Posted: Fri Aug 10, 2012 2:51 pm
by TypeSaucy
well, it looked short before fully doing the lever-action pump. perhaps if you make it a bit smooth, it would look alright.

Re: Special Operations: Action Tactical mod [New weapon + vi

Posted: Fri Aug 10, 2012 4:54 pm
by -Ghost-
Oh, my bad, I was looking at the pump frames. :P

Re: Special Operations: Action Tactical mod [New weapon + vi

Posted: Mon Aug 13, 2012 10:09 am
by lizardcommando
I got rid of the boring AK47 and added in a sniper rifle. However, I do have a slight problem with it. If I zoom in and fire, the firing animation will show up while zoomed in, making it look pretty weird. How do I fix this?

Code: Select all

ACTOR SniperRifle : Weapon replaces PlasmaRifle
{
   +NOAUTOFIRE
   +NOALERT
   +NOEXTREMEDEATH
  Weapon.SelectionOrder 800
  Weapon.AmmoUse 1
  Weapon.SlotNumber 6
  Weapon.AmmoGive 5
  Weapon.AmmoType "Cell"
  inventory.pickupsound "weapons/sniperclose"
  Obituary "%o was sniped by %k."
  Inventory.Pickupmessage "Picked up a Sniper Rifle."
  States
  {
  Ready:
    SNPE A 0 A_JumpIfInventory("SniperZoom", 1, "ReadyScope")
    SNPE A 1 A_WeaponReady
    Loop
  ReadyScope:
      TNT1 A 1 A_WeaponReady(WRF_NoBob)
      LOOP
   Deselect: 
      TNT1 A 0 A_TakeInventory ("SniperZoom", 2)
      TNT1 A 0 A_ZoomFactor(1.0)
      SNPE A 1 A_Lower
      Goto Deselect+2
  Select:
    SNPE A 1 A_Raise
    Loop
  Fire:
    SNPF B 0 A_AlertMonsters
	SNPF A 1 A_PlayWeaponSound("weapons/sniperfire")
    SNPF A 1 Bright A_FireBullets (2, 2, 1, 75, "BulletPuff")
    SNPF B 1 Bright
	SNPE A 5
    SNPE ABC 5
    SNPE D 6
    SNPE F 5 A_PlayWeaponSound("weapons/sniperopen")
    SNPE G 7
	SNPE F 6 A_PlayWeaponSound("weapons/sniperclose")
	SNPE D 5
	SNPE CBA 4
 Goto Ready
   AltFire:
    SNPE A 0 A_SetCrosshair(50)
    SNPE A 2 A_WeaponReady(WRF_NoBob)
    TNT1 A 0 A_JumpIfInventory("SniperZoom", 2, "ZoomOut")
    TNT1 A 0 A_JumpIfInventory("SniperZoom", 1, "Zoom2")
    //fall through
  Zoom1:
    TNT1 A 0 A_ZoomFactor(3.0)
    TNT1 A 0 A_GiveInventory ("SniperZoom", 1)
    Goto "AltFireDone"
  Zoom2:
    TNT1 A 0 A_ZoomFactor(8.0)
    TNT1 A 0 A_GiveInventory ("SniperZoom", 1)
    Goto "AltFireDone"
  ZoomOut:
    TNT1 A 0 A_SetCrosshair(0)
    TNT1 A 0 A_ZoomFactor(1.0)
    TNT1 A 0 A_TakeInventory ("SniperZoom", 2)
    Goto "AltFireDone"
  AltFireDone:
    SNPE A 1 A_ReFire
    Goto "Ready" 
  }
}

Re: Special Operations: Action Tactical mod [New weapon + vi

Posted: Mon Aug 13, 2012 10:42 am
by TypeSaucy
well, seeing from this code, after the zoom, there's not another state in the "fire" that... it's hard for me to explain. there's supposed to be a state in the primary fire while you're zooming. without it, it's gonna play off the original animation. sorry if you don't understand, i just got back into modding. :P

Re: Special Operations: Action Tactical mod [New weapon + vi

Posted: Mon Aug 13, 2012 11:37 am
by lizardcommando
Ok, the first mystery has been solved. I just had to add in the JumpIfInventory stuff in the FIRE section of the code. I'm now trying to add a sound for whenever you press the Zoom button, but it won't make the noise. I've been looking at some examples to see how it was done, but it's just too fucking complicated for me to get :evil:

Code: Select all

ACTOR SniperRifle : Weapon replaces PlasmaRifle
{
   +NOAUTOFIRE
   +NOALERT
   +NOEXTREMEDEATH
  Weapon.SelectionOrder 800
  Weapon.AmmoUse 1
  Weapon.SlotNumber 6
  Weapon.AmmoGive 5
  Weapon.AmmoType "Cell"
  inventory.pickupsound "weapons/sniperclose"
  Obituary "%o was sniped by %k."
  Inventory.Pickupmessage "Picked up a Sniper Rifle."
  States
  {
  Ready:
    SNPE A 0 A_JumpIfInventory("SniperZoom", 1, "ReadyScope")
    SNPE A 1 A_WeaponReady
    Loop
  ReadyScope:
      TNT1 A 1 A_WeaponReady(WRF_NoBob)
      LOOP
   Deselect: 
      TNT1 A 0 A_TakeInventory ("SniperZoom", 2)
      TNT1 A 0 A_ZoomFactor(1.0)
      SNPE A 1 A_Lower
      Goto Deselect+2
  Select:
    SNPE A 1 A_Raise
    Loop
  Fire:
  	SNPF A 0 A_JumpIfInventory("SniperZoom", 1, "FireZoom")
    SNPF B 0 A_AlertMonsters
	SNPF A 1 A_PlayWeaponSound("weapons/sniperfire")
    SNPF A 1 Bright A_FireBullets (14, 14, 1, 75, "BulletPuff")
    SNPF B 1 Bright
	SNPE A 5
    SNPE ABC 5
    SNPE D 6
    SNPE F 5 A_PlayWeaponSound("weapons/sniperopen")
    SNPE G 7
	SNPE F 5 A_PlayWeaponSound("weapons/sniperclose")
	SNPE D 4
	SNPE CBA 3
 Goto Ready
 FireZoom:
    TNT1 A 0 A_AlertMonsters
	TNT1 A 1 A_PlayWeaponSound("weapons/sniperfire")
    TNT1 A 1 Bright A_FireBullets (1, 2, 1, 75, "BulletPuff")
	TNT1 A 20
	TNT1 A 5 A_PlayWeaponSound("weapons/sniperopen")
	TNT1 A 7
	TNT1 A 5 A_PlayWeaponSound("weapons/sniperclose")
	TNT1 A 7
	Goto Ready
   AltFire:
    TNT1 A 1 A_PlayWeaponSound("weapons/zoom")
    TNT1 A 0 A_SetCrosshair(50)
    TNT1 A 2 A_WeaponReady(WRF_NoBob)
    TNT1 A 0 A_JumpIfInventory("SniperZoom", 2, "ZoomOut")
    TNT1 A 0 A_JumpIfInventory("SniperZoom", 1, "Zoom2")
  Zoom1:
    TNT1 A 0 A_ZoomFactor(3.0)
    TNT1 A 0 A_GiveInventory ("SniperZoom", 1)
    Goto "AltFireDone"
  Zoom2:
    TNT1 A 0 A_ZoomFactor(8.0)
    TNT1 A 0 A_GiveInventory ("SniperZoom", 1)
    Goto "AltFireDone"
  ZoomOut:
    TNT1 A 0 A_SetCrosshair(0)
    TNT1 A 0 A_ZoomFactor(1.0)
    TNT1 A 0 A_TakeInventory ("SniperZoom", 2)
    Goto "AltFireDone"
  AltFireDone:
    TNT1 A 1 A_ReFire
    Goto "Ready" 
  }
}

Re: Special Operations: Action Tactical mod [New weapon + vi

Posted: Mon Aug 13, 2012 11:45 am
by wildweasel
Dumb question, but is weapons/zoom defined in Sndinfo?

Re: Special Operations: Action Tactical mod [New weapon + vi

Posted: Mon Aug 13, 2012 11:50 am
by lizardcommando
Doh! No it wasn't! >_< I guess having a fresh set of eyes pays off.

I just fixed it and now it works. However, I've ran into another problem. The unzoomed (FIRE) state lets me fire really accurate shots. This is how I have it in the coding though:

Code: Select all

  Fire:
  	SNPF A 0 A_JumpIfInventory("SniperZoom", 1, "FireZoom")
    SNPF B 0 A_AlertMonsters
	SNPF A 1 A_PlayWeaponSound("weapons/sniperfire")
    SNPF A 1 Bright A_FireBullets (22, 22, 1, 75, "BulletPuff")
    SNPF B 1 Bright
	SNPE A 5
    SNPE ABC 5
    SNPE D 6
    SNPE F 5 A_PlayWeaponSound("weapons/sniperopen")
    SNPE G 7
	SNPE F 5 A_PlayWeaponSound("weapons/sniperclose")
	SNPE D 4
	SNPE CBA 3
 Goto Ready
Shouldn't this be able to have me inaccurate shots unzoomed? I have the Zoomed states' A_FireBullets look like this:

Code: Select all

 FireZoom:
    TNT1 A 0 A_AlertMonsters
	TNT1 A 1 A_PlayWeaponSound("weapons/sniperfire")
    TNT1 A 1 Bright A_FireBullets (1, 2, 1, 75, "BulletPuff")
	TNT1 A 20
	TNT1 A 5 A_PlayWeaponSound("weapons/sniperopen")
	TNT1 A 7
	TNT1 A 5 A_PlayWeaponSound("weapons/sniperclose")
	TNT1 A 7
	Goto Ready
Not sure what I'm missing here.

Re: Special Operations: Action Tactical mod [New weapon + vi

Posted: Mon Aug 13, 2012 1:20 pm
by wildweasel
Set the third argument (number of shots) from 1 to -1. This makes shots always follow the accuracy settings you've defined. When it's set to 1, the first shot will always be perfectly accurate until the weapon encounters an A_Refire.