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.
Prodigy0106

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

Post by Prodigy0106 »

I'm attempting to create a playerclass based on mario, and I'm trying to make it so when the player stops running, it scoots a few inches like in mario 3. I have all the sprites, just need help with this. Any advice?
User avatar
TheMightyHeracross
Posts: 2100
Joined: Sun Aug 18, 2013 9:41 am
Location: Philadelphia, PA

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

Post by TheMightyHeracross »

Thel wrote:how do i do a combo lock door like in duke3D (3 switches)? can someone expert on acs help me?

Image
I made a resource for this under my old name Isaacjedi5 that I moved to my resource thread here that IMO is neater and easier to read than the one Enjay linked to.
Although it doesn't have the randomly switching to a different combination on startup.
EDIT: New page, so post quoted.
User avatar
cortlong50
Posts: 753
Joined: Mon Jun 24, 2013 7:12 pm
Location: UT-WA

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

Post by cortlong50 »

I have a question.
It's kind of a funky one and mildly self explanatory but I want opinions.
My mod (operation inhuman) kinda runs like poop. I get around 120 with accessories to murder and like 50 or so with pfenh.
Yet for some reason my mod only allows like 35-45 at the most.
Now it runs a lot of particles and dynamic lights and all that but even just standing thre it is killing my frames. Even indoor staring at a wall.
So I have a question. My decorate coding is a mess and my effects lump is an even bigger mess. But at the same time. WHen nothing is happening (I get why it bogs when shit hits the fan) why am I having such poor performance?keep in mind it's a build off of rga that kind of run on top of brutal doom. But even brutal I get around 50. And pfenh is around the same.
Any ideas? On a good rig it's run fine but for some reason when I played hellbound it beat my computer to hell.
Is it bad optimization (or lack thereof would be a better way to word it) or is it just script heavy and not really good on lower end computers?
Any ideas would be great.
User avatar
cortlong50
Posts: 753
Joined: Mon Jun 24, 2013 7:12 pm
Location: UT-WA

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

Post by cortlong50 »

Also I've been making music for doom maps.
Yet my sound is way lower than every other song I can find.
Any way to bump up the sound? They're midi of course.
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

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

Post by cocka »

how do i do a combo lock door like in duke3D (3 switches)? can someone expert on acs help me?
It's simple. Use an array to store the states of the switches and another one for storing the correct solution. (you can also use 2D arrays, if you want) Then check on each press whether all of your elements in the array are equal to the array values stored in the "correct solution" array.

You can use boolean array where false means the button isn't pressed, true means it is pressed.
Henderick
Posts: 50
Joined: Sun Mar 08, 2009 9:11 am
Location: Germany

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

Post by Henderick »

How do I let a Master check the health of its child?
User avatar
NeoSpearBlade
Posts: 51
Joined: Tue Mar 26, 2013 1:35 pm

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

Post by NeoSpearBlade »

I have an update for one of my previous questions.
NeoSpearBlade wrote:4. The Pistol, the Shotgun, the Super Shotgun, the Chaingun and the Rocket Launcher has predetermined hardcoded parameters that the game loads when it reads A_FirePistol, A_FireShotgun, A_FireShotgun2, A_FireCGun and A_FireMissle, respectively. The code's equivalent of those parameters are listed in the wikia, which helps me a lot with my weapon editing. However, while it's easy to determine the equivalent for the Plasma Rifle* and the BFG9000**, there is no such equivalent for the BFG9000 Press Release. I just played around with A_FireCustomMissile and while useful, I don't see a command to recreate the slightly random spread it has in the default. Can anyone help?
Essentially, what I meant to say in that post (I wonder why I didn't just say it then) is that I want to recreate the firing code of the BFG9000 Press Release in a modifiable form.

So after hours looking around, reading multiple sections in the wikia and testing whatever I found, I managed to get this working, somewhat. Here's the relevant code:

Code: Select all

ACTOR NSBBFG9000 : NSBDoomWeapon replaces BFG9000
{
	States
	{
	AltFire:
		BFGG A 0 A_BFGsound
		BFGG A 30 A_GunFlash
		BFGG AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG C 0 A_Light0
		BFGG C 20 A_ReFire
		BFGG A 10
		Goto Ready
	}
}

ACTOR PressReleaseBFGPlasmaBallRandom : RandomSpawner
{
	DropItem "PressReleaseBFGPlasmaBallGreen", 255, 1
	DropItem "PressReleaseBFGPlasmaBallRed", 255, 1
}

ACTOR PressReleaseBFGPlasmaBallGreen : PressReleaseBFGPlasmaBallBase replaces PlasmaBall1
{
	Damage 4
	decal GreenPlasmaScorch
	BounceType "Classic"
	BounceFactor 1.0
	Obituary "$OB_MPBFG_MBF"
	States
	{
	Spawn:
		PLS1 AB 6 Bright
		Loop
	Death:
		PLS1 CDEFG 4 Bright
		Stop
	}
}
	
ACTOR PressReleaseBFGPlasmaBallRed : PressReleaseBFGPlasmaBallBase replaces PlasmaBall2
{
	Damage 4
	decal RedPlasmaScorch
	BounceType "Classic"
	BounceFactor 1.0
	Obituary "$OB_MPBFG_MBF"
	States
	{
	Spawn:
		PLS2 AB 6 Bright
		Loop
	Death:
		PLS2 CDE 4 Bright
		Stop
	}
}
If you want to see comparison shots, open the spoiler below. Otherwise, continue on.
Spoiler:
However, this code has 2 bugs.
1. No sound is played when the plasma balls are fired from the weapon, even though they should play. I think it's because it's being fired through RandomSpawner but I'm not sure.
2. AutoAim is affecting this firing mode. I want to make it so that the main fire has autoaim and the alt fire (which is the Press Release) doesn't.

So after 45 minutes, I created a workaround:

Code: Select all

ACTOR NSBBFG9000 : NSBDoomWeapon replaces BFG9000
{
	States
	{
	AltFire:
		BFGG A 0 A_BFGsound
		BFGG A 30 A_GunFlash
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),0,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallRandom",frandom(-7.5,7.5),1,0,0,0,frandom(-9.0,9.0))
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 0 A_FireCustomMissile ("PressReleaseBFGPlasmaBallSound",0,0,0,0,0,0)
		BFGG A 1
		BFGG C 0 A_Light0
		BFGG C 20 A_ReFire
		BFGG A 10
		Goto Ready
	}
}

