This did it, thanks!DoomKrakken wrote:There are various ways that can happen. The most common of which is that the XF_HURTSOURCE flag in the A_Explode function (which is set by default) isn't cleared. To clear that, you'd put a 0 in the "flags" parameter.
But I don't know if that's the case. Could you post some code? That'd really help us diagnose the problem sooner...
The "How do I..." Thread
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.
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.
- insightguy
- Posts: 1730
- Joined: Tue Mar 22, 2011 11:54 pm
Re: The "How do I..." Thread
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: The "How do I..." Thread
Be more specific - what happens when you spawn that actor?Cherno wrote:no matter if it's true or false, the code doesnt seem to work.
And in your case, the CVAR needs to be server, since the caller isn't a player.
Re: The "How do I..." Thread
The JumpIf part is completely ignored, it just plays the normal Spawn state.
Edit: Nevermind, it is working now. I'm not sure what went wrong but changing the CVAR to server again did the trick.
Edit: Nevermind, it is working now. I'm not sure what went wrong but changing the CVAR to server again did the trick.
Re: The "How do I..." Thread
I need thrust actor in one of the randomly taken direction, left-right-up, inside anonymous function.
How do i make so?
How do i make so?
- DoomKrakken
- Posts: 3482
- Joined: Sun Oct 19, 2014 6:45 pm
- Location: Plahnit Urff
- Contact:
Re: The "How do I..." Thread
Do you have code for us to work with? It'll be hard coming up with code completely tailored to you if we don't see where you want to go with this...
Re: The "How do I..." Thread
Its half done and in future may be rewrited/slightly changed when i start balancing monster.
Spoiler:I wish insert in second part of if/else block, where A_JumpIfCloser(456, "null"), previous version of attack
Spoiler:
Re: The "How do I..." Thread
Is there any way to apply thrust to a non-shootable actor (namely pickups?) Haven't had any luck finding anything, and that flag seems to be the key (aside from combos that contain it)
Re: The "How do I..." Thread
Define mass of pickup?
- DoomKrakken
- Posts: 3482
- Joined: Sun Oct 19, 2014 6:45 pm
- Location: Plahnit Urff
- Contact:
Re: The "How do I..." Thread
Maybe give them a ThrustThing action, defined within the pickup's definition, under its Spawn state.
Ok, so I've heard of being able to define/use an array of pointers in ZScript. Does anyone know how I can do that?
Ok, so I've heard of being able to define/use an array of pointers in ZScript. Does anyone know how I can do that?
- cambertian
- Posts: 344
- Joined: Thu May 07, 2015 4:24 pm
- Graphics Processor: nVidia with Vulkan support
- Location: New England Area, USA
Re: The "How do I..." Thread
I'm making a mod that operates on health points instead of a health percent. I've already figured out most of the hard stuff - how to make it so damage is only dealt in multiples of 10, etc. - but I want armor to work in a specific way.
Instead of blocking a percent of damage and dissipating by a percent, I want it to block X points of damage before dissipating by 1 point. (So if the player takes, say, 3 points of damage, his armor goes down by a point.)
However, that's not my current trouble either - though I will get back to it! Instead, I'm having trouble with making a new Armor class to accommodate this behavior. I can't seem to access one of the item's custom properties:
I tried "invoker" as well, just in case, but it still errors out.
Also, if you can check some of my logic, that'd be great!
Instead of blocking a percent of damage and dissipating by a percent, I want it to block X points of damage before dissipating by 1 point. (So if the player takes, say, 3 points of damage, his armor goes down by a point.)
However, that's not my current trouble either - though I will get back to it! Instead, I'm having trouble with making a new Armor class to accommodate this behavior. I can't seem to access one of the item's custom properties:
Code: Select all
Script error, "health.pk3:zscript/hp/armor.zc" line 25:
Unknown identifier 'protectAmount'
Also, if you can check some of my logic, that'd be great!
Code: Select all
class CustomBaseArmor : Inventory
{
int protectAmount; // Amount of HP to protect before going down a point
property ProtectionAmount: protectAmount;
Default
{
-INVENTORY.INVBAR
+INVENTORY.IGNORESKILL
+INVENTORY.UNTOSSABLE
+INVENTORY.PERSISTENTPOWER
+INVENTORY.HUBPOWER
+INVENTORY.ISARMOR
Inventory.Amount 10;
CustomBaseArmor.ProtectionAmount 2;
}
override bool ShouldStay() // To keep the player from picking up more than one shield
{
let lastShield = FindInventory("CustomBaseArmor", true);
if (lastShield != NULL)
{
if ((protectAmount <= lastShield.protectAmount) && (Amount <= lastShield.Amount)) // Make sure the player doesn't get a bad shield either
{
return true;
}
RemoveInventory(lastShield);
}
return false;
}
}
- UltimateSavage
- Posts: 1
- Joined: Tue Oct 17, 2017 12:54 am
Re: The "How do I..." Thread
I have found resources from NAM and wanted to use them for the own project.
But I have faced a problem. All graphics are black-and-white.
I try to change a color palette, but i can't found NAM palette. I have chosen Duke Nukem palette, but nothing has occurred too, sprites are still black-and-white.
What needs to do, to make them color, like in original game?
But I have faced a problem. All graphics are black-and-white.
I try to change a color palette, but i can't found NAM palette. I have chosen Duke Nukem palette, but nothing has occurred too, sprites are still black-and-white.
What needs to do, to make them color, like in original game?
Re: The "How do I..." Thread
You need to cast lastShield to the CustomBaseArmor type by doing:cambertian wrote: However, that's not my current trouble either - though I will get back to it! Instead, I'm having trouble with making a new Armor class to accommodate this behavior. I can't seem to access one of the item's custom properties:Code: Select all
Script error, "health.pk3:zscript/hp/armor.zc" line 25: Unknown identifier 'protectAmount'
Code: Select all
let lastShield = CustomBaseArmor(FindInventory("CustomBaseArmor", true));
- Clay
- Posts: 190
- Joined: Fri Sep 22, 2017 9:52 pm
- Location: That one secret you always miss.
- Contact:
Re: The "How do I..." Thread
Is there a way to still have a sky while I am using a texture/flat with transparency on my ceiling? The transparent part only shows black.
Re: The "How do I..." Thread
Try changing the base resource to the NAM.GRP.UltimateSavage wrote:I have found resources from NAM and wanted to use them for the own project.
But I have faced a problem. All graphics are black-and-white.
I try to change a color palette, but i can't found NAM palette. I have chosen Duke Nukem palette, but nothing has occurred too, sprites are still black-and-white.
What needs to do, to make them color, like in original game?
Re: The "How do I..." Thread
You can make the sky as usual and then place a 3D sector of the transparent texture as the ceiling underneath it.SomeOtherDoomGuy wrote:Is there a way to still have a sky while I am using a texture/flat with transparency on my ceiling? The transparent part only shows black.