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.
-
- Posts: 1560
- Joined: Wed Aug 28, 2013 1:36 pm
Re: The "How do I..." Thread
How can i do the following ...
While using a special ability, make the player take armor damage(in other words, i'd like to use armor points as ammo for the special ability)
I've tried this and it didn't worked
A_TakeInventory ("Armor", 10)
i also tried
A_TakeInventory (XXArmorBonus, 10)
But of course it didn't work so is it something possible with A_TakeInventory or there is an other way to achieve this?
While using a special ability, make the player take armor damage(in other words, i'd like to use armor points as ammo for the special ability)
I've tried this and it didn't worked
A_TakeInventory ("Armor", 10)
i also tried
A_TakeInventory (XXArmorBonus, 10)
But of course it didn't work so is it something possible with A_TakeInventory or there is an other way to achieve this?
-
- Posts: 5043
- Joined: Sun Nov 14, 2010 12:59 am
Re: The "How do I..." Thread
Use [wiki=Classes:BasicArmor]BasicArmor[/wiki] instead, like this: A_TakeInventory ("BasicArmor", 10).
-
- Posts: 1560
- Joined: Wed Aug 28, 2013 1:36 pm
Re: The "How do I..." Thread
Thanks i'll do thatBlue Shadow wrote:Use [wiki=Classes:BasicArmor]BasicArmor[/wiki] instead, like this: A_TakeInventory ("BasicArmor", 10).

EDIT : It's working thanks

Re: The "How do I..." Thread
Thanks.
I'm going to get too familiar with this thread (sorry for that), but never mind, I have two more problems which requires someone's help.
I searched on forums, the wiki, into various files, spent hours to try finding a solution, but unfortunately found nothing. And I guess the answer is much more simple than I expected...
1° : This.wad I wanted to add MaxHealth and MaxArmor Bonuses. I copied exactly the same properties from the zandronum.pk3 file, but the DECORATE lump still has troubles. I know what's wrong (error message is clear enough) but I don't know what to change. I guess if I delete what's wrong, then the items won't work properly...

2° : I have a new weapon and I want it to reload every two shots. There are two animations : one between two shot - this one works fine - and one between two-shots series which is supposed to be defined in AltFire (am I correct ?))
But I'm stuck with the A_JumpIfInventory thing. I also found A_JumpIf (maybe better for what I want ?) but still, I can't figure what to define...

- Slax
- ... in rememberance ...
- Posts: 2121
- Joined: Tue Oct 19, 2010 7:01 am
- Location: Window office.
- Contact:
Re: The "How do I..." Thread
Let's say someone's feeling fancy. "Hey, I want my mod to have 10 mugshot sets!" 90-100 health, 80-89, 70-79... something like that.
Would it be a simple task to twist the game into allowing this?
Would it be a simple task to twist the game into allowing this?
- Marrub
-
- Posts: 1202
- Joined: Tue Feb 26, 2013 2:48 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Arch Linux
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Contact:
Re: The "How do I..." Thread
Yes. [wiki]SBARINFO[/wiki] has a [wiki=SBARINFO#Mug_shots]mugshot[/wiki] block that allows you to do exactly that.
-
- Posts: 28
- Joined: Wed Nov 14, 2012 1:33 am
Re: The "How do I..." Thread
Yay, it works! ^-^ I have officially given you a "special thanks" in the decorate file for it. :3Blue Shadow wrote: One way I could think of is having the projectile give an item on impact to the player (using [wiki]A_RadiusGive[/wiki]) so they can be blasted in the air (by [wiki]A_ChangeVelocity[/wiki]).
Anybody know about MODELDEF? I'm having an infuriating issue where gzdoom crashes and tells me I have an "unknown actor type" in MODELDEF, and points to the name between the "Model" and "{"
EDIT: NEVERMIND! I realized I didn't have an actor named "grunthead" in my decorate, and putting that in made the MODELDEF work. Apparently, if the name of your model doesn't match the name of an actor then everything crashes. I don't get it, but lessons for the future I guess. At least I didn't make a silly formatting error like forgetting a semicolon. THAT would have been embarrassing.

EDIT AGAIN: Ok, I figured it out, turns out the wiki actually DID have the answer, I just didn't understand what I was looking at. Derp ~_~
Last edited by renaldones on Thu Jan 09, 2014 4:07 pm, edited 1 time in total.
- Slax
- ... in rememberance ...
- Posts: 2121
- Joined: Tue Oct 19, 2010 7:01 am
- Location: Window office.
- Contact:
Re: The "How do I..." Thread
Mmm, I'll have to do some tinkering. Thanks.
- NeoSpearBlade
- Posts: 51
- Joined: Tue Mar 26, 2013 1:35 pm
Re: The "How do I..." Thread
To those who responded to my posts, sorry for not replying in 3 weeks. The holidays distracted me. Speaking of which, I hope everyone had a wonderful time during Christmas and New Years.
And now, back to my problems.
The reason why I didn't post it along with the recreation code was because the sounds were played when the projectile itself is fired, which indicated that the code was working perfectly fine. Therefore, I didn't see the reason to post my modified code for the Press Release plasma balls, since I didn't do too much with them other than to give the Press Release plasma balls it's own base class. So the only thing worth mentioning about the code is the fact that when it's fired through PressReleaseBFGPlasmaBallRandom, it won't play the sound.
@The Zombie Killer
I will admit, I did not understand much of the code that you put up although one thing did catch my eye and it got me thinking.....would adding the WEAPON.NOAUTOAIM flag to PressReleaseBFGPlasmaBallBase work? I'll try that out later.
One more thing, while I do want to solve my problems with the codes, I'm currently focused in using my gun mod on the Plutonia: Revisited Community Project megawad and I do want to beat it. As of this post, I'm at MAP15: Helix and when I finish the megawad, I'll focus back on getting my problems resolved. I wanted to put this post up anyway because sometimes I do reply back to the people who are trying to help me, to let them know I'm not ignoring you. Thanks for helping me trying to figure out my problems. It's very much appreciated. ^_^
And now, back to my problems.
It is defined. I just didn't show it. Here's the code, which is relevant to my recreation code:amv2k9 wrote:I don't see a SeeSound defined for the projectiles.
Code: Select all
ACTOR PressReleaseBFGPlasmaBallBase //This is the parentclass for the Press Release plasma balls.
{
Game Doom
SpawnID 51
Radius 13
Height 8
Speed 25
Damage 5
Projectile
+RANDOMIZE
RenderStyle Add
Alpha 0.75
SeeSound "weapons/plasmagf"
DeathSound "weapons/plasmax"
Obituary "$OB_MPPLASMARIFLE"
States
{
Spawn:
PLSS AB 6 Bright
Loop
Death:
PLSE ABCDE 4 Bright
Stop
}
}
ACTOR PressReleaseBFGPlasmaBallRandom : RandomSpawner
{
// SeeSound "weapons/plasmagf" //After I added this, it still wouldn't play the sound so it's Dummied Out.
DropItem "PressReleaseBFGPlasmaBallGreen", 255, 1
DropItem "PressReleaseBFGPlasmaBallRed", 255, 1
}
ACTOR PressReleaseBFGPlasmaBallGreen : PressReleaseBFGPlasmaBallBase replaces PlasmaBall1
{
Damage 4
decal GreenPlasmaScorch
BounceType "Classic"
BounceFactor 1.0
Obituary "$OB_MPBFG_MBF"
States
{
Spawn:
PLS1 AB 6 Bright
Loop
Death:
PLS1 CDEFG 4 Bright
Stop
}
}
ACTOR PressReleaseBFGPlasmaBallRed : PressReleaseBFGPlasmaBallBase replaces PlasmaBall2
{
Damage 4
decal RedPlasmaScorch
BounceType "Classic"
BounceFactor 1.0
Obituary "$OB_MPBFG_MBF"
States
{
Spawn:
PLS2 AB 6 Bright
Loop
Death:
PLS2 CDE 4 Bright
Stop
}
}
@The Zombie Killer
I will admit, I did not understand much of the code that you put up although one thing did catch my eye and it got me thinking.....would adding the WEAPON.NOAUTOAIM flag to PressReleaseBFGPlasmaBallBase work? I'll try that out later.
One more thing, while I do want to solve my problems with the codes, I'm currently focused in using my gun mod on the Plutonia: Revisited Community Project megawad and I do want to beat it. As of this post, I'm at MAP15: Helix and when I finish the megawad, I'll focus back on getting my problems resolved. I wanted to put this post up anyway because sometimes I do reply back to the people who are trying to help me, to let them know I'm not ignoring you. Thanks for helping me trying to figure out my problems. It's very much appreciated. ^_^
-
- Posts: 7
- Joined: Fri Dec 27, 2013 11:22 pm
Re: The "How do I..." Thread
How do I change the angle of the actor´s sprites showing, without changing the angle of the actor´s camera?
- Darsycho
- Posts: 858
- Joined: Sat Jul 05, 2008 1:36 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Linux Mint 21.3 Cinnamon, Windows 11
- Graphics Processor: nVidia with Vulkan support
- Contact:
Re: The "How do I..." Thread
How do I change the direction of a projectile via decorate?
Also: I'm wanting a projectile's direction to turn a bit, not instantly switching to the direction.
Also: I'm wanting a projectile's direction to turn a bit, not instantly switching to the direction.
- The Zombie Killer
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: The "How do I..." Thread
I would imagine you either change its angle, or change its velocity through A_ChangeVelocity, Sin, and Cos.jack101 wrote:How do I change the direction of a projectile via decorate?
Also: I'm wanting a projectile's direction to turn a bit, not instantly switching to the direction.
Probably not, worth a try though. I think I made an example wad, but I might've lost it since I reformatted. I'll try and look for it and upload it here, it might make it easier for you to understand the code.NeoSpearBlade wrote:@The Zombie Killer
I will admit, I did not understand much of the code that you put up although one thing did catch my eye and it got me thinking.....would adding the WEAPON.NOAUTOAIM flag to PressReleaseBFGPlasmaBallBase work? I'll try that out later.
- zrrion the insect
- Posts: 2432
- Joined: Thu Jun 25, 2009 1:58 pm
- Location: Time Station 1: Moon of Glendale
Re: The "How do I..." Thread
This is from the wiki page on A_FireConePL1. What is the melee range though, It doesn't say?the wiki wrote:checks to see if any monster is in melee range up to 45 degrees to the left of the player.
-
- Posts: 5043
- Joined: Sun Nov 14, 2010 12:59 am
Re: The "How do I..." Thread
It's 64, if I'm not mistaken.zrrion the insect wrote:What is the melee range though, It doesn't say?
- zrrion the insect
- Posts: 2432
- Joined: Thu Jun 25, 2009 1:58 pm
- Location: Time Station 1: Moon of Glendale
Re: The "How do I..." Thread
I've been using A_JumpIfCLoser(96,"dothething") before that A_FireConePL1, in the hopes of catching anything that would be the melee, but it sometimes still does the regular melee instead of the one I'd like for it to. I'm assuming that is because of the "45 degrees to the left of the player" part then? If so, what would I use to check for that since A_JumpIfTargetInLOS's FOV value is ignored on weapons?
EDIT: would it be easier to replicate the projectile stuff that A_FireConePL1 does rather than to replicate the melee checks it does?
EDIT EDIT: Is there any way to determine the damage type of a sector via acs? I know it can be set, but I was wondering if it could be retrieved.
EDIT: would it be easier to replicate the projectile stuff that A_FireConePL1 does rather than to replicate the melee checks it does?
EDIT EDIT: Is there any way to determine the damage type of a sector via acs? I know it can be set, but I was wondering if it could be retrieved.