shade2345 Posted April 14, 2013 I am trying to add empty bullets to eject from most of my guns. For example, Brutal Dooms Pistol ejects bullets from the right side of the gun when the player fires the gun. I want to do this for my weapons, as I said before. I made individual sprites for different types of bullets that I want to eject from the guns. I got the pistol to get the bullets to apper, but the problem is that when the pistol fires, multiple abullets appear on the floor from thin air. How do I get the bullet to eject from the side of the gun where the player clearly sees it. I did not want to muck up this thread with code, but the explanation is rather long, sorry for that. 0 Quote Share this post Link to post
Blue Shadow Posted April 15, 2013 Can't you look in Brutal Doom's code to figure it out? 0 Quote Share this post Link to post
Krispy Posted April 15, 2013 Have you taken a look at Realm667's bullet casing spawner? 0 Quote Share this post Link to post
shade2345 Posted April 15, 2013 I have seen the bullet casing spawner, although I'm not to goo with the decorate scripting lump and I tried adding it to the pistol and I get the same results. 0 Quote Share this post Link to post
shade2345 Posted April 15, 2013 Could someone help me understand how the lump for casing spawners work? I am very confused. I do not know the commands I would have to put in my weapons scripting lump. 0 Quote Share this post Link to post
shade2345 Posted April 15, 2013 I also believe that the CasingSpawner is only for scenery in a map. I looked at the info in the wad and the author said something about three arguments. The argumentswere used to put the bullets in the map. it also said something sbout adding your own. I don't know how to work with this so that it could work with my gun properly. 0 Quote Share this post Link to post
GreyGhost Posted April 15, 2013 Haven't used the casing spawner for a while, but using it is a matter of adding a spawn line at a suitable spot in the weapon fire state. In the following examples the spawn lines are in bold and seem to work fairly well.ACTOR Handgun : Pistol replaces Pistol { Weapon.AmmoGive 50 Weapon.SlotNumber 2 States { Fire: PISG A 4 PISG B 6 A_FirePistol TNT1 A 0 A_SpawnItemEx("DeadBulletCasing", Random(-16, 16), Random(-16, 16), 0, 0, 0, 0, Random(0, 360), 128) PISG C 4 PISG B 5 A_ReFire Goto Ready } } ACTOR Boomstick : Shotgun replaces Shotgun { Weapon.SlotNumber 3 States { Fire: SHTG A 3 SHTG A 7 A_FireShotgun SHTG BC 5 SHTG D 4 TNT1 A 0 A_SpawnItemEx("DeadShotgunCasing", Random(-16, 16), Random(-16, 16), 0, 0, 0, 0, Random(0, 360), 128) SHTG CB 5 SHTG A 3 SHTG A 7 A_ReFire Goto Ready } } ACTOR SuperBoomstick : SuperShotgun replaces SuperShotgun { Weapon.SlotNumber 3 States { Fire: SHT2 A 3 SHT2 A 7 A_FireShotgun2 SHT2 B 7 SHT2 C 7 A_CheckReload SHT2 D 7 A_OpenShotgun2 TNT1 A 0 A_SpawnItemEx("DeadShotgunCasing", Random(-16, 16), Random(-16, 16), 0, 0, 0, 0, Random(0, 360), 128) TNT1 A 0 A_SpawnItemEx("DeadShotgunCasing", Random(-16, 16), Random(-16, 16), 0, 0, 0, 0, Random(0, 360), 128) SHT2 E 7 SHT2 F 7 A_LoadShotgun2 SHT2 G 6 SHT2 H 6 A_CloseShotgun2 SHT2 A 5 A_ReFire Goto Ready } } ACTOR BigGun : Chaingun replaces Chaingun { Weapon.SlotNumber 4 States { Fire: CHGG AB 4 A_FireCGun TNT1 A 0 A_SpawnItemEx("DeadBulletCasing", Random(-16, 16), Random(-16, 16), 0, 0, 0, 0, Random(0, 360), 128) CHGG B 0 A_ReFire Goto Ready } } You'll notice I used two spawn lines for the super shotgun since it's ejecting two casings at once. 1 Quote Share this post Link to post
shade2345 Posted April 15, 2013 Wow, I truly cannot thank you enough. It worked for the weapons. Thank you so much. 0 Quote Share this post Link to post
Bites! Posted July 21, 2019 On 4/15/2013 at 6:28 AM, GreyGhost said: Haven't used the casing spawner for a while, but using it is a matter of adding a spawn line at a suitable spot in the weapon fire state. In the following examples the spawn lines are in bold and seem to work fairly well. ACTOR Handgun : Pistol replaces Pistol { Weapon.AmmoGive 50 Weapon.SlotNumber 2 States { Fire: PISG A 4 PISG B 6 A_FirePistol TNT1 A 0 A_SpawnItemEx("DeadBulletCasing", Random(-16, 16), Random(-16, 16), 0, 0, 0, 0, Random(0, 360), 128) PISG C 4 PISG B 5 A_ReFire Goto Ready } } ACTOR Boomstick : Shotgun replaces Shotgun { Weapon.SlotNumber 3 States { Fire: SHTG A 3 SHTG A 7 A_FireShotgun SHTG BC 5 SHTG D 4 TNT1 A 0 A_SpawnItemEx("DeadShotgunCasing", Random(-16, 16), Random(-16, 16), 0, 0, 0, 0, Random(0, 360), 128) SHTG CB 5 SHTG A 3 SHTG A 7 A_ReFire Goto Ready } } ACTOR SuperBoomstick : SuperShotgun replaces SuperShotgun { Weapon.SlotNumber 3 States { Fire: SHT2 A 3 SHT2 A 7 A_FireShotgun2 SHT2 B 7 SHT2 C 7 A_CheckReload SHT2 D 7 A_OpenShotgun2 TNT1 A 0 A_SpawnItemEx("DeadShotgunCasing", Random(-16, 16), Random(-16, 16), 0, 0, 0, 0, Random(0, 360), 128) TNT1 A 0 A_SpawnItemEx("DeadShotgunCasing", Random(-16, 16), Random(-16, 16), 0, 0, 0, 0, Random(0, 360), 128) SHT2 E 7 SHT2 F 7 A_LoadShotgun2 SHT2 G 6 SHT2 H 6 A_CloseShotgun2 SHT2 A 5 A_ReFire Goto Ready } } ACTOR BigGun : Chaingun replaces Chaingun { Weapon.SlotNumber 4 States { Fire: CHGG AB 4 A_FireCGun TNT1 A 0 A_SpawnItemEx("DeadBulletCasing", Random(-16, 16), Random(-16, 16), 0, 0, 0, 0, Random(0, 360), 128) CHGG B 0 A_ReFire Goto Ready } } You'll notice I used two spawn lines for the super shotgun since it's ejecting two casings at once. This has help me a lot uwu 0 Quote Share this post Link to post
Archanhell Posted July 27, 2019 On 7/21/2019 at 12:35 PM, Bites! said: This has help me a lot uwu You realize this is a 6-years old Thread? No need to say "This has help me a lot" sincerely, as It's basically necroposting. Sorry but gotta avoid folks getting in trouble for this kind of mistakes. 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.