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
jpalomo
Posts: 771
Joined: Mon May 17, 2010 9:45 am

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

Post by jpalomo »

In an inherited DoomImp:

Code: Select all

States
{
Missile:
    Goto See
Melee:
    TROO EF 8 A_FaceTarget
    TROO G 6 A_CustomMeleeAttack (3 * random(1, 8), "imp/melee", "none")
    Goto See
}
User avatar
edward850
Posts: 5886
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand

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

Post by edward850 »

That doesn't remove the state. You need this instead:

Code: Select all

Missile:
    stop
Any state that only has 'stop' in it will act as though the state does not exist, which is useful when dealing with removing Raise states from inherited enemies. (Or removing a Missile state, in this case. :D)
gerolf
Posts: 974
Joined: Sat Nov 06, 2010 1:32 pm

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

Post by gerolf »

Thanks again jpalomo.

@edward850, thanks also, but his version is what I needed. Yours prevents the Imp from attacking at all, unless of course you meant to change only the missile part of his code.
User avatar
edward850
Posts: 5886
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand

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

Post by edward850 »

gerolf wrote:unless of course you meant to change only the missile part of his code.
Correct. For refrence, "goto see" will cause the Imp to still try ranged attacks, which will make it appear to reset its walking (which will look odd).
Last edited by edward850 on Sat Nov 17, 2012 9:10 pm, edited 1 time in total.
gerolf
Posts: 974
Joined: Sat Nov 06, 2010 1:32 pm

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

Post by gerolf »

Okay, thanks! It works perfectly now!
User avatar
Demolisher
Posts: 1749
Joined: Mon Aug 11, 2008 12:59 pm
Graphics Processor: nVidia with Vulkan support
Location: Winchester, VA

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

Post by Demolisher »

Is there a way to use sprites that are loaded with an IWad, like TROOA2A8, in TEXTURES as patches?
User avatar
ChronoSeth
Posts: 1631
Joined: Mon Jul 05, 2010 2:04 pm
Location: British Columbia

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

Post by ChronoSeth »

I don't believe TEXTURES makes a distinction between the different graphics in a WAD/PK3, so I would assume that you can just use the sprite as you would use any other patch.
User avatar
Enjay
 
 
Posts: 26498
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

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

Post by Enjay »

I'm pretty sure that even vanilla could accept a sprite as a PNAME to be used in TEXTURE1.
renaldones
Posts: 28
Joined: Wed Nov 14, 2012 1:33 am

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

Post by renaldones »

So, um... how about that PALVERS? How does that even work?

...since my last post apparently got buried. :c

EDIT: Yikes, you'd think after 18 years somebody would have figured out how to avoid choosing between fog that isn't terrible and being able to make purple skies. Didn't realize PALVERS was such an enigma. On the plus side I'm sort of getting used to GZDoom's awful fog, it's just that I don't understand why the sky is a giant cylinder. I'm sure it'll work out eventually.

