Sarge
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Railgun ammo usage
 
Author
All times are GMT. The time now is 00:00. Post New Thread    Post A Reply
D2Jk
Green Marine


Posts: 36
Registered: 03-13


Hi all,

I'm trying to add a secondary fire to railgun, which consumes less ammo but doesn't pierce. The problem is, I can't get the alt-fire to actually consume ammo, for some reason. Here's the code I'm using:

code:
ACTOR Railgunx : Weapon 1234 { Weapon.AmmoType1 "Cell" Weapon.AmmoUse 10 Weapon.SlotNumber 9 States { Ready: RAIL A 8 A_WeaponReady Loop Deselect: RAIL A 0 A_Lower Loop Select: RAIL A 0 A_Raise Loop Fire: RAIL A 0 A_Light2 RAIL B 3 Bright A_RailAttack(225,0,1,NONE,"EE EE EE",8) RAIL CD 3 Bright A_Light1 RAIL E 3 A_Light0 RAIL F 10 RAIL F 0 A_CheckReload RAIL F 50 A_PlaySound("weapons/railcharge") RAIL F 0 A_Refire goto Ready AltFire: RAIL A 0 A_Light2 RAIL B 3 Bright A_RailAttack(225,0,1,NONE,"00 00 FF",10) RAIL B 0 A_PlaySound("weapons/railcharge") RAIL CD 3 Bright A_Light1 RAIL E 3 A_Light0 RAIL F 0 A_CheckReload RAIL F 40 RAIL F 0 A_Refire goto Ready }}


As you can see, the "use ammo" boolean is properly set to "1". Why doesn't it work?

Another thing I'm wondering is that I don't see a setting which controls the ammo usage of the secondary fire. Would it be possible to work around this by making the weapon consume "1" ammo, and then making it shoot several weak beams simultaneously? The player shouldn't actually see multiple beams in that case, just a single one, but increased number of particles would be ok.

Last edited by D2Jk on 03-11-13 at 01:37

Old Post 03-10-13 17:16 #
D2Jk is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Blue Shadow
Member


Posts: 298
Registered: 09-12


Give it Weapon.AmmoUse2 and Weapon.AmmoType2 properties. These are for secondary attack.

Old Post 03-10-13 17:46 #
Blue Shadow is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
D2Jk
Green Marine


Posts: 36
Registered: 03-13


Thank you, that did it. :)


I was aware of those weapon properties, but I was assuming they were meant only for weapons using multiple ammo types.

Old Post 03-10-13 18:04 #
D2Jk is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
D2Jk
Green Marine


Posts: 36
Registered: 03-13


Edit: All sorted now.

Last edited by D2Jk on 03-11-13 at 01:37

Old Post 03-11-13 00:20 #
D2Jk is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 00:00. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Railgun ammo usage

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.