The "How do I..." Thread

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
Andie
Posts: 53
Joined: Sun May 19, 2013 3:33 pm

Re: The "How do I..." Thread

Post by Andie »

Kappes Buur wrote:
Andie wrote:..... I had a page bookmarked on telus.net, .......
Are you by any chance thinking of this webpage.
Yes, thanks! It seems I bookmarked wrong link or something, have been looking for it ever since — all in vain.
albiongeck
Posts: 182
Joined: Fri Mar 16, 2012 7:11 am
Contact:

Re: The "How do I..." Thread

Post by albiongeck »

That's a nice resource. Thanks.
User avatar
Ghostbreed
Posts: 1114
Joined: Wed Mar 24, 2010 6:19 am

Re: The "How do I..." Thread

Post by Ghostbreed »

How do I create an SNDINFO for a new Doom weapon I'm working on, when the SNDINFO was first invented for Hexen?
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: The "How do I..." Thread

Post by Matt »

Make a text file with all the new sound definitions you need, then save it as sndinfo.txt in your pk3?
User avatar
Ghostbreed
Posts: 1114
Joined: Wed Mar 24, 2010 6:19 am

Re: The "How do I..." Thread

Post by Ghostbreed »

But I don't know the defs
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: The "How do I..." Thread

Post by wildweasel »

[wiki]SNDINFO[/wiki] should give you a simple primer on how SNDINFO is defined, or if you need a whole tutorial about it, I wrote one a while ago.
User avatar
Ghostbreed
Posts: 1114
Joined: Wed Mar 24, 2010 6:19 am

Re: The "How do I..." Thread

Post by Ghostbreed »

Thanks alot W
User avatar
MONKET
Posts: 70
Joined: Mon Oct 20, 2008 2:16 pm

Re: The "How do I..." Thread

Post by MONKET »

How do I make a weapon not switch to another when empty? I have a gun with an alt-fire reload system and am trying to make it so that when the gun's magazine is empty but the player has more magazines then it jumps to another state of the gun clicking emptily. I tried putting A_JumpIfInventory("BulletsInMag",0,"Empty") in the beginning of the fire state, but then it clicks all of the time regardless of the amount of bullets currently in the player's magazine.
Blue Shadow
Posts: 5046
Joined: Sun Nov 14, 2010 12:59 am

Re: The "How do I..." Thread

Post by Blue Shadow »

Passing 0 as the amount in [wiki]A_JumpIfInventory[/wiki] means it'll only do the jump if you have the maximum amount of that item, not if you don't have any of it.
User avatar
MONKET
Posts: 70
Joined: Mon Oct 20, 2008 2:16 pm

Re: The "How do I..." Thread

Post by MONKET »

Thanks, that makes a lot more sense. But now when I try to fire after it has 0 ammo in the magazine, it just deselects and goes to another weapon still. I'm still able to select it and reload though. Here's the code, specifically:

Code: Select all

ACTOR Firearm : Weapon 2415
{
  Weapon.Slotnumber 7
  Weapon.AmmoUse1 1
  Weapon.AmmoGive1 8
  Weapon.AmmoType1 "BulletsInMag"
  Weapon.AmmoUse2 1
  Weapon.AmmoGive2 1
  Weapon.AmmoType2 "Magazine"
  Obituary "$OB_MPPISTOL"
  +WEAPON.NOAUTOFIRE
  +Weapon.NoAlert
  Inventory.Pickupmessage "Picked up a handgun."
  Weapon.BobSpeed 1.5
  Weapon.BobRangeX 0.5
  Weapon.BobRangeY 0.5
  Weapon.BobStyle "alpha"
  Weapon.UpSound "select"
  Decal BulletChip
  States
  {
  Ready:
	1911 A 2
	SHET B 2
	1911 BCDE 2
  Ready2:
    TIRD A 1 A_WeaponReady
    Loop
  Deselect:
	1911 DCB 2
	SHET B 2
	Deselect2:
    1911 A 1 A_Lower
	1911 A 0 A_Lower
    Loop
  Select:
    1911 A 1 A_Raise
	1911 A 0 A_Raise
    Loop
  Fire:
    1911 A 0 A_JumpIfNoAmmo("Click")
	1911 A 0 A_AlertMonsters
    1911 A 0 A_TakeInventory ("BulletsInMag",1)
	1911 F 2 bright A_PlaySound("Gunshot",4,2)
	1911 B 0 A_SetPitch(pitch-3)
    1911 B 0 A_FireBullets(3,3,-1,20,"BulletPuff",0,0)
	1911 G 1 A_SetPitch(pitch+1)
	1911 HH 1 A_SetPitch(pitch+.5)
	1911 II 1 A_SetPitch(pitch+.25)
	TIRD AA 1 A_SetPitch(pitch+.25)
    Goto Ready2
    Click:
	TIRD A 0 A_PlaySound("Empty", 5)
	Goto Ready2
  AltFire:
    1911 ED 2
    1911 CJ 2
	1911 K 2 A_PlaySound("Reload",5)
	1911 A 0 A_TakeInventory("Magazine",1)
	1911 LMN 2
    1911 O 36
    1911 PQR 2
	1911 S 10
	1911 KJCDE 2
    TIRD A 0 A_GiveInventory ("BulletsInMag",8)
    Goto Ready2
  Spawn:
    PIST A -1
    Stop
  }
}

ACTOR BulletsInMag : Ammo 5228
{
  +IGNORESKILL
  Inventory.MaxAmount 8
  Inventory.Icon "CLIPA0"
}

ACTOR Magazine : Ammo 5227
{
  Inventory.PickupMessage "Picked up a spare magazine."
  Inventory.Amount 1
  Inventory.MaxAmount 5
  Inventory.Icon "CLIPA0"
  States
  {
  Spawn:
    CLIP A -1
    Stop
  }
}
User avatar
jpalomo
Posts: 772
Joined: Mon May 17, 2010 9:45 am

Re: The "How do I..." Thread

Post by jpalomo »

Adding the Weapon.Ammo_Optional flag should fix that.
User avatar
MONKET
Posts: 70
Joined: Mon Oct 20, 2008 2:16 pm

Re: The "How do I..." Thread

Post by MONKET »

That did the trick, thanks!
albiongeck
Posts: 182
Joined: Fri Mar 16, 2012 7:11 am
Contact:

Re: The "How do I..." Thread

Post by albiongeck »

I'm interested in using mugshots larger than the standard Doomguy ones, the extra pixels should extend above the top of the status bar. I've already tried this using the cacodemon sprites, and it seems to work just as intended - Is there any reason this might be a bad idea for compatibility with Doom? I have already considered that if done badly it could be distracting or obscuring of the ARMS panel.
User avatar
rollingcrow
Posts: 733
Joined: Tue Mar 02, 2010 8:30 pm
Graphics Processor: nVidia with Vulkan support

Re: The "How do I..." Thread

Post by rollingcrow »

How do I make skills not highlight in red in the skill selection menu? (how long has it been like this?)
User avatar
Sgt. Shivers
Posts: 1743
Joined: Fri Jun 22, 2012 5:39 am

Re: The "How do I..." Thread

Post by Sgt. Shivers »

I'm having trouble describing this but what I want is a way to make it so if you pick up a certain weapon you can't pick up certain other weapons until you run out of ammo or drop the gun.
Locked

Return to “Editing (Archive)”