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
Carbine Dioxide
Posts: 1927
Joined: Thu Jun 12, 2014 3:16 pm
Location: Anywhere.

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

Post by Carbine Dioxide »

Bit of a weird question, but is there some way to tell what offsets look like outside of the code besides just running GZDoom and testing it?
User avatar
DoomKrakken
Posts: 3482
Joined: Sun Oct 19, 2014 6:45 pm
Location: Plahnit Urff
Contact:

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

Post by DoomKrakken »

Pfffft... I wish. That'd make things a hell of a lot easier.
kodi wrote:I see. The only other method I can think of is using ZScript and do

Code: Select all

override void BeginPlay()
{
 if(target)
 {
  if (CountInv("ShotgunSelected", AAPTR_TARGET) > 0) 
  {
   A_SetDamageType("Shotgun");
  }
 }
}
I think that should work.

Oh and unrelated to your current predicament since you seemed interested:
Spoiler:
I actually just got an idea...

Using A_DamageTracer, it has a call to heal the tracer (if a negative value is used). So first, I have it call A_DamageTracer to negate the damage done by the puff, and THEN call A_DamageTracer to deal TWICE the damage! A bit hacky, yes... but it should work... (EDIT: No, it didn't...)

Not that I'm against using ZScript, I just haven't updated yet.
Last edited by DoomKrakken on Wed Mar 22, 2017 9:26 pm, edited 1 time in total.
User avatar
juizzysquirt
Posts: 126
Joined: Sun Jan 04, 2009 3:29 pm
Location: Knee-Deep in L.A. Meltdown

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

Post by juizzysquirt »

Carbine Dioxide wrote:Bit of a weird question, but is there some way to tell what offsets look like outside of the code besides just running GZDoom and testing it?
You mean offsets like in graphics, sprites, etc? Well, there's preview GrabPNG. viewtopic.php?f=44&t=19876

e: Oh, you mean with offsets defined outside of .png's grAb chunk? Then I have no idea. You could preview offsets from GrabPNG or Slade, and then copy them over to zscript/DECORATE-side.
User avatar
Jaxxoon R
Posts: 772
Joined: Sun May 04, 2014 7:22 pm

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

Post by Jaxxoon R »

I think Danimator had a preview window that supported offsets, but it's designed to work with Decorate so keep that in mind.
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

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

Post by Nash »

Carbine Dioxide wrote:Bit of a weird question, but is there some way to tell what offsets look like outside of the code besides just running GZDoom and testing it?
Try this: viewtopic.php?f=44&t=49494
User avatar
Brohnesorge
Posts: 474
Joined: Sat Oct 08, 2016 9:10 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Win10
Graphics Processor: nVidia with Vulkan support
Contact:

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

Post by Brohnesorge »

How do you do floor decals for weapon impacts? It's something I see a lot of, but haven't been able to find a good tutorial for.
Okgo5555
Posts: 80
Joined: Thu Mar 23, 2017 11:18 am

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

Post by Okgo5555 »

Can someone point me in the right direction to accomplish the following 3 things?

1) fade out dead corpses. I know this can be done with dehacked. I was looking at it in whacked and I don't quite understand what I'm looking for. Is the best way to do this to just customize deaths for all monster actors in Decorate?

2) generic gibs/gore a la quake1? I was attempting to sort This out between nashgore/ketchup, but both of those mods have subfolders on subfolders and I am just trying to make all enemies have ludicrous gibs and not leave a corpse.

3) I know I need to use plaerpawn to limit weapon slots, but how do u limit the slots so that I can restrict the player to a set number of total weapons?

Thanks in advance.
Elias79
Posts: 50
Joined: Mon Jan 30, 2017 6:09 am

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

Post by Elias79 »

How do i make a linedef action that steer the actor slightly to the side and then forward in that new direction, this is my failed attempt that only pints the action but then slides mostly straight ahead and if i change the values even the slightest i end up turning 180 degrees and most times not even going in the direction the player is pointing, also this looks very jerky and unnatural, i wanted to counteract that the players feet collision box is about 200% bigger than it should be so you can walk on a 1 pixel sector without falling off because the hitbox is so very wide.

Here is my failed script:

Code: Select all

script 6 (void)
{
	int	var = 0.0;
	var = GetActorAngle(0) - 0.05;
	SetActorAngle(0, var);
	ThrustThing(GetActorAngle(0) >> 8, 1, 1, 0);
}
I would also like to know if its possible to temporary change the collision radius of an player, or if i could use one hitbox radius for projectiles and another for other players and map geometry.
User avatar
worldendDominator
Posts: 288
Joined: Sun May 17, 2015 9:39 am

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