ACTOR PressReleaseBFGPlasmaBallRandom : RandomSpawner
{
	DropItem "PressReleaseBFGPlasmaBallGreen", 255, 1
	DropItem "PressReleaseBFGPlasmaBallRed", 255, 1
}

ACTOR PressReleaseBFGPlasmaBallGreen : PressReleaseBFGPlasmaBallBase replaces PlasmaBall1
{
	Damage 4
	decal GreenPlasmaScorch
	BounceType "Classic"
	BounceFactor 1.0
	Obituary "$OB_MPBFG_MBF"
	States
	{
	Spawn:
		PLS1 AB 6 Bright
		Loop
	Death:
		PLS1 CDEFG 4 Bright
		Stop
	}
}
	
ACTOR PressReleaseBFGPlasmaBallRed : PressReleaseBFGPlasmaBallBase replaces PlasmaBall2
{
	Damage 4
	decal RedPlasmaScorch
	BounceType "Classic"
	BounceFactor 1.0
	Obituary "$OB_MPBFG_MBF"
	States
	{
	Spawn:
		PLS2 AB 6 Bright
		Loop
	Death:
		PLS2 CDE 4 Bright
		Stop
	}
}

ACTOR PressReleaseBFGPlasmaBallSound : PressReleaseBFGPlasmaBallBase
{
	Damage 0
	BounceType "Classic"
	BounceFactor 1.0
	Obituary "$OB_MPBFG_MBF"
	States
	{
	Spawn:
		TNT1 A 1000 A_PlaySound ("weapons/plasmagf", 2)
		Stop
	Death:
		TNT1 A 0 Bright
		Stop
	}
}
With this code, I get the sound I was missing by firing invisible balls that play the sound alongside the main balls but I set them up so that the invisible sound balls don't cause any damage. It works but I don't want to use the workaround. The code's too repetitive for my tastes and it doesn't fix the autoaim that's still happening.

Does anyone know why my recreation code doesn't play the sound? Also, how do I temporally turn off autoaim for the alt fire, like the original?
User avatar
The Zombie Killer
Posts: 1528
Joined: Thu Jul 14, 2011 12:06 am
Location: Gold Coast, Queensland, Australia

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

Post by The Zombie Killer »

In case you didn't know, the BFG's code in zdoom.pk3 has the Press Release Beta's BFG recreated in the "OldFire" (I think that's what it's named) state
So, for a simple way to emulate the BFG, do this:

EDIT: I'm an idiot, I didn't read your question properly

Code: Select all

ACTOR BFG9000_PRBeta : BFG9000 replaces BFG9000
{
	States
	{
	Fire:
		Goto Super::OldFire
	}
}
Last edited by The Zombie Killer on Thu Dec 19, 2013 8:28 pm, edited 1 time in total.
User avatar
amv2k9
Posts: 2178
Joined: Sun Jan 10, 2010 4:05 pm
Location: Southern California

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

Post by amv2k9 »

NeoSpearBlade wrote:Does anyone know why my recreation code doesn't play the sound?
I don't see a SeeSound defined for the projectiles.
User avatar
The Zombie Killer
Posts: 1528
Joined: Thu Jul 14, 2011 12:06 am
Location: Gold Coast, Queensland, Australia

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

Post by The Zombie Killer »

Ignore what I said above, just define a SeeSound for the projectiles, that's how it's handled in the projectiles defined in the pk3 files.
EDIT: Ninja'd
AutoAim is affecting this firing mode. I want to make it so that the main fire has autoaim and the alt fire (which is the Press Release) doesn't.
You can solve this with a really hacky method, lemme see if I can prepare an example (warning: requires ACS)

EDIT2: How's this:

Decorate:

