Page 31 of 45
Posted: Tue Jul 25, 2006 14:44
by MasterOFDeath
wildweasel wrote:NO.
Thirded.
Posted: Tue Jul 25, 2006 15:45
by Alter
wildweasel wrote:NO.
Fourthed
Posted: Tue Jul 25, 2006 17:49
by TheDarkArchon
The AltFire method sucks ass and this is coming from the guy who did it in the first place.
Posted: Tue Jul 25, 2006 21:27
by Doomed Soul
Hold on, I think I thought you was talking about some thing else.......and I don't know what Action_Reload is. Is that a new GZDoom feature? Dammit, I feel stupid.
Posted: Tue Jul 25, 2006 23:47
by wildweasel
Action_Reload is a new kind of reloading that DoomRater came up with. It's not a new GZDoom feature (it actually works in ZDoom as well). Basically it involves a hidden inventory item that is used when the R key is pressed.
Posted: Wed Jul 26, 2006 1:12
by Zeg-Vok
Please . . . go into further Detail

Posted: Wed Jul 26, 2006 3:42
by wildweasel
Sure thing.
The Action Reload system mainly depends on three actors - two usable CustomInventories and a dummy Inventory item.
Code: Select all
ACTOR Action_Reload : CustomInventory
{
Inventory.Amount 1
Inventory.MaxAmount 1
-INVBAR
States
{
Use:
TNT1 A 0 A_GiveInventory("IsReloading",1)
Fail
}
}
ACTOR Action_ReloadCancel : CustomInventory
{
Inventory.Amount 1
Inventory.MaxAmount 1
-INVBAR
States
{
Use:
TNT1 A 0 A_TakeInventory("IsReloading",1)
Fail
}
}
ACTOR IsReloading : Inventory
{
Inventory.Amount 1
Inventory.MaxAmount 1
-INVBAR
}
To make this work, the mod in question has to give the player both Action_Reload and Action_ReloadCancel through a script. These items are not used like other items (hence why they don't appear in the invbar). Rather, there is a special keyconf setup that must be used:
Code: Select all
addkeysection "Ransom - Stranger Pt. 2" strangerkeys
addmenukey "Reload" +ransom_reload
alias +ransom_reload "use Action_Reload"
alias -ransom_reload "use Action_ReloadCancel"
defaultbind r +ransom_reload
This setup allows both one-tap reloading (the type I'm sure everybody's used to) and Outlaws-style reloading (one bullet at a time as long as the reload key is held). In typical Doom mods, though, this would be best applied to weapons like shotguns (since I'm sure everybody has died at least once because they were stuck in the middle of a reload).
So now we have the "actions" - what we need now is how to apply this setup to a weapon. Well, that's easy!
Code: Select all
ACTOR PocketPistol : Weapon replaces Gauntlets
{
Weapon.SelectionOrder 400
Inventory.PickupSound "weapons/pgunout"
Inventory.PickupMessage "Pocket pistol (2)"
Weapon.AmmoType1 "PGunAmmo" //The guns magazine
Weapon.AmmoType2 "PGunClips" //The real ammo
Weapon.AmmoGive 0
Weapon.AmmoGive2 1
Weapon.AmmoUse 1
Weapon.Kickback 70
AttackSound "weapons/pgun"
+AMMO_OPTIONAL
+NOAUTOFIRE
Scale 0.25
States
{
Spawn:
VP70 A -1 bright
Loop
Ready:
BMKG A 1 A_WeaponReady
BMKG A 0 A_JumpIfInventory("IsReloading",1,15)
Goto Ready
Deselect:
BMKG A 1 A_Lower
Goto Deselect
Select:
BMKG A 1 A_Raise
Goto Select
Fire:
BMKG A 0
BMKG A 0 A_JumpIfNoAmmo(6)
BMKF A 1 BRIGHT A_FireBullets(3,3,-1,5.5,0,1)
BMKF B 1 BRIGHT
BMKG B 1
BMKG CB 1
Goto Ready
BMKF A 1 A_Playsound("weapons/dryfire")
BMKG BCB 1
BMKG A 8
//Reload:
TNT1 A 0 A_JumpIfInventory("PGunAmmo",6,2)
TNT1 A 0 A_JumpIfInventory("PGunClips",1,2)
TNT1 A 0
Goto Ready
TNT1 A 0 A_TakeInventory("PGunAmmo",999)
BMKR A 4
BMKR B 3 A_PlaySound("weapons/pgunout")
BMKR C 2
BMKR DEFG 1
BMKR H 18
BMKR IJK 1
BMKR L 1 A_PlaySOund("weapons/pgunin")
TNT1 A 0 A_TakeInventory("PGunClips",1)
TNT1 A 0 A_GiveInventory("PGunAmmo",999)
BMKR MNOPQ 1
BMKR R 2
BMKR S 3
BMKR T 4
Goto Ready
}
}
Notice how there are only two JumpIfInventories at the top of the "reload" section? The first one ensures that the player doesn't already have a relatively full clip (this weapon in particular will not reload if the player has more than half of the clip left). The second ensures that the player has an extra clip in reserve with which to load the weapon again. Then the game goes through the reloading animation, adding ammo to the clip and taking away one clip from reserve.
I also added some extra code in this example so that when the player fires the weapon on an empty clip, it plays an "empty" sound and goes through the reload sequence. If you don't like automatic reloading, all that needs to be done is to add a "Goto Ready" right before the marked Reload section.
Posted: Thu Jul 27, 2006 12:52
by GentryXaties
wildweasel wrote:
1. Paint Your Wagon
Does that mean that on the easiest skill level of the game, we get to watch the monsters sing and dance before they beat the piss out of you? =P
Posted: Thu Jul 27, 2006 16:46
by wildweasel
"Hey. You paintin' yer wagon?"
"Yeah. Got a problem with that?"
"You missed a spot."
Posted: Thu Jul 27, 2006 17:10
by MaxPower8905
"Well then, grab a brush and join in!"
"Gonna paint the wagon! Gonna paint it fine! Gonna use all this paint because the wood is pine!"
I just had to say that, since that was the exact same thing I thought when I read that.

Posted: Thu Jul 27, 2006 23:14
by Doomed Soul
Ahhh....BRILLIANT!!!!!!!!!!!!!!!!! That was concerning action_reload. Now, concerning the "Paintin' the Wagon" thing, can I import .jpg format abstract wall paper and have a pscychodelic(?) wagon? jk

. AH-HAH!!!! Use ACS scripting to somehow change the texture of the wagon's sides if a jpg, bmp, png, or other format is also loaded with the, um, western thing. So you can "Paint" your "wagon"!!!! Or just add a "weapon" that is a paint brush who's decal is a paint brush stroke. That would be pretty cool.
Posted: Fri Jul 28, 2006 21:18
by Marty Kirra
Er...it's just a difficulty setting.
Nice progress Weasel. I'm probley going to be on more again, like before. So if you need anything, I'm here

Posted: Sun Jul 30, 2006 0:37
by Doomed Soul
I still want to paint a wagon....
Posted: Sun Jul 30, 2006 1:20
by wildweasel
Then paint your damn wagon. =P
Posted: Tue Aug 01, 2006 0:13
by wildweasel
Ransom
- Added the tomed dual revolvers - using modified Slug Pistol graphics by Paul.
- Fixed more editor numbers into Replaces.
- Fixed a major error with the tomed pocket shotgun.
- Repaired a few minor organizational errors.