Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Bread Knight

making my shotgun shoot projectiles(help)

Recommended Posts

ok so ive learnt the basics of slade3 and modding doom and so far ive gotten this

ACTOR Superautoshotgun : Weapon replaces Chainsaw
{
weapon.ammogive 84
Inventory.PickupMessage "oh dang thats one heck of a gun."
Weapon.Ammotype "shell"
Weapon.ammouse 1
Weapon.slotnumber 3
+BOUNCEONWALLs
+noalert
+bounceonfloors
+bounceonceilings
+explosive
weapon.KickBack 100
AttackSound "weapons/shotgf"
States
{
Spawn:
SHOT A -1
stop
ready:
AUTO B 1 A_Weaponready
loop
Select:
AUTO B 1 A_Raise
loop
deselect:
AUTO B 1 A_Lower
loop
Fire:
AUTO B 0 A_Gunflash
AUTO B 1 A_FireBullets(15, 15, 75, 10, "BulletPuff", 1)
AUTO B 1 offset (0,40)
AUTO B 1 offset (0,48)
AUTO B 1 offset (0,44) A_ChangeVelocity (cos(Pitch) * -29, 0, sin(Pitch) * 29,CVF_RELATIVE)
AUTO B 0 offset (0,40) A_quake (16, 10, 0, 32,none)
AUTO B 1 offset (0,37) A_checkreload
AUTO B 1 offset (0,35) A_REFIRE
Goto ready
Flash:
AUFL A 2 BRIGHT A_Light2
AUFL B 2 BRIGHT A_Light1
AUFL C 2 BRIGHT A_Light2
AUFL D 2 BRIGHT A_Light1
TNT1 A 1 A_Light0
Goto LightDone
altfire:
AUCG A 20
AUFL C 2 A_FireBullets(30, 30, 750, 10, "BulletPuff", 3)
AUFL B 0 A_ChangeVelocity (cos(Pitch) * -32, 0, sin(Pitch) * 32,CVF_RELATIVE)
AUFL B 0 A_QUAKE (20, 7, 2, 32, none)
stop
goto ready




}
}
ACTOR buggedhand : weapon replaces pistol
{
weapon.slotnumber 1
inventory.pickupmessage "what a bugged hand"
+wimpy_weapon
+meleeweapon
states
{
ready:
HAND A 1 A_weaponREADY
loop

select:
HAND A 1 A_RAISE
loop

deselect:
HAND A 1 A_LOWER
LOOP

FIRE:
HAND A 1
HAND A 1 A_firebullets(2, 2, 10, 7, "bulletpuff", 2)
HAND A 20
HAND A 1 A_REFIRE
goto ready
}
}
ACTOR grapplinghook :weapon replaces shotgun
{
inventory.pickupmessage "what a wonky grapple"
weapon.slotnumber 2

STATES
{
ready:
GRPH A 1 A_WEAPONREADY
loop

select:
GRPH A 1 A_raise
LOOP

deselect:
GRPH A 1 A_lower
loop

Fire:
GRPH A 0 A_firebullets (0, 0, 1, 5, "BulletPuff", 1)
GRPH A 0 A_changevelocity(cos(pitch) * 10, 0, cos(pitch) * 23,CVF_RELATIVE)
GRPH A 10
goto ready
}
}
ACTOR superzombieman : zombieman replaces zombieman
{
health 1000
speed 16
obituary "%o was slaughtered by a strangely powerful zombie."

states
{
pain:
POSS E 5 A_facetarget
POSS F 5 A_TROOPATTACK
POSS E 4
goto see
}
}

everything works and everythings decent but what i want to know is how i would make my superautoshotgun thing shoot projectiles like the missile. ive looked at tutorials but some of them just have a shitload of reading(im not lazy...well sorta but still i just think there could be a way quicker way of showing it of) if you guys could help me with this that would be awesome

Share this post


Link to post

What I did was this:

		TNT1 A 0 A_PlaySound("weapons/riotgun/fire", CHAN_WEAPON)
		TNT1 A 0 A_FireCustomMissile("Buckshot", random(1,8)-4, TRUE, 0, -2, 0, random(1,8)-4)
		TNT1 AAAAAA 0 A_FireCustomMissile("Buckshot", random(1,8)-4, FALSE, 0, -2, 0, random(1,8)-4)
The second line is the one that takes ammo. The third line spawns the other 6 pellets.

If you want it to use 2 shells at a time you would change the A in line 2 to AA. That also means it would fire a total of 8 pellets though, instead of 7.

