
i tried it and when i picked the shotgun up. well. nothing worked anymore.
Uhm, no. These projects were started much before CustomInventory was even introduced.wildweasel wrote:Because it hadn't been discovered at that point that one could just create a dummy Decorate inventory item to serve as the Reload key. Earlier ACS reload scripts relied on the player pressing a key to puke the respective script to give the player a flag to reload. Nowadays, though, we've figured out that such a thing can be done using CustomInventory.ThatOneZDoomer wrote:Also, how come early reloading systems like this mod (and others like Zen Dynamics) used ACS compared to the decorate based systems of later reloading systems?
It covers the whole screen and takes about five or more seconds to fade away, which to me, is a little too long when I already read what's written. I guess I wouldn't care so much about how long it stays onscreen if it didn't block my view so much. I think it could be improved by showing only text and maybe a picture or two to get the point across. This way, you can still see the rest of the screen when it comes up. Also, I think it should be toggle based, so that it stays up till you hit the objective key to make it go away, similar to how Zen Dynamics does it.JonnyFive wrote:ThatOne, what didn't you like about the objective HUD? I'm very open to suggestions for making it better.
And MechWarrior, while we're at it.ThatOneZDoomer wrote:Also, I think it should be toggle based, so that it stays up till you hit the objective key to make it go away, similar to how Zen Dynamics does it.
An ammo-pool system is cakewalk with a simple mix of ACS and DECORATE.JonnyFive wrote:I like the magazine-based system a lot, and it seems easier to implement than trying to do an ammo-pool-based system through DECORATE. I'll just go back and re-do the ammo layout as needed.
Code: Select all
/* DECORATE */
// In-Clip Pistol ammo
ACTOR PistolAmmo : Ammo
{
Inventory.Amount 12
Inventory.MaxAmount 12
Inventory.Icon "CLIPB0"
Ammo.BackpackAmount 0
Ammo.BackpackMaxAmount 12
+QUIET
+IGNORESKILL
}
ACTOR NewPistol : Weapon replaces Pistol
{
Obituary "%o was tickled by %k's pea shooter"
Weapon.SelectionOrder 1900
Weapon.KickBack 125
Weapon.AmmoType "PistolAmmo"
Weapon.AmmoType2 "Clip" // Displays reserve ammo
Weapon.AmmoUse 1
Weapon.AmmoUse2 0
+AMMO_OPTIONAL
+WIMPY_WEAPON
States
{
Ready:
NPIS A 1 A_WeaponReady
NPIS A 0 A_JumpIfInventory("PistolAmmo",12,"Ready") // No reload on full clip
NPIS A 0 A_JumpIfInventory("Reloader",1,"PreReload") // Reload?
Loop
PreReload:
NPIS A 0 A_JumpIfInventory("Clip",1,"Reload") // Got any extra ammo?
Goto Ready
Reload:
NPIS F 3 A_PlayWeaponSound("weapons/pistol/clipout")
NPIS A 6
NPIS A 4 A_PlayWeaponSound("weapons/pistol/clipin")
NPIS G 4
NPIS H 4
NPIS IJ 5
NPIS K 5
NPIS L 4 A_PlayWeaponSound("weapons/pistol/slide")
NPIS M 4
NPIS N 6
NPIS G 3
NPIS A 0 A_TakeInventory("Realoder")
NPIS A 0 ACS_ExecuteAlways(778,0,2) // Reload ammo. 2 == PISTOL
NPIS A 1 A_WeaponReady
Goto Ready
Fire:
NPIS A 0 A_JumpIfNoAmmo("DryFire")
NPIS A 0 A_PlayWeaponSound("weapons/pistol/fire")
NPIS A 0 A_GunFlash
NPIS B 5 A_FireBullets(2.2,1.6,1,8,"RicochetPuff")
NPIS C 3
NPIS D 3
NPIS A 4
NPIS A 0 A_ReFire
Goto Ready
DryFire:
NPIS A 10 A_PlayWeaponSound("weapons/click")
NPIS A 0 A_ReFire
Goto Ready
// Rest of the states go here...
}
}
/* ACS */
#define PISTOL 2
#define PISMAX 12
#define ASSAULTRIFLE 4
#define ARMAX 35
/ Ammo synchonizer. When you reload, this script fills up the ammo
// for your current weapon and also takes the appropriate amount away
// from your backup stash of ammo. Some management is handled by DECORATE,
// so for this script it IS ASSUMED that the player has at least 1 backup
// unit of ammo and has at most MaxAmmoInClip - 1 in clip.
script 778 (int weapon) {
int missing;
if ( weapon == PISTOL ) {
missing = PISMAX - CheckInventory("PistolAmmo");
// Either you have enough backup ammo to fill what is missing
// or you don't
if ( CheckInventory("Clip") >= missing ) {
// Have enough to fill
TakeInventory("Clip",missing);
GiveInventory("PistolAmmo",PISMAX);
} else {
// Don't have enough to fill
GiveInventory("PistolAmmo", CheckInventory("Clip") );
TakeInventory("Clip",PISMAX);
}
}
if ( weapon == ASSAULTRIFLE ) {
missing = ARMAX - CheckInventory("ARAmmo");
if ( CheckInventory("Clip") >= missing ) {
TakeInventory("Clip",missing);
GiveInventory("ARAmmo",ARMAX);
} else {
GiveInventory("ARAmmo", CheckInventory("Clip") );
TakeInventory("Clip",ARMAX);
}
}
}
Timeline time:SnowKate709 wrote:Uhm, no. These projects were started much before CustomInventory was even introduced.wildweasel wrote:Because it hadn't been discovered at that point that one could just create a dummy Decorate inventory item to serve as the Reload key. Earlier ACS reload scripts relied on the player pressing a key to puke the respective script to give the player a flag to reload. Nowadays, though, we've figured out that such a thing can be done using CustomInventory.ThatOneZDoomer wrote:Also, how come early reloading systems like this mod (and others like Zen Dynamics) used ACS compared to the decorate based systems of later reloading systems?