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.
Re: The "How do I..." Thread
ie... I should not be able to carry both the shotgun and supershotgun. I should have to drop one of them to carry the other.
-
- Posts: 8
- Joined: Tue May 23, 2017 8:15 pm
Re: The "How do I..." Thread
How do I replace a specific weapon with another one for a specific map?
I am trying to replace the BFG9000 with Hitlers Buzzsaw from Brutal Doom and only do this for MAP31 (This was done in Brutal Doom v20b, but I have v21 beta which no longer does this and want to re-enable this feature)
I am trying to replace the BFG9000 with Hitlers Buzzsaw from Brutal Doom and only do this for MAP31 (This was done in Brutal Doom v20b, but I have v21 beta which no longer does this and want to re-enable this feature)
- Rip and Tear
- Posts: 185
- Joined: Tue May 02, 2017 3:54 pm
Re: The "How do I..." Thread
I want to make a projectile that spawns other projectiles, but those other projectiles die when the main projectile dies. Would A_KillChildren work for this?
EDIT:
Testing this out, and I can't seem to get it to work. The smaller projectiles just don't die.
EDIT:
Testing this out, and I can't seem to get it to work. The smaller projectiles just don't die.
Code: Select all
class BigMissile : FastProjectile {
Default {
Speed 80;
Radius 14;
Height 8;
}
States {
Spawn:
TNT1 A 0; // The first state is skipped for some reason
TNT1 A 0 A_SpawnItemEx("SmallProjectile", 0, 0, 0, 0, 0, 0, 0, SXF_SETMASTER);
MISL A 1;
Wait;
Death:
TNT1 A 0 A_KillChildren("None", KILS_KILLMISSILES);
Stop;
}
}
class SmallMissile : FastProjectile {
States {
Spawn:
PLSS A 1;
Loop;
}
}
- worldendDominator
- Posts: 288
- Joined: Sun May 17, 2015 9:39 am
Re: The "How do I..." Thread
A_KillChildren doesn't work with projectiles. You have to use A_RemoveChildren, although that won't put them into Death state.
No, not quite. I think A_KillChildren only works if children are damageable.
No, not quite. I think A_KillChildren only works if children are damageable.
- Rip and Tear
- Posts: 185
- Joined: Tue May 02, 2017 3:54 pm
Re: The "How do I..." Thread
A_RemoveChildren doesn't work either. In fact, A_KillChildren won't even work when I spawn an actor that has health/death states.worldendDominator wrote:A_KillChildren doesn't work with projectiles. You have to use A_RemoveChildren, although that won't put them into Death state.
No, not quite. I think A_KillChildren only works if children are damageable.
Re: The "How do I..." Thread
Guys, I want to change the skull sprite at the main menu screen, so I put two sprites inside a pk3 file with the correct names (M_SKULL1 and M_SKULL2) but when I start the game the sprite has not changed, any thoughts? Here the file just in case:
https://www.dropbox.com/s/w93qv4uxpgmzk ... e.pk3?dl=0
Edit: Btw, could you guys recommend me a good program to edit sound and music files?
https://www.dropbox.com/s/w93qv4uxpgmzk ... e.pk3?dl=0
Edit: Btw, could you guys recommend me a good program to edit sound and music files?
-
- Posts: 8
- Joined: Tue May 23, 2017 8:15 pm
Re: The "How do I..." Thread
Put those two skull files inside a folder named GRAPHICS in the pk3. If you actually want to use the sprite you chose, you may have to edit it in something like SLADE to modify its offset to make the barrel line up with the menu text, I used 21, 9 and it worked.lwks wrote:Guys, I want to change the skull sprite at the main menu screen, so I put two sprites inside a pk3 file with the correct names (M_SKULL1 and M_SKULL2) but when I start the game the sprite has not changed, any thoughts? Here the file just in case:
https://www.dropbox.com/s/w93qv4uxpgmzk ... e.pk3?dl=0
Also Audacity is good for some basic sound/music editing
- 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
- Contact:
Re: The "How do I..." Thread
Are they +shootable, though?Rip and Tear wrote:A_RemoveChildren doesn't work either. In fact, A_KillChildren won't even work when I spawn an actor that has health/death states.
It might be simpler (if you're using ZScript) to just put this in the sub-projectile's see state:
Code: Select all
if(!master) A_Countdown();
Code: Select all
A_GiveToChildren("Clip")
Code: Select all
if(countinv("Clip")){A_Countdown();}
- Rip and Tear
- Posts: 185
- Joined: Tue May 02, 2017 3:54 pm
Re: The "How do I..." Thread
Do the sub-projectiles need to be +SHOOTABLE for A_RemoveChildren to work? It doesn't look like it, according to the wiki.Vaecrius wrote:Are they +shootable, though?Rip and Tear wrote:A_RemoveChildren doesn't work either. In fact, A_KillChildren won't even work when I spawn an actor that has health/death states.
It might be simpler (if you're using ZScript) to just put this in the sub-projectile's see state:EDIT: Or, if no ZScript, a combination ofCode: Select all
if(!master) A_Countdown();
andCode: Select all
A_GiveToChildren("Clip")
Code: Select all
if(countinv("Clip")){A_Countdown();}
Is there a way to test if the sub projectiles are even being correctly set as children?
Re: The "How do I..." Thread
It worked, thanks stranger! How did you know how much to offset? Is there a interface for that in slade or you tried until you got it right?FlappySack wrote: Put those two skull files inside a folder named GRAPHICS in the pk3. If you actually want to use the sprite you chose, you may have to edit it in something like SLADE to modify its offset to make the barrel line up with the menu text, I used 21, 9 and it worked.
Also Audacity is good for some basic sound/music editing
-
- Posts: 8
- Joined: Tue May 23, 2017 8:15 pm
Re: The "How do I..." Thread
There is nothing in slade that helps match the offset of one sprite with another sprite, but I saw that the sprite needed to be moved down (and maybe to the right a little, but I didn't do that) so I dragged the image down a bit in slade, saved it and exported and it worked!lwks wrote:It worked, thanks stranger! How did you know how much to offset? Is there a interface for that in slade or you tried until you got it right?
- 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
- Contact:
Re: The "How do I..." Thread
It shouldn't, though I've never used A_RemoveChildren since other things might (mis-re)use a master pointer for some other purpose and get caught as collateral damage.
Rip and Tear wrote:Is there a way to test if the sub projectiles are even being correctly set as children?
Code: Select all
if(master) A_Log(string.format("%s is master of %s", master.getclassname(), self.getclassname()));
- Rip and Tear
- Posts: 185
- Joined: Tue May 02, 2017 3:54 pm
Re: The "How do I..." Thread
Thank you! It turns out that the player is being set as the master for some reason, rather than the parent projectile. Unless anyone has a suggestion as to how to get around that, I'm going to have to write a custom action function to handle it with variables.Vaecrius wrote:It shouldn't, though I've never used A_RemoveChildren since other things might (mis-re)use a master pointer for some other purpose and get caught as collateral damage.
Rip and Tear wrote:Is there a way to test if the sub projectiles are even being correctly set as children?Code: Select all
if(master) A_Log(string.format("%s is master of %s", master.getclassname(), self.getclassname()));
Re: The "How do I..." Thread
Try adding this flag on the parent missile: SXF_ORIGINATOR.
- Rip and Tear
- Posts: 185
- Joined: Tue May 02, 2017 3:54 pm
Re: The "How do I..." Thread
Thanks, this fixed the parent issue, but A_RemoveChildren("true", RMVF_EVERYTHING) still isn't getting rid of the sub projectiles.D2JK wrote:Try adding this flag on the parent missile: SXF_ORIGINATOR.