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.
Fallentemp
Posts: 28
Joined: Sun Dec 30, 2012 10:58 pm

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

Post by Fallentemp »

Blue Shadow wrote:
Fallentemp wrote:Is there a way to give the death sprites different angles? say like you move to what the side of it would be it changes to say the side of a dead body instead of the single death sprite like the vanilla monsters?
If you have rotations for it, then sure, why not. It'd be the same as having rotations for pain or attack.
There doesn't happen to be any wads around with such a thing i can use for an example?
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]Creating new sprite graphics[/wiki] should explain how sprite angles work. It actually does not involve any code whatsoever.
User avatar
Frustration
Posts: 20
Joined: Sat Jul 20, 2013 4:16 pm
Location: Catherine Mayfield's Office

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

Post by Frustration »

Is there a better way to brighten up an attack sequence for a weapon without the use of the "BRIGHT" thing you put in with the sequence of the gun or atleast a way to dim it down as it goes through it's frames?
User avatar
jpalomo
Posts: 772
Joined: Mon May 17, 2010 9:45 am

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

Post by jpalomo »

Vaecrius wrote:My question: Trying to do headshots. Imps keep aiming up, setting their own heads on fire and dying.

What is the cleanest, most spaghetti-free, easily generalizable way to prevent this?

(I'm using an A_Warp loop with a single actor rather than calling A_SpawnItemEx every frame; also, I'd like to be able to headshot a critter in the middle of its attack sequence so magically clearing the head out of the way is less than ideal)
Just did a quick test and this worked: putting the +ThruSpecies flag on the projectile, then giving the headshot actor and projectile the same Species actor property.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

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

Post by Gez »

wildweasel wrote:[wiki]Creating new sprite graphics[/wiki] should explain how sprite angles work. It actually does not involve any code whatsoever.
Also, the table in [wiki]sprite[/wiki].
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 »

Frustration wrote:Is there a better way to brighten up an attack sequence for a weapon without the use of the "BRIGHT" thing you put in with the sequence of the gun or atleast a way to dim it down as it goes through it's frames?
Use the BRIGHT keyword anyway, and create [wiki=GLDEFS#Brightmaps]Brightmaps[/wiki] to accomplish the dimming effect.

[edit] Link works now.
User avatar
Ghostbreed
Posts: 1114
Joined: Wed Mar 24, 2010 6:19 am

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

Post by Ghostbreed »

Will you be adding a tut on how to create your own monster as well, WW?
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 »

Huh? Why would I do that?
User avatar
Ghostbreed
Posts: 1114
Joined: Wed Mar 24, 2010 6:19 am

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

Post by Ghostbreed »

Well, I guess since you made lots of other useful tuts... Some of them have saved my life late friday nights when playing around in SLADE3
User avatar
mizzouSCN
Posts: 33
Joined: Mon Jul 30, 2012 3:32 pm

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

Post by mizzouSCN »

Another playtesting metrics problem:

I'm trying to keep track of how many times the player fires each weapon, as well as how many times the player gets hit. For the weapons, I've replaced them with versions that give the player an inventory item for each bullet fired, e.g...

Code: Select all

Actor TrackingChaingun : Chaingun replaces Chaingun
{
Weapon.SlotNumber 4
States
   {
   Fire:
     CHGG AB 4 A_FireCGun
	 TNT1 A 0 A_GiveInventory("ChaingunCount", 2) //tracking bullets
     CHGG B 0 A_ReFire
     Goto Ready
	 }
}
I'm also very interested in tracking how many times the player gets hit. To that end, I've tried to change the properties of the doomplayer thus:

in KEYCONF:

Code: Select all

clearplayerclasses
addplayerclass Doomer
and in DECORATE:

Code: Select all

ACTOR Doomer : PlayerPawn replaces DoomPlayer //DoomPlayer?
{
	Player.DisplayName "Steve"
	States
	{
	Pain:
	PLAY G 4
	PLAY G 4 A_PAIN
	TNT1 A 0 A_GiveInventory("WoundCount", 1) //tracking wounds
	Goto Spawn
	}
}
I have set all maps to allow respawn without resetting inventory, so the player inventory items "ChaingunCount" and "WoundCount" should persist. Instead, they seem to reset to zero as soon as the player dies! Can anyone tell me why? I've even tried using ACS to score "ChaingunCount" and "WoundCount" to a global int on death, but that doesn't seem to work either. It seems to be because I'm trying to change the playerclass, or properties of the player, which seems to be much more complicated than modifying weapons...

Please help! Thank you!
User avatar
Frustration
Posts: 20
Joined: Sat Jul 20, 2013 4:16 pm
Location: Catherine Mayfield's Office

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

Post by Frustration »

I'm trying to find a way to give certain monsters footsteps that doesn't affect the player or any other monster besides the one intended there was one way i found that would have worked quite will which would be adding a A_Playsound to the See:

Somthing like this -

Code: Select all

See:
TNT1 A 0 A_Playsound("Step")
BLUE BBCCDDEE 4 A_Chase
Loop
Sadly it doesn't play it as often as i would have hoped, the only way to fix that with this method of it is to give the TNT1 ticks "3" would be a good one for it, but sadly it then interfere's with the walking animation, is there any other way to give the monster a footstep with decorate or even ACS? or is there a way to add onto the walking animation with another A_ somthing like this >

Code: Select all

See:
BLUE BBCCDDEE 4 A_Chase, A_Playsound("Step")
Loop
Blue Shadow
Posts: 5046
Joined: Sun Nov 14, 2010 12:59 am

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

Post by Blue Shadow »

Frustration wrote:is there a way to add onto the walking animation with another A_ somthing like this >

Code: Select all

See:
BLUE BBCCDDEE 4 A_Chase, A_Playsound("Step")
Loop
That syntax is not supported, but it can be achieved through the following:

Code: Select all

  See:
    BLUE B 4 A_Chase
    TNT1 A 0 A_PlaySound("Step")
    BLUE B 4 A_Chase
    TNT1 A 0 A_PlaySound("Step")
    BLUE C 4 A_Chase
    TNT1 A 0 A_PlaySound("Step")
    BLUE C 4 A_Chase
    TNT1 A 0 A_PlaySound("Step")
    BLUE D 4 A_Chase
    TNT1 A 0 A_PlaySound("Step")
    BLUE D 4 A_Chase
    TNT1 A 0 A_PlaySound("Step")
    BLUE E 4 A_Chase
    TNT1 A 0 A_PlaySound("Step")
    BLUE E 4 A_Chase
    TNT1 A 0 A_PlaySound("Step")
    Loop
User avatar
DarkQuill
Posts: 110
Joined: Thu Dec 04, 2008 5:43 am
Location: Australia, MAYTE

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

Post by DarkQuill »

DarkQuill wrote:Handy thread :o

Okay, so here's my problem. I'm trying to add motion-blur/after-images to a monsters walk cycle, but all the duplicates end up facing the "default" way, and not the way the monster is currently looking. I've looked at some custom enemies, and even the Bishops from Hexen, but I totally can't find it.
Here's my current slice of code for ref:
Spoiler:
And subsequent frames just piggyback from BlurA. But yeah. How do I get afterimages to face the same way as the monsters previous movement?
Bump.
No one knows how to get this working? =(
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 »

@DarkQuill, your motion blur code seems to be fine; what's the code look like for how you're spawning them?
gerolf
Posts: 974
Joined: Sat Nov 06, 2010 1:32 pm

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

Post by gerolf »

How would I rip graphics from Black Crypt? I've tried everything I could possibly think of except for taking screenshots of the game and doing it that way..
Locked

Return to “Editing (Archive)”