
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
I've made some kludges here with dummy boolean variables, but your idea is good too! Thanks! 

Re: The "How do I..." Thread
Yeah, there are two ways to do that:an "actor enter sector" thing to execute its special only once?
1. method:
Code: Select all
bool exec;
script 1 (void)
{
if(exec == false)
{
exec = true;
// your code
}
}
Code: Select all
script 1 (void)
{
// your code
Thing_Remove(tid);
}
Re: The "How do I..." Thread
Is there a way to detect if a projectile has been refelected? For example if a projectile is reflected by a weapon is there any way to "tell" the weapon that?
- 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
You might be able to have the projectile detect drastic changes in angle and/or pitch, and then alert the shooter to that.
Re: The "How do I..." Thread
Well for the moment I've got a work-around. It's pretty hack-ish but it works nonetheless.
- 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 exactly do I make a bigfont lump?
I've tried Spidey's ZDoom font generator and this is all i get:
I've tried Spidey's ZDoom font generator and this is all i get:
Spoiler:Running as admin makes the program not start at all.
Spoiler: Heres the picture
- 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
How would you go about changing a mugshot based on player's gender only, independent of class and without using skins?
- The Zombie Killer
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: The "How do I..." Thread
It's probably a hacky solution, but I imagine you could use ACS to check the player's gender and give them an appropriate inventory item for each gender. Then in sbarinfo, where you draw the mugshot, add InInventory checks for each mugshot item.Vaecrius wrote:How would you go about changing a mugshot based on player's gender only, independent of class and without using skins?
Use a script along the lines of this:
Code: Select all
#define GENDER_MALE 0
#define GENDER_FEMALE 1
#define GENDER_OTHER 2
Script "MugshotHandler" ENTER
{
int gender;
While(1)
{
gender = GetPlayerInfo(PlayerNumber(), PLAYERINFO_GENDER);
Switch(gender)
{
// You can also use TakeInventory("ITEM", CheckInventory("ITEM")) instead of taking one of each item, I guess this can be more reliable,
// considering difficulty levels can change the maximum amount of an item you can have, but if you don't want that to happen, just use
// +INVENTORY.IGNORESKILL
case GENDER_MALE:
GiveInventory("GenderItem_Male", 1);
TakeInventory("GenderItem_Female", 1);
TakeInventory("GenderItem_Other", 1);
break;
case GENDER_FEMALE:
TakeInventory("GenderItem_Male", 1);
GiveInventory("GenderItem_Female", 1);
TakeInventory("GenderItem_Other", 1);
break;
case GENDER_OTHER:
TakeInventory("GenderItem_Male", 1);
TakeInventory("GenderItem_Female", 1);
GiveInventory("GenderItem_Other", 1);
break;
}
Delay(1);
}
}
Code: Select all
ACTOR GenderItem_Male : Inventory
{
Inventory.MaxAmount 1
+INVENTORY.IGNORESKILL
}
ACTOR GenderItem_Female : GenderItem_Male {}
ACTOR GenderItem_Other : GenderItem_Male {}
However, I don't think there's a way to change Player.Face at will, so this is the only way I can think of doing thisThe Wiki wrote:Note: Early versions of this command had an additional default parameter at the beginning which gave the default prefix to use for the mugshot unless overridden by a skin. This parameter has been deprecated in favor of Player.Face.
Code: Select all
InInventory GenderItem_Male, 1
{
drawmugshot "STF", 5, 143, 168;
}
InInventory GenderItem_Female, 1
{
drawmugshot "FEM", 5, 143, 168;
}
InInventory GenderItem_Other, 1
{
drawmugshot "OTH", 5, 143, 168;
}
- 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
That's pretty much what I ended up doing.
Turns out, though, that I've got to define player.face as "" or it would always default to either what it was specified to (if valid) or STF (if not valid), which is fine except setting it to "" gives an error message in the console.
Definitely not a good solution, but workable for now.
Turns out, though, that I've got to define player.face as "" or it would always default to either what it was specified to (if valid) or STF (if not valid), which is fine except setting it to "" gives an error message in the console.
Definitely not a good solution, but workable for now.
- The Zombie Killer
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: The "How do I..." Thread
@Vaecrius
What kind of error was it? What if you make a bunch of empty images with the same names as the status bar graphics? but minus the "STF", so stuff like "KILL0" and "GOD0"
Does that change it at all?
What kind of error was it? What if you make a bunch of empty images with the same names as the status bar graphics? but minus the "STF", so stuff like "KILL0" and "GOD0"
Does that change it at all?
- 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
If I had no player.face definition at all, it would always show STF no matter what I did in the SBARINFO.
The string is considered invalid if I did not have 3 characters, so defining it as "" gives
But if I put in literally any other string than SFF (what I've used for the female mugshot), STF will show no matter what I do in SBARINFO, and if I use SFF then only SFF will show.
The string is considered invalid if I did not have 3 characters, so defining it as "" gives
(This should actually be just 1 error for "dcplayer.txt" line 87 - I've always gotten these weird problems with labels for things ever since GZDoom switched from SVN to Git.)Script warning, "" line 0:
Invalid face '' for 'HDPlayer'
STF replacement codes must have 3 characters.
Script warning, "" line 0:
Invalid face '' for 'HDPlayer'
STF replacement codes must have 3 characters.
But if I put in literally any other string than SFF (what I've used for the female mugshot), STF will show no matter what I do in SBARINFO, and if I use SFF then only SFF will show.
- The Zombie Killer
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: The "How do I..." Thread
That's strange. Could it be considered a bug? Then again, since the "default" parameter is deprecated, I'm not sure this behavior is going to be changed.
I guess a proper way to change the mugshot at will would be a better idea
I guess a proper way to change the mugshot at will would be a better idea
- NeoSpearBlade
- Posts: 51
- Joined: Tue Mar 26, 2013 1:35 pm
Re: The "How do I..." Thread
.....And I'm back.
What I want to do is make a sound mod that can be used with almost any mod that replaces monsters (via DeHackEd) and weapons and by modifying just the sound and it's definitions, I would accomplish this. However, what you suggested means modifying a monster's actor code, which gives my sound mod a chance to cause an error, which is what I want to avoid.
What I was thinking is once again using The Mancubus as an example, I want to make it so that when the game reads The Mancubus' attack sound code which is fatso/attack, it instead loads 2 or 3 sounds at the same time.
Is this possible at all?
That's.....kinda what I meant but not the solution I was thinking. Let me explain.MeatyD wrote:Yes. Check out A_PlaySound and use 2 different channels.NeoSpearBlade wrote: Is it possible for when an enemy attacks with a projectile, let's say The Mancubus, to play 2 sounds at once?
What I want to do is make a sound mod that can be used with almost any mod that replaces monsters (via DeHackEd) and weapons and by modifying just the sound and it's definitions, I would accomplish this. However, what you suggested means modifying a monster's actor code, which gives my sound mod a chance to cause an error, which is what I want to avoid.
What I was thinking is once again using The Mancubus as an example, I want to make it so that when the game reads The Mancubus' attack sound code which is fatso/attack, it instead loads 2 or 3 sounds at the same time.
Is this possible at all?
- 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
sounds like you want some kind of audio equivalent to TEXTURES.
which would be awesome but I don't think it exists (but someone please correct me if I am wrong)
which would be awesome but I don't think it exists (but someone please correct me if I am wrong)
Re: The "How do I..." Thread
No, it is not possible. Youu'd have to layer the sounds yourself in some audio editing software I suppose.
Why do you want three different sounds to be played at once instead of one?
Why do you want three different sounds to be played at once instead of one?