by Xanirus » Wed Feb 02, 2011 12:11 pm
http://forum.zdoom.org/viewtopic.php?f=19&t=26302
Seem to of found a more specific cause. It seems to turn on as soon as you aim/fire on a specific type of monster. Once you turn it off after that point, it seems to stay off until you encounter a new monster that...."flags" the autoaim on. I can only guess that all this resets if you start a new game as well, making you have to turn it all off again.
I found this flag, +WEAPON.NOAUTOAIM, on the ZDoom wiki. "A weapon with that flag will not adjust the aim of an attack, no matter the player's autoaim settings. This is intended to be used only for projectiles affected by gravity, such as grenades, where the player will usually want to aim higher than in a straight line, though it does also affect hitscan and railgun attacks. "
http://zdoom.org/wiki/Actor_flags#WEAPON.NOAUTOAIM
I'm thinking of just putting this in. Does the location of this command matter? Like the very top of the script?
Here's the code for the rocket launcher.
Spoiler:
ACTOR Doom3RocketLauncher : RocketLauncher Replaces RocketLauncher
{
Inventory.PickupMessage "Rocket Launcher"
Inventory.PickupSound "misc/weapon_pkup"
weapon.selectionorder 250
Weapon.AmmoType1 "XRockets"
Weapon.AmmoType2 "Rockets"
Weapon.AmmoGive1 0
Weapon.AmmoGive2 5
Weapon.AmmoUse1 1
Weapon.AmmoUse2 0
Weapon.Kickback 160
+AMMO_OPTIONAL
States
{
Spawn:
LAUN A -1
Loop
Ready:
D3RS ABCD 1
D3RS E 1 A_PlaySound("weapons/rocketlauncher/raise")
D3RS FGHIJ 1
D3RL A 1 A_WeaponReady
Goto Ready+10
Deselect:
D3RS EDCBA 1 A_Lower
Goto Deselect+4
Select:
D3RS A 1
D3RS AA 0 A_Raise
Loop
Fire:
D3RL A 0 A_JumpIfNoAmmo("AltFire")
D3RL A 0 A_PlaySound("weapons/rocketlauncher/fire")
D3RL A 2 A_GunFlash
D3RL B 2
D3RL C 2
D3RL D 2
D3RL E 2
D3RL F 14
D3RL EDCB 2
D3RL B 1 A_Refire
Goto Ready+10
AltFire:
D3RR A 0 A_JumpIfInventory("XRockets",5,4)
D3RR A 0 A_JumpIfInventory("Rockets",1,"ReloadStart")
D3RR A 0 A_JumpIfInventory("XRockets",1,2)
D3RR A 0
Goto NoAmmo
D3RR A 0
Goto Ready+10
ReloadStart:
D3RR A 0 A_PlaySound("weapons/rocketlauncher/reload")
D3RR BCDEFGHI 2
D3RR J 16
D3RR K 2
D3RR L 8
D3RR KJ 2
D3RR IHGFEDCB 1
Goto ReloadCheck
ReloadCheck:
D3RR A 0 A_JumpIfInventory("XRockets",5,2)
D3RR A 0 A_JumpIfInventory("Rockets",1,"ReloadSystem")
D3RR A 0
Goto Ready+10
ReloadSystem:
D3RR A 0 A_TakeInventory("Rockets",1)
D3RR A 0 A_GiveInventory("XRockets",1)
Goto ReloadCheck
NoAmmo:
SISG A 0 A_JumpIfInventory("Doom3PlasmaRifle",1,"SelectPlasma")
SISG A 0 A_JumpIfInventory("Doom3Chaingun",1,"SelectChaingun")
SISG A 0 A_JumpIfInventory("Doom3Machinegun",1,"SelectMachinegun")
SISG A 0 A_JumpIfInventory("Doom3Shotgun",1,"SelectShotgun")
SISG A 0 A_JumpIfInventory("Doom3BFG9000",1,"SelectBFG")
SISG A 0 A_JumpIfInventory("Doom3Grenades",1,"SelectGrenades")
SISG A 0 A_JumpIfInventory("Doom3Pistol",1,"SelectPistol")
SISG A 0 A_JumpIfInventory("Doom3Chainsaw",1,"SelectChainsaw")
SISG A 0 A_SelectWeapon("Doom3Fists")
Goto Deselect
SelectPlasma:
SISG A 0 A_JumpIfInventory("XCells",1,3)
SISG A 0 A_JumpIfInventory("Cells",1,2)
SISG A 0
Goto NoAmmo+1
SISG A 0 A_SelectWeapon("Doom3PlasmaRifle")
Goto Deselect
SelectChaingun:
SISG A 0 A_JumpIfInventory("XAmmoBelt",1,3)
SISG A 0 A_JumpIfInventory("AmmoBelt",1,2)
SISG A 0
Goto NoAmmo+2
SISG A 0 A_SelectWeapon("Doom3Chaingun")
Goto Deselect
SelectMachinegun:
SISG A 0 A_JumpIfInventory("XClip",1,3)
SISG A 0 A_JumpIfInventory("D3Clip",1,2)
SISG A 0
Goto NoAmmo+3
SISG A 0 A_SelectWeapon("Doom3MachineGun")
Goto Deselect
SelectShotgun:
SISG A 0 A_JumpIfInventory("XShells",1,3)
SISG A 0 A_JumpIfInventory("Shells",1,2)
SISG A 0
Goto NoAmmo+4
SISG A 0 A_SelectWeapon("Doom3Shotgun")
Goto Deselect
SelectBFG:
SISG A 0 A_JumpIfInventory("XBFGCell",1,3)
SISG A 0 A_JumpIfInventory("BFGCell",1,2)
SISG A 0
Goto NoAmmo+5
SISG A 0 A_SelectWeapon("Doom3BFG9000")
Goto Deselect
SelectGrenades:
SISG A 0 A_JumpIfInventory("GrenadeAmmo",1,2)
SISG A 0
Goto NoAmmo+6
SISG A 0 A_SelectWeapon("Doom3Grenades")
Goto Deselect
SelectPistol:
SISG A 0 A_JumpIfInventory("XBullets",1,3)
SISG A 0 A_JumpIfInventory("Bullets",1,2)
SISG A 0
Goto NoAmmo+7
SISG A 0 A_SelectWeapon("Doom3Pistol")
Goto Deselect
SelectChainsaw:
SISG A 0 A_SelectWeapon("Doom3Chainsaw")
Goto Deselect
Flash:
D3RF A 2 BRIGHT
D3RF B 2 BRIGHT A_FireCustomMissile("Doom3Rocket", 0, 1, 1, 0)
D3RF C 2 BRIGHT Radius_Quake(5,4,0,1,0)
D3RF D 2 BRIGHT
D3RF E 2 BRIGHT
Stop
}
}
ACTOR Doom3Rocket
{
Radius 10
Height 8
Speed 20
Scale 0.8
Damage 20
Projectile
+RANDOMIZE
DeathSound "weapons/rocketlauncher/explode"
Obituary "$OB_MPROCKET"
States
{
Spawn:
MISL A 0
MISL A 0 A_PlaySoundEx("weapons/rocketlauncher/rocketloop","weapon",1)
MISL A 2 BRIGHT A_CustomMissile("RocketSmoke",4,0,0,0)
Loop
Death:
TNT1 A 0
TNT1 A 0 A_StopSoundEx("weapon")
TNT1 A 0 A_CustomMissile("RExplosion",0,0,180,0)
TNT1 A 2 A_Explode
TNT1 B 2 Radius_Quake(3,5,0,16,0)
Stop
}
}
ACTOR RExplosion
{
Radius 2
Height 2
Speed 0.2
Scale 0.9
RenderStyle ADD
Alpha 0.75
+NOBLOCKMAP
+DROPOFF
+MISSILE
+ACTIVATEIMPACT
+NOGRAVITY
States
{
Spawn:
BOOM A 3 BRIGHT
BOOM B 3 BRIGHT
BOOM C 3 BRIGHT
TNT1 AAAAAAAA 2 A_CustomMissile("Smoke",Random(10,30),Random(-20,20),Random(0,360),0)
Stop
}
}
ACTOR RocketSmoke
{
Radius 1
Height 1
Speed 0.2
Scale 0.2
PROJECTILE
RENDERSTYLE Translucent
Alpha 0.4
States
{
Spawn:
SMOK ABCDEFGHIJKLM 1
Stop
}
}
ACTOR RocketXSmoke
{
Radius 2
Height 2
Speed 1
RenderStyle Translucent
Alpha 0.4
+NOBLOCKMAP
+DROPOFF
+MISSILE
+ACTIVATEIMPACT
+NOGRAVITY
States
{
Spawn:
SMK2 ABCD 3
SMK2 EFGHIJKLM 2
Stop
}
}
ACTOR XRockets : Ammo
{
Inventory.Amount 5
Inventory.MaxAmount 5
Ammo.BackpackAmount 0
Ammo.BackpackMaxAmount 5
Inventory.icon "ROCKA0"
}
ACTOR Rockets : Ammo
{
Inventory.Amount 5
Inventory.MaxAmount 50
Ammo.BackpackAmount 10
Ammo.BackpackMaxAmount 100
Inventory.PickupMessage "Rockets"
Inventory.PickupSound "misc/rocket_pkup"
Inventory.Icon "ROCKA0"
Scale 0.8
States
{
Spawn:
ROCK A -1
Stop
}
}
ACTOR LargeRockets : Rockets
{
Inventory.Amount 10
States
{
Spawn:
BROK A -1
Stop
}
}
And here's the code for the grenades.
Spoiler:
ACTOR Doom3Grenades : Weapon
{
Inventory.Icon "HGREA0"
Inventory.PickupSound "misc/weapon_pkup"
Weapon.SelectionOrder 200
Weapon.AmmoType "GrenadeAmmo"
Weapon.AmmoUse 1
Weapon.AmmoGive 0
Weapon.Kickback 100
States
{
Spawn:
HGRE A -1
Loop
Ready:
D3HS A 1 A_PlaySound("weapons/grenades/raise")
D3HS BCDEFGH 1
D3HG A 0 A_CheckReload
D3HG A 1 A_WeaponReady
Goto Ready+9
Deselect:
D3HS E 0 A_StopSoundEx("weapon")
D3HS EDCBA 1 A_Lower
Goto Deselect+5
Select:
D3HS A 1
D3HS AA 0 A_Raise
Loop
Fire:
D3HG B 1 A_PlaySoundEx("weapons/grenades/fire","weapon")
D3HG CDEFG 1
TNT1 A 16
TNT1 A 1 A_Refire
Goto Throw0
Hold:
TNT1 A 0 A_JumpIfInventory("GrenadeHolder",50,"Explode")
TNT1 A 0 A_JumpIfInventory("GrenadeHolder",40,12)
TNT1 A 0 A_JumpIfInventory("GrenadeHolder",30,9)
TNT1 A 0 A_JumpIfInventory("GrenadeHolder",20,6)
TNT1 A 0 A_JumpIfInventory("GrenadeHolder",10,3)
TNT1 A 2 A_GiveInventory("GrenadeHolder",1)
TNT1 A 1 A_Refire
Goto Throw0
TNT1 A 2 A_GiveInventory("GrenadeHolder",1)
TNT1 A 1 A_Refire
Goto Throw1
TNT1 A 2 A_GiveInventory("GrenadeHolder",1)
TNT1 A 1 A_Refire
Goto Throw2
TNT1 A 2 A_GiveInventory("GrenadeHolder",1)
TNT1 A 1 A_Refire
Goto Throw3
TNT1 A 2 A_GiveInventory("GrenadeHolder",1)
TNT1 A 1 A_Refire
Goto Throw4
Throw0:
THRW A 0 A_TakeInventory("GrenadeHolder")
THRW ABC 1
THRW D 1 A_FireCustomMissile("Grenade0",0,1,0,16)
THRW EFG 1
TNT1 A 10
D3HS ABCDEFGH 1
Goto Ready+8
Throw1:
THRW A 0 A_TakeInventory("GrenadeHolder")
THRW ABC 1
THRW D 1 A_FireCustomMissile("Grenade1",0,1,0,16)
THRW EFG 1
TNT1 A 10
D3HS ABCDEFGH 1
Goto Ready+8
Throw2:
THRW A 0 A_TakeInventory("GrenadeHolder")
THRW ABC 1
THRW D 1 A_FireCustomMissile("Grenade2",0,1,0,22)
THRW EFG 1
TNT1 A 10
D3HS ABCDEFGH 1
Goto Ready+8
Throw3:
THRW A 0 A_TakeInventory("GrenadeHolder")
THRW ABC 1
THRW D 1 A_FireCustomMissile("Grenade3",0,1,0,28)
THRW EFG 1
TNT1 A 10
D3HS ABCDEFGH 1
Goto Ready+8
Throw4:
THRW A 0 A_TakeInventory("GrenadeHolder")
THRW ABC 1
THRW D 1 A_FireCustomMissile("Grenade4",0,1,0,34)
THRW EFG 1
TNT1 A 10
D3HS ABCDEFGH 1
Goto Ready+8
Explode:
TNT1 A 0
TNT1 A 0 A_TakeInventory("GrenadeHolder")
TNT1 A 0 A_FireCustomMissile("ExplosionSpawn",0,1,0,0)
TNT1 A 0 Thing_Damage(0,1000)
TNT1 A 10
D3HS ABCDEFGH 1
Goto Ready+8
}
}
ACTOR GrenadeHolder : Inventory
{
Inventory.MaxAmount 1
Inventory.MaxAmount 50
}
ACTOR Grenade0
{
Radius 8
Height 8
Speed 20
Damage 15
XScale 0.5
YScale 0.4
PROJECTILE
+NOBLOCKMAP
+DROPOFF
+MISSILE
+ACTIVATEIMPACT
+ACTIVATEPCROSS
+DOOMBOUNCE
-NOGRAVITY
BounceFactor 0.6
Obituary "%o caught %k's grenade."
SeeSound "weapons/grenades/bounce"
DeathSound "weapons/grenades/explode"
States
{
Spawn:
D3HW A 2 A_CustomMissile("GrenadeSmoke",0,1,0,0)
D3HW B 2 A_CustomMissile("GrenadeSmoke",0,1,0,0)
D3HW C 2 A_CustomMissile("GrenadeSmoke",0,1,0,0)
D3HW D 2 A_CustomMissile("GrenadeSmoke",0,1,0,0)
Loop
Death:
TNT1 A 0
TNT1 A 0 A_CustomMissile("Explosion",0,0,0,0)
TNT1 A 2 A_Explode
TNT1 B 2 Radius_Quake(4,5,0,16,0)
Stop
}
}
ACTOR Grenade1 : Grenade0
{
Speed 26
}
ACTOR Grenade2 : Grenade0
{
Speed 32
}
ACTOR Grenade3 : Grenade0
{
Speed 38
}
ACTOR Grenade4 : Grenade0
{
Speed 44
}
ACTOR GrenadeSmoke
{
Radius 1
Height 1
Speed 0.2
Scale 0.15
PROJECTILE
RENDERSTYLE Translucent
Alpha 0.4
States
{
Spawn:
SMK2 ABCDEFGHIJKLM 1
Stop
}
}
ACTOR Explosion
{
Radius 2
Height 2
Speed 0.2
Scale 0.8
RenderStyle ADD
Alpha 0.75
+NOBLOCKMAP
+DROPOFF
+MISSILE
+ACTIVATEIMPACT
+NOGRAVITY
States
{
Spawn:
BOOM A 3 BRIGHT
BOOM B 3 BRIGHT
BOOM C 3 BRIGHT
TNT1 AAAAAAAA 2 A_CustomMissile("Smoke",Random(10,30),Random(-20,20),Random(0,360),0)
Stop
}
}
ACTOR ExplosionSpawn
{
Speed 20
PROJECTILE
+NOCLIP
States
{
Spawn:
TNT1 AA 1 A_CustomMissile("Explosion2",0,0,random(-2,2),2,random(-2,2))
Stop
}
}
ACTOR Explosion2 : Explosion
{
SeeSound "weapons/grenades/explode"
States
{
Spawn:
BOOM A 3 BRIGHT
BOOM B 3 BRIGHT
BOOM C 3 BRIGHT
TNT1 AAAAAAAA 2 A_CustomMissile("Smoke",Random(10,30),Random(-20,20),Random(0,360),0)
Stop
}
}
ACTOR Smoke
{
Radius 2
Height 2
Speed 1
Scale 0.8
RenderStyle Translucent
Alpha 0.4
+NOBLOCKMAP
+DROPOFF
+MISSILE
+ACTIVATEIMPACT
+NOGRAVITY
States
{
Spawn:
SMK2 ABCDEFGHIJKLMNOPQ 2
Stop
}
}
ACTOR GrenadeAmmo : Ammo
{
Inventory.Icon "HGREA0"
Inventory.Amount 5
Inventory.MaxAmount 50
Ammo.BackpackAmount 10
Ammo.BackpackMaxAmount 50
Inventory.PickupSound "misc/grenade_pkup"
Inventory.PickupMessage "Grenades"
Scale 0.5
States
{
Spawn:
HGRE A -1
Stop
}
}
Update: Putting the flag in didn't matter. I know I'm typing it correctly, because it's giving me an uknown flag error if it's not. (Even though for some reason the AMMO_OPTIONAL flag in those scripts is written different in the Wiki. I figured putting the autoaim flag there was the proper place to put it, but I see no difference. I can't tell if I'm putting it in the wrong place or it's just not working, I'm no advanced coder.) However, I'm almost positive it's the particular level WAD I'm playing, (Doom 2 Reloaded) not the gameplay WAD itself. I just tried Vanilla Doom with Doom Rising, purposely missing enemies that were causing problems with rockets and grenades....and they all missed like it should of. I"m going to try and put back D2RELOADED.WAD back in, but this time put it in the top of the load order (with ZDL) and instead have the Doom Rising wads on the bottom.
http://forum.zdoom.org/viewtopic.php?f=19&t=26302
Seem to of found a more specific cause. It seems to turn on as soon as you aim/fire on a specific type of monster. Once you turn it off after that point, it seems to stay off until you encounter a new monster that...."flags" the autoaim on. I can only guess that all this resets if you start a new game as well, making you have to turn it all off again.
I found this flag, +WEAPON.NOAUTOAIM, on the ZDoom wiki. "A weapon with that flag will not adjust the aim of an attack, no matter the player's autoaim settings. This is intended to be used only for projectiles affected by gravity, such as grenades, where the player will usually want to aim higher than in a straight line, though it does also affect hitscan and railgun attacks. "
http://zdoom.org/wiki/Actor_flags#WEAPON.NOAUTOAIM
I'm thinking of just putting this in. Does the location of this command matter? Like the very top of the script?
Here's the code for the rocket launcher.
[spoiler]ACTOR Doom3RocketLauncher : RocketLauncher Replaces RocketLauncher
{
Inventory.PickupMessage "Rocket Launcher"
Inventory.PickupSound "misc/weapon_pkup"
weapon.selectionorder 250
Weapon.AmmoType1 "XRockets"
Weapon.AmmoType2 "Rockets"
Weapon.AmmoGive1 0
Weapon.AmmoGive2 5
Weapon.AmmoUse1 1
Weapon.AmmoUse2 0
Weapon.Kickback 160
+AMMO_OPTIONAL
States
{
Spawn:
LAUN A -1
Loop
Ready:
D3RS ABCD 1
D3RS E 1 A_PlaySound("weapons/rocketlauncher/raise")
D3RS FGHIJ 1
D3RL A 1 A_WeaponReady
Goto Ready+10
Deselect:
D3RS EDCBA 1 A_Lower
Goto Deselect+4
Select:
D3RS A 1
D3RS AA 0 A_Raise
Loop
Fire:
D3RL A 0 A_JumpIfNoAmmo("AltFire")
D3RL A 0 A_PlaySound("weapons/rocketlauncher/fire")
D3RL A 2 A_GunFlash
D3RL B 2
D3RL C 2
D3RL D 2
D3RL E 2
D3RL F 14
D3RL EDCB 2
D3RL B 1 A_Refire
Goto Ready+10
AltFire:
D3RR A 0 A_JumpIfInventory("XRockets",5,4)
D3RR A 0 A_JumpIfInventory("Rockets",1,"ReloadStart")
D3RR A 0 A_JumpIfInventory("XRockets",1,2)
D3RR A 0
Goto NoAmmo
D3RR A 0
Goto Ready+10
ReloadStart:
D3RR A 0 A_PlaySound("weapons/rocketlauncher/reload")
D3RR BCDEFGHI 2
D3RR J 16
D3RR K 2
D3RR L 8
D3RR KJ 2
D3RR IHGFEDCB 1
Goto ReloadCheck
ReloadCheck:
D3RR A 0 A_JumpIfInventory("XRockets",5,2)
D3RR A 0 A_JumpIfInventory("Rockets",1,"ReloadSystem")
D3RR A 0
Goto Ready+10
ReloadSystem:
D3RR A 0 A_TakeInventory("Rockets",1)
D3RR A 0 A_GiveInventory("XRockets",1)
Goto ReloadCheck
NoAmmo:
SISG A 0 A_JumpIfInventory("Doom3PlasmaRifle",1,"SelectPlasma")
SISG A 0 A_JumpIfInventory("Doom3Chaingun",1,"SelectChaingun")
SISG A 0 A_JumpIfInventory("Doom3Machinegun",1,"SelectMachinegun")
SISG A 0 A_JumpIfInventory("Doom3Shotgun",1,"SelectShotgun")
SISG A 0 A_JumpIfInventory("Doom3BFG9000",1,"SelectBFG")
SISG A 0 A_JumpIfInventory("Doom3Grenades",1,"SelectGrenades")
SISG A 0 A_JumpIfInventory("Doom3Pistol",1,"SelectPistol")
SISG A 0 A_JumpIfInventory("Doom3Chainsaw",1,"SelectChainsaw")
SISG A 0 A_SelectWeapon("Doom3Fists")
Goto Deselect
SelectPlasma:
SISG A 0 A_JumpIfInventory("XCells",1,3)
SISG A 0 A_JumpIfInventory("Cells",1,2)
SISG A 0
Goto NoAmmo+1
SISG A 0 A_SelectWeapon("Doom3PlasmaRifle")
Goto Deselect
SelectChaingun:
SISG A 0 A_JumpIfInventory("XAmmoBelt",1,3)
SISG A 0 A_JumpIfInventory("AmmoBelt",1,2)
SISG A 0
Goto NoAmmo+2
SISG A 0 A_SelectWeapon("Doom3Chaingun")
Goto Deselect
SelectMachinegun:
SISG A 0 A_JumpIfInventory("XClip",1,3)
SISG A 0 A_JumpIfInventory("D3Clip",1,2)
SISG A 0
Goto NoAmmo+3
SISG A 0 A_SelectWeapon("Doom3MachineGun")
Goto Deselect
SelectShotgun:
SISG A 0 A_JumpIfInventory("XShells",1,3)
SISG A 0 A_JumpIfInventory("Shells",1,2)
SISG A 0
Goto NoAmmo+4
SISG A 0 A_SelectWeapon("Doom3Shotgun")
Goto Deselect
SelectBFG:
SISG A 0 A_JumpIfInventory("XBFGCell",1,3)
SISG A 0 A_JumpIfInventory("BFGCell",1,2)
SISG A 0
Goto NoAmmo+5
SISG A 0 A_SelectWeapon("Doom3BFG9000")
Goto Deselect
SelectGrenades:
SISG A 0 A_JumpIfInventory("GrenadeAmmo",1,2)
SISG A 0
Goto NoAmmo+6
SISG A 0 A_SelectWeapon("Doom3Grenades")
Goto Deselect
SelectPistol:
SISG A 0 A_JumpIfInventory("XBullets",1,3)
SISG A 0 A_JumpIfInventory("Bullets",1,2)
SISG A 0
Goto NoAmmo+7
SISG A 0 A_SelectWeapon("Doom3Pistol")
Goto Deselect
SelectChainsaw:
SISG A 0 A_SelectWeapon("Doom3Chainsaw")
Goto Deselect
Flash:
D3RF A 2 BRIGHT
D3RF B 2 BRIGHT A_FireCustomMissile("Doom3Rocket", 0, 1, 1, 0)
D3RF C 2 BRIGHT Radius_Quake(5,4,0,1,0)
D3RF D 2 BRIGHT
D3RF E 2 BRIGHT
Stop
}
}
ACTOR Doom3Rocket
{
Radius 10
Height 8
Speed 20
Scale 0.8
Damage 20
Projectile
+RANDOMIZE
DeathSound "weapons/rocketlauncher/explode"
Obituary "$OB_MPROCKET"
States
{
Spawn:
MISL A 0
MISL A 0 A_PlaySoundEx("weapons/rocketlauncher/rocketloop","weapon",1)
MISL A 2 BRIGHT A_CustomMissile("RocketSmoke",4,0,0,0)
Loop
Death:
TNT1 A 0
TNT1 A 0 A_StopSoundEx("weapon")
TNT1 A 0 A_CustomMissile("RExplosion",0,0,180,0)
TNT1 A 2 A_Explode
TNT1 B 2 Radius_Quake(3,5,0,16,0)
Stop
}
}
ACTOR RExplosion
{
Radius 2
Height 2
Speed 0.2
Scale 0.9
RenderStyle ADD
Alpha 0.75
+NOBLOCKMAP
+DROPOFF
+MISSILE
+ACTIVATEIMPACT
+NOGRAVITY
States
{
Spawn:
BOOM A 3 BRIGHT
BOOM B 3 BRIGHT
BOOM C 3 BRIGHT
TNT1 AAAAAAAA 2 A_CustomMissile("Smoke",Random(10,30),Random(-20,20),Random(0,360),0)
Stop
}
}
ACTOR RocketSmoke
{
Radius 1
Height 1
Speed 0.2
Scale 0.2
PROJECTILE
RENDERSTYLE Translucent
Alpha 0.4
States
{
Spawn:
SMOK ABCDEFGHIJKLM 1
Stop
}
}
ACTOR RocketXSmoke
{
Radius 2
Height 2
Speed 1
RenderStyle Translucent
Alpha 0.4
+NOBLOCKMAP
+DROPOFF
+MISSILE
+ACTIVATEIMPACT
+NOGRAVITY
States
{
Spawn:
SMK2 ABCD 3
SMK2 EFGHIJKLM 2
Stop
}
}
ACTOR XRockets : Ammo
{
Inventory.Amount 5
Inventory.MaxAmount 5
Ammo.BackpackAmount 0
Ammo.BackpackMaxAmount 5
Inventory.icon "ROCKA0"
}
ACTOR Rockets : Ammo
{
Inventory.Amount 5
Inventory.MaxAmount 50
Ammo.BackpackAmount 10
Ammo.BackpackMaxAmount 100
Inventory.PickupMessage "Rockets"
Inventory.PickupSound "misc/rocket_pkup"
Inventory.Icon "ROCKA0"
Scale 0.8
States
{
Spawn:
ROCK A -1
Stop
}
}
ACTOR LargeRockets : Rockets
{
Inventory.Amount 10
States
{
Spawn:
BROK A -1
Stop
}
}[/spoiler]
And here's the code for the grenades.
[spoiler]ACTOR Doom3Grenades : Weapon
{
Inventory.Icon "HGREA0"
Inventory.PickupSound "misc/weapon_pkup"
Weapon.SelectionOrder 200
Weapon.AmmoType "GrenadeAmmo"
Weapon.AmmoUse 1
Weapon.AmmoGive 0
Weapon.Kickback 100
States
{
Spawn:
HGRE A -1
Loop
Ready:
D3HS A 1 A_PlaySound("weapons/grenades/raise")
D3HS BCDEFGH 1
D3HG A 0 A_CheckReload
D3HG A 1 A_WeaponReady
Goto Ready+9
Deselect:
D3HS E 0 A_StopSoundEx("weapon")
D3HS EDCBA 1 A_Lower
Goto Deselect+5
Select:
D3HS A 1
D3HS AA 0 A_Raise
Loop
Fire:
D3HG B 1 A_PlaySoundEx("weapons/grenades/fire","weapon")
D3HG CDEFG 1
TNT1 A 16
TNT1 A 1 A_Refire
Goto Throw0
Hold:
TNT1 A 0 A_JumpIfInventory("GrenadeHolder",50,"Explode")
TNT1 A 0 A_JumpIfInventory("GrenadeHolder",40,12)
TNT1 A 0 A_JumpIfInventory("GrenadeHolder",30,9)
TNT1 A 0 A_JumpIfInventory("GrenadeHolder",20,6)
TNT1 A 0 A_JumpIfInventory("GrenadeHolder",10,3)
TNT1 A 2 A_GiveInventory("GrenadeHolder",1)
TNT1 A 1 A_Refire
Goto Throw0
TNT1 A 2 A_GiveInventory("GrenadeHolder",1)
TNT1 A 1 A_Refire
Goto Throw1
TNT1 A 2 A_GiveInventory("GrenadeHolder",1)
TNT1 A 1 A_Refire
Goto Throw2
TNT1 A 2 A_GiveInventory("GrenadeHolder",1)
TNT1 A 1 A_Refire
Goto Throw3
TNT1 A 2 A_GiveInventory("GrenadeHolder",1)
TNT1 A 1 A_Refire
Goto Throw4
Throw0:
THRW A 0 A_TakeInventory("GrenadeHolder")
THRW ABC 1
THRW D 1 A_FireCustomMissile("Grenade0",0,1,0,16)
THRW EFG 1
TNT1 A 10
D3HS ABCDEFGH 1
Goto Ready+8
Throw1:
THRW A 0 A_TakeInventory("GrenadeHolder")
THRW ABC 1
THRW D 1 A_FireCustomMissile("Grenade1",0,1,0,16)
THRW EFG 1
TNT1 A 10
D3HS ABCDEFGH 1
Goto Ready+8
Throw2:
THRW A 0 A_TakeInventory("GrenadeHolder")
THRW ABC 1
THRW D 1 A_FireCustomMissile("Grenade2",0,1,0,22)
THRW EFG 1
TNT1 A 10
D3HS ABCDEFGH 1
Goto Ready+8
Throw3:
THRW A 0 A_TakeInventory("GrenadeHolder")
THRW ABC 1
THRW D 1 A_FireCustomMissile("Grenade3",0,1,0,28)
THRW EFG 1
TNT1 A 10
D3HS ABCDEFGH 1
Goto Ready+8
Throw4:
THRW A 0 A_TakeInventory("GrenadeHolder")
THRW ABC 1
THRW D 1 A_FireCustomMissile("Grenade4",0,1,0,34)
THRW EFG 1
TNT1 A 10
D3HS ABCDEFGH 1
Goto Ready+8
Explode:
TNT1 A 0
TNT1 A 0 A_TakeInventory("GrenadeHolder")
TNT1 A 0 A_FireCustomMissile("ExplosionSpawn",0,1,0,0)
TNT1 A 0 Thing_Damage(0,1000)
TNT1 A 10
D3HS ABCDEFGH 1
Goto Ready+8
}
}
ACTOR GrenadeHolder : Inventory
{
Inventory.MaxAmount 1
Inventory.MaxAmount 50
}
ACTOR Grenade0
{
Radius 8
Height 8
Speed 20
Damage 15
XScale 0.5
YScale 0.4
PROJECTILE
+NOBLOCKMAP
+DROPOFF
+MISSILE
+ACTIVATEIMPACT
+ACTIVATEPCROSS
+DOOMBOUNCE
-NOGRAVITY
BounceFactor 0.6
Obituary "%o caught %k's grenade."
SeeSound "weapons/grenades/bounce"
DeathSound "weapons/grenades/explode"
States
{
Spawn:
D3HW A 2 A_CustomMissile("GrenadeSmoke",0,1,0,0)
D3HW B 2 A_CustomMissile("GrenadeSmoke",0,1,0,0)
D3HW C 2 A_CustomMissile("GrenadeSmoke",0,1,0,0)
D3HW D 2 A_CustomMissile("GrenadeSmoke",0,1,0,0)
Loop
Death:
TNT1 A 0
TNT1 A 0 A_CustomMissile("Explosion",0,0,0,0)
TNT1 A 2 A_Explode
TNT1 B 2 Radius_Quake(4,5,0,16,0)
Stop
}
}
ACTOR Grenade1 : Grenade0
{
Speed 26
}
ACTOR Grenade2 : Grenade0
{
Speed 32
}
ACTOR Grenade3 : Grenade0
{
Speed 38
}
ACTOR Grenade4 : Grenade0
{
Speed 44
}
ACTOR GrenadeSmoke
{
Radius 1
Height 1
Speed 0.2
Scale 0.15
PROJECTILE
RENDERSTYLE Translucent
Alpha 0.4
States
{
Spawn:
SMK2 ABCDEFGHIJKLM 1
Stop
}
}
ACTOR Explosion
{
Radius 2
Height 2
Speed 0.2
Scale 0.8
RenderStyle ADD
Alpha 0.75
+NOBLOCKMAP
+DROPOFF
+MISSILE
+ACTIVATEIMPACT
+NOGRAVITY
States
{
Spawn:
BOOM A 3 BRIGHT
BOOM B 3 BRIGHT
BOOM C 3 BRIGHT
TNT1 AAAAAAAA 2 A_CustomMissile("Smoke",Random(10,30),Random(-20,20),Random(0,360),0)
Stop
}
}
ACTOR ExplosionSpawn
{
Speed 20
PROJECTILE
+NOCLIP
States
{
Spawn:
TNT1 AA 1 A_CustomMissile("Explosion2",0,0,random(-2,2),2,random(-2,2))
Stop
}
}
ACTOR Explosion2 : Explosion
{
SeeSound "weapons/grenades/explode"
States
{
Spawn:
BOOM A 3 BRIGHT
BOOM B 3 BRIGHT
BOOM C 3 BRIGHT
TNT1 AAAAAAAA 2 A_CustomMissile("Smoke",Random(10,30),Random(-20,20),Random(0,360),0)
Stop
}
}
ACTOR Smoke
{
Radius 2
Height 2
Speed 1
Scale 0.8
RenderStyle Translucent
Alpha 0.4
+NOBLOCKMAP
+DROPOFF
+MISSILE
+ACTIVATEIMPACT
+NOGRAVITY
States
{
Spawn:
SMK2 ABCDEFGHIJKLMNOPQ 2
Stop
}
}
ACTOR GrenadeAmmo : Ammo
{
Inventory.Icon "HGREA0"
Inventory.Amount 5
Inventory.MaxAmount 50
Ammo.BackpackAmount 10
Ammo.BackpackMaxAmount 50
Inventory.PickupSound "misc/grenade_pkup"
Inventory.PickupMessage "Grenades"
Scale 0.5
States
{
Spawn:
HGRE A -1
Stop
}
}[/spoiler]
Update: Putting the flag in didn't matter. I know I'm typing it correctly, because it's giving me an uknown flag error if it's not. (Even though for some reason the AMMO_OPTIONAL flag in those scripts is written different in the Wiki. I figured putting the autoaim flag there was the proper place to put it, but I see no difference. I can't tell if I'm putting it in the wrong place or it's just not working, I'm no advanced coder.) However, I'm almost positive it's the particular level WAD I'm playing, (Doom 2 Reloaded) not the gameplay WAD itself. I just tried Vanilla Doom with Doom Rising, purposely missing enemies that were causing problems with rockets and grenades....and they all missed like it should of. I"m going to try and put back D2RELOADED.WAD back in, but this time put it in the top of the load order (with ZDL) and instead have the Doom Rising wads on the bottom.