And you want to change the strings so that they point to your own projectiles and sounds, of course.

Share this post


Link to post
Gamer With Dignity said:

What I did was this:

		TNT1 A 0 A_PlaySound("weapons/riotgun/fire", CHAN_WEAPON)
		TNT1 A 0 A_FireCustomMissile("Buckshot", random(1,8)-4, TRUE, 0, -2, 0, random(1,8)-4)
		TNT1 AAAAAA 0 A_FireCustomMissile("Buckshot", random(1,8)-4, FALSE, 0, -2, 0, random(1,8)-4)
The second line is the one that takes ammo. The third line spawns the other 6 pellets.

If you want it to use 2 shells at a time you would change the A in line 2 to AA. That also means it would fire a total of 8 pellets though, instead of 7.

And you want to change the strings so that they point to your own projectiles and sounds, of course.

thanks will try that. it worked! thanks man <3

Share this post


Link to post

Here's a super shotgun that shoots bouncing projectiles. The OP in the name does indeed stand for Over-Powered.

Spoiler

ACTOR OPSuperShotgun : SuperShotgun replaces SuperShotgun
{
  Weapon.SlotNumber 3
  Inventory.PickupMessage "You got the Super Shotgun!"
  weapon.ammogive 12
  States
  {
  Fire:
    SHT2 A 3
    TNT1 A 0 A_GunFlash
    TNT1 A 0 A_PlaySound("weapons/sshotf",CHAN_WEAPON)
    TNT1 A 0 A_FireCustomMissile("OPSSGBall",-3,0,-1,-1,0,-3)
    TNT1 A 0 A_FireCustomMissile("OPSSGBall",-3,0,-1,0,0,0)
    TNT1 A 0 A_FireCustomMissile("OPSSGBall",-3,0,-1,1,0,3)
    TNT1 A 0 A_FireCustomMissile("OPSSGBall",0,0,0,-1,0,-3)
    TNT1 A 0 A_FireCustomMissile("OPSSGBall",0,0,0,0,0,0)
    TNT1 A 0 A_FireCustomMissile("OPSSGBall",0,0,0,1,0,3)
    TNT1 A 0 A_FireCustomMissile("OPSSGBall",3,0,1,-1,0,-3)
    TNT1 A 0 A_FireCustomMissile("OPSSGBall",3,0,1,0,0,0)
    THT1 A 0 A_FireCustomMissile("OPSSGBall",3,0,1,1,0,3)
    TNT1 A 0 A_FireCustomMissile("OPSSGBall",-2,0,-1,-1,0,-2)
    TNT1 A 0 A_FireCustomMissile("OPSSGBall",-2,0,-1,0,0,0)
    TNT1 A 0 A_FireCustomMissile("OPSSGBall",-2,0,-1,1,0,2)
    TNT1 A 0 A_FireCustomMissile("OPSSGBall",0,0,0,-1,0,-2)
    TNT1 A 0 A_FireCustomMissile("OPSSGBall",0,0,0,0,0,0)
    TNT1 A 0 A_FireCustomMissile("OPSSGBall",0,0,0,1,0,2)
    TNT1 A 0 A_FireCustomMissile("OPSSGBall",2,0,1,-1,0,-2)
    TNT1 A 0 A_FireCustomMissile("OPSSGBall",2,0,1,0,0,0)
    TNT1 A 0 A_FireCustomMissile("OPSSGBall",2,1,1,1,0,2)
    SHT2 A 6 Bright
    SHT2 B 7
    SHT2 C 7 A_CheckReload
    SHT2 D 7 A_OpenShotgun2
    SHT2 E 7
    SHT2 F 7 A_LoadShotgun2
    SHT2 G 6
    SHT2 H 6 A_CloseShotgun2
    SHT2 A 5 A_ReFire
    Goto Ready
  }
}

ACTOR OPSSGBall : PlasmaBall1
{
  +RIPPER
  +MTHRUSPECIES
  Damage 64
  BounceCount 10
  BounceType "Grenade"
  BounceFactor 0.8
  WallBounceFactor 0.8
  SeeSound "dsempty"
}

The PlasmaBall1 actor that the OPSSGBall inherits from is not the plasma ball shot from a plasma gun. It is one of the 2 types of plasma balls shot by the beta BFG, which shot 40 bouncing plasma balls (20 red and 20 green). Here is the wiki entry for it: http://zdoom.org/wiki/Classes:PlasmaBall1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×