Code: Select all

// Decorate
ACTOR NSBBFG9000 : NSBDoomWeapon replaces BFG9000
{
   States
   {
   AltFire:
      TNT1 A 0 ACS_NamedExecuteAlways("BFGAlt", 0)
      Goto Ready
   }
}

ACTOR BFGAltFiring : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR PressReleaseBFGPlasmaBallRandom : RandomSpawner
{
   DropItem "PressReleaseBFGPlasmaBallGreen", 255, 1
   DropItem "PressReleaseBFGPlasmaBallRed", 255, 1
}

ACTOR PressReleaseBFGPlasmaBallGreen : PressReleaseBFGPlasmaBallBase replaces PlasmaBall1
{
   Damage 4
   decal GreenPlasmaScorch
   BounceType "Classic"
   BounceFactor 1.0
   Obituary "$OB_MPBFG_MBF"
   States
   {
   Spawn:
      PLS1 AB 6 Bright
      Loop
   Death:
      PLS1 CDEFG 4 Bright
      Stop
   }
}
   
ACTOR PressReleaseBFGPlasmaBallRed : PressReleaseBFGPlasmaBallBase replaces PlasmaBall2
{
   Damage 4
   decal RedPlasmaScorch
   BounceType "Classic"
   BounceFactor 1.0
   Obituary "$OB_MPBFG_MBF"
   States
   {
   Spawn:
      PLS2 AB 6 Bright
      Loop
   Death:
      PLS2 CDE 4 Bright
      Stop
   }
}

ACTOR BFGAltWeapon : NSBBFG9000
{
	+NOAUTOAIM
	States
	{
	Select:
		TNT1 A 1 A_Raise
		Wait
	Deselect:
		TNT1 A 1 A_Lower
		Wait
	Ready:
		BFGG A 0 A_BFGsound
		BFGG A 30 A_GunFlash
		BFGG AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_FireCustomMissile("PressReleaseBFGPlasmaBallRandom", frandom(-7.5,7.5), 1, 0, 0, 0, frandom(-9.0, 9.0))
		BFGG C 0 A_Light0
		BFGG C 20 A_WeaponReady(WRF_NOBOB|WRF_NOSWITCH|WRF_NOPRIMARY)
		BFGG A 10
		BFGG A 0 A_TakeInventory("BFGAltFiring", 1)
		Goto IdleLoop
	IdleLoop:
		"####" "#" 1
		Loop
	Fire:
	AltFire:
		Goto Ready
	}
}
Required ACS:

Code: Select all

// ACS
#library "mainlib"
#include "zcommon.acs"

// Defines

// Scripts
Script "BFGAlt" (void)
{
	str weapon = GetWeapon();
	if (StrICmp(weapon, "BFGAltWeapon"))
	{
		SetPlayerProperty(0, 1, PROP_INSTANTWEAPONSWITCH);
		GiveInventory("BFGAltWeapon", 1);
		GiveInventory("BFGAltFiring", 1);
		SetWeapon("BFGAltWeapon");
		While (CheckInventory("BFGAltFiring"))
			Delay(1);
		SetWeapon(weapon);
		TakeInventory("BFGAltWeapon", 1);
		Delay(3);
		SetPlayerProperty(0, 0, PROP_INSTANTWEAPONSWITCH);
	}
}

// Functions
Tomicapo
Posts: 294
Joined: Wed Sep 11, 2013 9:32 am
Location: LACONCHADETUMADRE

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

Post by Tomicapo »

How i do to make a voxel?
Im trying to make a drivable voxel of a jeep but i dont know anything!!
Here is the model:
http://tf3dm.com/3d-model/jeep-87518.html
Can someone show me how to make this?
Indeed Thanks.
User avatar
TheMightyHeracross
Posts: 2100
Joined: Sun Aug 18, 2013 9:41 am
Location: Philadelphia, PA

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

Post by TheMightyHeracross »

That's a model, not a voxel.
And that model type is not supported by (G)ZDoom, so you cannot use it.
If you do use voxels: [wiki]VOXELDEF[/wiki]
User avatar
Enjay
 
 
Posts: 26979
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

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

Post by Enjay »

TheMightyHeracross wrote:And that model type is not supported by (G)ZDoom, so you cannot use it.
Tell me again how you cannot use it...
Image

;)

OK, it's not a neat conversion because the original model is far too complicated for the MD3 format but it can be broken up into separate models. Anyone with a modelling program that supports any of the formats in the original RAR (and there are a few) should be able to convert it to a GZDoom compatible model - and probably do it more neatly than this quick hack job.
Gez
 
 
Posts: 17939
Joined: Fri Jul 06, 2007 3:22 pm

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

Post by Gez »

Heck, you can even convert it to voxels. :p
Tomicapo
Posts: 294
Joined: Wed Sep 11, 2013 9:32 am
Location: LACONCHADETUMADRE

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

Post by Tomicapo »

Hey Enjay can you tell me how do you do that?
Would be awesome!!
Thanks.
(NOTE: Can i download that voxel you made i need to examinate the decorate)
Locked

Return to “Editing (Archive)”