Shooting when scoping

Discuss all aspects related to modding Zandronum here.
Post Reply
Hece
Forum Regular
Posts: 114
Joined: Wed Jun 06, 2012 6:26 am
Location: Phobos

Shooting when scoping

#1

Post by Hece » Wed Jun 20, 2012 12:36 pm

I have this script for scoping, but what should I add to make the scope be on after and when shooting?

Code: Select all

actor G36K : weapon 20003
{
   Weapon.AmmoUse 1
   Weapon.AmmoGive 60
   Weapon.AmmoType "7,62"
   Inventory.PickupMessage "Hi-tech weaponry"
   Obituary "%o met death by %k G36K."
   States
   {
   Ready:
     TKGN A 1 A_WeaponReady
     Loop
   Deselect:
     TKGN A 1 A_Lower
     Loop
   Select:
     TKGN A 1 A_Raise
     Loop
   Fire:
     TKGN A 0 Bright
	 TKGN A 0 A_PlaySound("weapons/minigun")
     TKGN B 1 A_FireBullets(2,2,1,20)
	 TKGN C 3
     TKGN A 3
	 TKGN A 0 A_ReFire
     Goto Ready
   Spawn:
     TKGN X -1
     Stop
	 AltFire: //BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
    G36K S 2 A_WeaponReady(WRF_NoBob)
    G36K S 0 A_JumpIfInventory("M4Zoom", 2, "ZoomOut")
    TNT1 A 0 A_JumpIfInventory("M4Zoom", 1, "Zoom2")
  Zoom2:
    G36K S 0 A_ZoomFactor(4.0)
    TNT1 A 0 A_GiveInventory ("M4Zoom", 1)
    Goto "ReadyScope"
  ZoomOut:
    G36K S 0 A_ZoomFactor(1.0)
    TNT1 A 0 A_TakeInventory ("M4Zoom", 2)
    Goto "Ready"
  AltFireDone:
    G36K S 1 A_ReFire
    Goto "Ready" 
	ReadyScope:
      G36K S 1 A_WeaponReady(WRF_NoBob)
      LOOP
   }
}

User avatar
Ænima
Addicted to Zandronum
Posts: 3523
Joined: Tue Jun 05, 2012 6:12 pm

RE: Shooting when scoping

#2

Post by Ænima » Wed Jun 20, 2012 2:13 pm

Hint: Put A_JumpIfInventory in the Fire state.

You wouldn't have to create all of these "HOW DO I" threads if you simply opened up other wads and looked at how something is done.
­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­
Doom64: Unabsolved: New weapons, monsters, and gameplay features for coop !


ZandroSkins
: a pack made by our community

Hece
Forum Regular
Posts: 114
Joined: Wed Jun 06, 2012 6:26 am
Location: Phobos

RE: Shooting when scoping

#3

Post by Hece » Wed Jun 20, 2012 2:22 pm

Ænima wrote: You wouldn't have to create all of these "HOW DO I" threads if you simply opened up other wads and looked at how something is done.
I do seek answers from other wads first, and after that post it here.

Post Reply