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.
Zombieguy
Posts: 1880
Joined: Mon May 24, 2010 4:38 pm
Location: C:\Earth>

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

Post by Zombieguy »

Doh! Still doesn't work. I guess I'm missing something....
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 »

Are you sure the actor is being spawned? There may be something preventing that.
Zombieguy
Posts: 1880
Joined: Mon May 24, 2010 4:38 pm
Location: C:\Earth>

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

Post by Zombieguy »

I'm finally getting it to work. But, the FistPuff, yeah, it's working, but... It does massive damage.

Code: Select all

ACTOR PerkFist : Fist replaces Fist
{
+NOEXTREMEDEATH
+NOALERT
States
{
	Fire:
	TNT1 A 0 A_playsound("weapons/fist/swing")
		PKFS LBCD 1
		PKFS E 2 A_Punch
		TNT1 A 0 A_CustomPunch(60,1,CPF_DAGGER,"KnucklePuff",100)
		PKFS FGHI 2
		PKFS JKL 1
		PUNG A 5 A_ReFire
		Goto Ready
	}
}

actor KnucklePuff
{
  +NOBLOCKMAP
  +NOGRAVITY
  +PUFFONACTORS
  RenderStyle Add
  activesound ""
  attacksound "weapons/fist/punch"
  //seesound ""
  states
  {
   Spawn:
   	 //PUF2 A 1 
      Stop
	  Melee:
   	 //PUF2 B 1 
      Stop
	  Crash:
   	 //PUF2 C 1 
      Stop
  }
}
User avatar
Mikk-
Posts: 2274
Joined: Tue Jun 30, 2009 1:31 pm

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

Post by Mikk- »

Because you specified it to do 60 damage. Of course that's going to be a lot. I see that there's also the NoRandom, too, but still, 60 damage can take out an imp IIRC.
Blue Shadow
Posts: 5046
Joined: Sun Nov 14, 2010 12:59 am

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

Post by Blue Shadow »

You're also using A_Punch and A_CustomPunch in the same attack sequence.
Zombieguy
Posts: 1880
Joined: Mon May 24, 2010 4:38 pm
Location: C:\Earth>

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

Post by Zombieguy »

Alright, I got the FistPuff working. Now, I'm using tracers to spawn wall debris on impact. But the problem is, the tracers AND the bullets/bulletpuffs spawn together, dealing the enemy twice the damage. How do I prevent the bullets/bulletpuff from dealing damage, so that the tracer alone can deal the desired amount of damage on impact of a "bleeding" target?
Blue Shadow
Posts: 5046
Joined: Sun Nov 14, 2010 12:59 am

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

Post by Blue Shadow »

Reduce the damage of the bullet attack to zero?
Zombieguy
Posts: 1880
Joined: Mon May 24, 2010 4:38 pm
Location: C:\Earth>

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

Post by Zombieguy »

Well, that's obvious, I just apparently don't know how to do that. I replaced the bulletpuff with a new actor, and set the damage to "0". But I guess that doesn't work. A little help on the bullet attack please?
Blue Shadow
Posts: 5046
Joined: Sun Nov 14, 2010 12:59 am

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

Post by Blue Shadow »

The puff itself doesn't do any damage. You define the damage through the damage parameter in [wiki]A_FireBullets[/wiki] (player's weapons) and [wiki]A_CustomBulletAttack[/wiki] (monsters).
User avatar
Apothem
Posts: 2070
Joined: Sat Nov 29, 2003 7:13 pm
Location: Performing open heart surgery on an ACS compiler.

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

Post by Apothem »

How would I keep the player from completely dieing? I mean in the sense that I want to be able to revive a downed player?

I always assumed that using a death state that just had a A_jumpif() loop inside of it that would go back to the spawn state and fix the health if the player's corpse got a specific item. For all the times I've tried, I've gotten some weird results. Any suggestions?
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

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

Post by NeuralStunner »

There are special changes in actoir deaths, not just a state change. You can use [wiki]SetPlayerProperty[/wiki] with PROP_BUDDHA to keep players from actually dying.
User avatar
Sgt Dopey
Posts: 558
Joined: Thu Jan 13, 2011 8:44 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Australia

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

Post by Sgt Dopey »

How do i get the sparks thing to work?
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 »

jaegerman45 wrote:How do i get the sparks thing to work?
Your question is a little vague, but I assume you want sparks to be shot out when you have a hitscan or projectile hit a wall?
Two ways to do it; A_SpawnItemEx, and then make a spark actor. You'll probably have to play around a lot with things like its gravity and velocity.
The second is A_SpawnDebris. Actors spawned through this action function are coded a little differently, and you should check the wiki explanation on that function for more info.
User avatar
Enjay
 
 
Posts: 27627
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

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

Post by Enjay »

Maybe this: [wiki]Classes:Spark[/wiki] ?

Put it in a map, give it a tid, set its first argument to how many particles you want then use a script (or line, I suppose) to activate it. Every time it is activated, it will produce the specified number of sparks and play the world/spark sound. To get repeated sparks, you need a looping script with a delay in it.
User avatar
Sgt Dopey
Posts: 558
Joined: Thu Jan 13, 2011 8:44 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Australia

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

Post by Sgt Dopey »

So how would I do it ive tried it with a script like this

Script 5 Enter
{
Delay (25);
Thing_activate (12);
}
Locked

Return to “Editing (Archive)”