Page 224 of 972

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

Posted: Mon Jul 01, 2013 6:32 am
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.

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

Posted: Mon Jul 01, 2013 11:33 am
by albiongeck
That's a nice resource. Thanks.

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

Posted: Mon Jul 01, 2013 12:01 pm
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?

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

Posted: Mon Jul 01, 2013 1:37 pm
by Matt
Make a text file with all the new sound definitions you need, then save it as sndinfo.txt in your pk3?

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

Posted: Mon Jul 01, 2013 1:46 pm
by Ghostbreed
But I don't know the defs

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

Posted: Mon Jul 01, 2013 1:48 pm
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.

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

Posted: Mon Jul 01, 2013 2:02 pm
by Ghostbreed
Thanks alot W

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

Posted: Mon Jul 01, 2013 4:18 pm
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.

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

Posted: Mon Jul 01, 2013 4:53 pm
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.

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

Posted: Mon Jul 01, 2013 5:13 pm
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
  }
}

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

Posted: Mon Jul 01, 2013 5:49 pm
by jpalomo
Adding the Weapon.Ammo_Optional flag should fix that.

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

Posted: Mon Jul 01, 2013 5:51 pm
by MONKET
That did the trick, thanks!

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

Posted: Tue Jul 02, 2013 1:25 pm
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.

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

Posted: Tue Jul 02, 2013 9:13 pm
by rollingcrow
How do I make skills not highlight in red in the skill selection menu? (how long has it been like this?)

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

Posted: Thu Jul 04, 2013 12:32 am
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.