Special Operations: Action Tactical mod [Beta 2 Release!]

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
lizardcommando
Posts: 1489
Joined: Thu Sep 07, 2006 12:24 pm
Location: Boringland, California

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

Post 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.
User avatar
TypeSaucy
Posts: 1000
Joined: Wed Sep 17, 2008 9:31 am

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

Post by TypeSaucy »

i like it. thing is, in my opinion, the arm looks awkward during the lever-action animation.
User avatar
lizardcommando
Posts: 1489
Joined: Thu Sep 07, 2006 12:24 pm
Location: Boringland, California

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

Post by lizardcommando »

Yeah, I know. I didn't really have a lot to work with in terms of the resources available.
User avatar
TypeSaucy
Posts: 1000
Joined: Wed Sep 17, 2008 9:31 am

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

Post by TypeSaucy »

i'm assuming that this is the only lever-action shotgun you came across with?
User avatar
-Ghost-
Posts: 1777
Joined: Wed Sep 08, 2010 4:58 pm

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

Post by -Ghost- »

I found one here that might work for you:
Image

http://forum.realm667.com/viewtopic.php?f=4&t=1162
User avatar
TypeSaucy
Posts: 1000
Joined: Wed Sep 17, 2008 9:31 am

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

Post 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.
User avatar
lizardcommando
Posts: 1489
Joined: Thu Sep 07, 2006 12:24 pm
Location: Boringland, California

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

Post 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.
User avatar
TypeSaucy
Posts: 1000
Joined: Wed Sep 17, 2008 9:31 am

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

Post 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.
User avatar
-Ghost-
Posts: 1777
Joined: Wed Sep 08, 2010 4:58 pm

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

Post by -Ghost- »

Oh, my bad, I was looking at the pump frames. :P
User avatar
lizardcommando
Posts: 1489
Joined: Thu Sep 07, 2006 12:24 pm
Location: Boringland, California

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

Post 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" 
  }
}
User avatar
TypeSaucy
Posts: 1000
Joined: Wed Sep 17, 2008 9:31 am

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

Post 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
User avatar
lizardcommando
Posts: 1489
Joined: Thu Sep 07, 2006 12:24 pm
Location: Boringland, California

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

Post 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" 
  }
}
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed

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

Post by wildweasel »

Dumb question, but is weapons/zoom defined in Sndinfo?
User avatar
lizardcommando
Posts: 1489
Joined: Thu Sep 07, 2006 12:24 pm
Location: Boringland, California

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

Post 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.
Last edited by lizardcommando on Mon Aug 13, 2012 11:52 am, edited 1 time in total.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed

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

Post 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.

Return to “Gameplay Mods”