Anyways, I'm trying to do this thing where there's a locked "door" (it's a floor that lowers) that will only open if hit by a rocket. But not until after a specific enemy (the only hellknight in the map) is killed.

Right now, I've got a "script execute" special on the wall facing the player of the floor that lowers, that calls for this script:
While(ThingCount(T_HELLKNIGHT, 5) > 0)
delay(20);
Floor_LowerToLowest(0, 16);

Before the hellknight dies, I shoot it and it doesn't open. If I shoot it after the hellknight dies, it opens. But if I shoot it before then hellknight dies, AFTER it dies the door opens without me shooting it. I tried changing "while" to "if," and the door opened when I shot it after the hellknight teleported in but before I killed it. By the way the hellknight only teleports in after you kill all (3) cacodemons in the level.

I feel like I'm really close to the solution but I'm missing one really important piece of information in order to solve it. And the wiki sure as hell isn't going to give it to me, so I figured I'd ask here.
User avatar
Demolisher
Posts: 1749
Joined: Mon Aug 11, 2008 12:59 pm
Graphics Processor: nVidia with Vulkan support
Location: Winchester, VA

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

Post by Demolisher »

renaldones wrote: Anyways, I'm trying to do this thing where there's a locked "door" (it's a floor that lowers) that will only open if hit by a rocket. But not until after a specific enemy (the only hellknight in the map) is killed.

Right now, I've got a "script execute" special on the wall facing the player of the floor that lowers, that calls for this script:
While(ThingCount(T_HELLKNIGHT, 5) > 0)
delay(20);
Floor_LowerToLowest(0, 16);

Before the hellknight dies, I shoot it and it doesn't open. If I shoot it after the hellknight dies, it opens. But if I shoot it before then hellknight dies, AFTER it dies the door opens without me shooting it. I tried changing "while" to "if," and the door opened when I shot it after the hellknight teleported in but before I killed it. By the way the hellknight only teleports in after you kill all (3) cacodemons in the level.

I feel like I'm really close to the solution but I'm missing one really important piece of information in order to solve it. And the wiki sure as hell isn't going to give it to me, so I figured I'd ask here.

Code: Select all

if(ThingCount(T_HELLKNIGHT, 5) == 0)
{
	Delay(20); // Optional delay after rocket fired
	Floor_LowerToLowest(0, 16);
}
// The following simply tells you to kill the Hell Knight first if you shoot the door early
else 
{
	Print(s:"You must kill the Hell Knight first!");
}
Anyways, the doomimp sprite flips do not show up in game, the imp blips in and out of view, still shootable, just invisible for the duration of the defined frames. Is it an offset issue? ZDoom reports no errors to the console.

Also, in making aliases, I know the ability to pass variables to aliases was added way back when, but the info isn't on the wiki. What was the syntax? I'm making new cheats in KEYCONF, and saying "levelup x" to call "puke -700 x" would be nice.

Edit:

It seems that large arrays with strings and integers mixed together are broken, all variables have 65535 or 65536 added to them, the strings display correctly, but the numbers need 1.0 subtracted from them in order to be at all usable. When I attempt to isolate the issue, it vanishes. It's halting progress, as it pops up somewhere else every time I fix it.
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

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

Post by Matt »

Fuckin' SBARINFO, how does it work

How do you define, if possible at all, the following:

1. a counter that displays one sprite for each instance of a specified inventory item you have, like OOOOO for 5 items, OOOO for 4, etc.?

2. an animated image on the status bar that appears if you do not have a specified inventory item?
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

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

Post by Blue Shadow »

Vaecrius wrote:2. an animated image on the status bar that appears if you do not have a specified inventory item?

Code: Select all

InInventory not TheItem
{
  drawimage "ANIMIMAG", x, y;
}
renaldones
Posts: 28
Joined: Wed Nov 14, 2012 1:33 am

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

Post by renaldones »

Awesome, that solves half the problem. Now all I need is a way to force the projectile to be a rocket.

Is it a thing where I can do some sort of check to see what projectile the wall in that same script? Or is it like a thing where I just shouldn't be using the built-in doom builder drop down list of triggers at all?

Not being able to find any information on how to use triggers in the script on the wiki is the reason I'm even asking this here in the first place. Does anyone here edit that wiki? Because if at all possible, a page called "Triggers" about how they work in raw script form would be pretty useful, or, if it exists under some other name, at least a redirect in case I guess the wrong synonym for whatever it's really called. I'm just sayin', if there's a separate page for each color of particle fountain, maybe there should be a page that tells me how to specify a trigger in a script. And rather than just helping one newbie one time, it helps everyone.

Or a page that explains how PALVERS works without being cryptic. :/
Zombieguy
Posts: 1880
Joined: Mon May 24, 2010 4:38 pm
Location: C:\Earth>

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

Post by Zombieguy »

Is it possible to force a blood actor to check for walls, and slide down if it so happens to hit one? Take Shadow Warrior, for example.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

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

Post by Blue Shadow »

renaldones wrote:So how do I get the PALVERS lump to work? The example on the wiki doesn't make any sense to me, but I assumed I just write the name of the texture/flat/sky and nothing else, but that crashed zdoom.
rgbtex* are the textures to use when playing while using the hardware renderer, e.g GZDoom. paltex* are the textures to use when playing while using the software renderer, e.g ZDoom. Simple as that.

As for the crash, I found it to do that when the textures defined in the lump don't correspond to actual textures loaded in the WAD/pk3.

Return to “Editing (Archive)”