Post by worldendDominator »

Okgo5555 wrote:1) fade out dead corpses. I know this can be done with dehacked. I was looking at it in whacked and I don't quite understand what I'm looking for. Is the best way to do this to just customize deaths for all monster actors in Decorate?
Yes, you have to rewrite every monster's Death/XDeath states.
Okgo5555 wrote:2) generic gibs/gore a la quake1? I was attempting to sort This out between nashgore/ketchup, but both of those mods have subfolders on subfolders and I am just trying to make all enemies have ludicrous gibs and not leave a corpse.
Make a gib actor or actors, and spawn them in a monster's XDeath state. Yes, you need to rewrite every monster.
Okgo5555 wrote:3) I know I need to use plaerpawn to limit weapon slots, but how do u limit the slots so that I can restrict the player to a set number of total weapons?
That's a bit harder. Make a "weapon counter" Inventory item, and replace every weapon with a CustomInventory. On pickup, the CustomInventory would check the amount of that counter; if you have the maximum, then it fails, and if you don't, it gives you the weapon.
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

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

Post by Nevander »

How do you set plane reflection through UDMF properties? I heard it was possible but I don't see it anywhere.
User avatar
DoomKrakken
Posts: 3482
Joined: Sun Oct 19, 2014 6:45 pm
Location: Plahnit Urff
Contact:

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

Post by DoomKrakken »

kodi wrote:I see. The only other method I can think of is using ZScript and do

Code: Select all

override void BeginPlay()
{
 if(target)
 {
  if (CountInv("ShotgunSelected", AAPTR_TARGET) > 0) 
  {
   A_SetDamageType("Shotgun");
  }
 }
}
I think that should work.

Oh and unrelated to your current predicament since you seemed interested:
Spoiler:
So, I finally updated to GZDoom 2.4 stable... and I used the ZScript like you said. It's not working, though. No errors, but the behavior is all the same.

This is what I've diagnosed: if a puff actor has +PUFFGETSOWNER, then it will set its target to the actor that fired it, like you and the wiki said... however, according to the wiki, that only happens after it spawns. Here's my new question... is there a way for the puff to know its target before it spawns?
User avatar
LugiasBitch
Posts: 18
Joined: Tue Jan 05, 2016 3:27 pm
Location: Somewhere in America

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

Post by LugiasBitch »

Okay. I've been reluctant to ask for help with this, but I've been using sector stacking for my big shopping mall map, and while it works, I've run into issues with it depending on where the roof sectors are. Thinking it was an issue with the engine itself, I sent it to the bug tracker, and one of the admins suggested I use Sector_SetPortal instead of portal points.

I need some help with this. I've already experimented with trial and error, but I just know I'm either doing something wrong, or the gods of Doom Builder just hate me.

In short, how the #&@$ do I Sector_SetPortal on a giant map with complex geometry?

PM me if you want the map so you can see firsthand what I'm trying to accomplish here. I can also send a comparison with all of the portal points if you wish.
User avatar
kodi
 
 
Posts: 1355
Joined: Mon May 06, 2013 8:02 am

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

Post by kodi »

@doomkrakken
Try this instead:

Code: Select all

override void PostBeginPlay()
{
	if(target)
	{
		if (CountInv("ShotgunSelected", AAPTR_TARGET) > 0) 
		{
			A_SetDamageType("Shotgun");
		}
	}
Super.PostBeginPlay(); 
}
May be that the pointers aren't set in the BeginPlay stage, but rather PostBeginPlay.
User avatar
DoomKrakken
Posts: 3482
Joined: Sun Oct 19, 2014 6:45 pm
Location: Plahnit Urff
Contact:

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

Post by DoomKrakken »

As I said before, if an actor has PUFFGETSOWNER, then it will only register the actor that spawned it as its target after it gets spawned. PostBeginPlay works one tic before the actor gets spawned, so then PUFFGETSOWNER doesn't even have the chance to do anything yet, so the player isn't set as the target when the function comes around.

I did try it anyway, in the hopes that it would still work. This unfortunately doesn't work either...

Now, because we know PUFFGETSOWNER works only after the puff is spawned, are there any other ways we can change the puff's pointers before it's spawned?
User avatar
kodi
 
 
Posts: 1355
Joined: Mon May 06, 2013 8:02 am

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

Post by kodi »

Is there a way to terminate an ACS script between two separate PK3s or make the previous one in the load order not load at all in-game?

@doomkrakken
Then I can't think of any solution except the A_DamageTracer method.
Locked

Return to “Editing (Archive)”