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
The decorate references sprites like SWPI but I don't see and sprites with that name in the file.
Re: The "How do I..." Thread
Is there a definition somewhere to change the main menu option colour? I see the various menufontcolor_ properties in gameinfo, but not one for the very first page (New Game, Options, etc)
https://zdoom.org/wiki/MAPINFO/GameInfo_definition
https://zdoom.org/wiki/MAPINFO/GameInfo_definition
-
- Posts: 89
- Joined: Tue May 24, 2016 8:59 am
Re: The "How do I..." Thread
Hooray for missing the obvious! Thank you, that was the issue.Enjay wrote:The decorate references sprites like SWPI but I don't see and sprites with that name in the file.
- sonic_HD87
- Posts: 287
- Joined: Sat Mar 23, 2013 4:32 pm
- Location: Venezuela
Re: The "How do I..." Thread
I have a script which structure is like this:
The idea of this is that, if an actor executes the script, his speed will increase AND THEN will decrease. The thing is this: Only 1 script can be executed at a time until the loops ended. Even using ACS_ExecuteAlways, it doesn't help since it can't run another iteration of the script while there's one being executed.
There's a way to execute the same script multiple times regardless of the loops?
EDIT: Nvm, i was executing it in the wrong way. Silly me.
Code: Select all
script 29 (void)
{
int X = 22.0;
//First, it increase the actor Vel gradually
while(GetActorVelX(0) < X)
{
SetActorVelocity(0,GetActorVelX(0)+1.0,0.0,0.0);
delay(1);
}
//After that, it decreases his speed gradually until is 0
while(GetActorVelX(0) != 0)
{
SetActorVelocity(0,GetActorVelX(0)-1.0,0.0,0.0);
delay(1);
}
}
There's a way to execute the same script multiple times regardless of the loops?
EDIT: Nvm, i was executing it in the wrong way. Silly me.

- worldendDominator
- Posts: 291
- Joined: Sun May 17, 2015 9:39 am
Re: The "How do I..." Thread
You should probably check for >0 in the second loop, and then set it to 0 after it. Just in case of fractional velocity.
- Ral22
- Posts: 531
- Joined: Sun Sep 05, 2010 12:09 pm
- Preferred Pronouns: He/Him
- Location: The Fortress of Dr. Radiaki
- Contact:
Re: The "How do I..." Thread
It's likely been assessed before, but I just want to know for sure: Is there a way for fonts to utilize PNG alpha? Perhaps some TEXTURES workaround or the like? I can adjust if there's no other choice, but I've got the font all nice and set with PNG alpha currently.
Re: The "How do I..." Thread
Ral22: Nope, it's currently not possible. Hope this limitation will be lifted when/if GZDoom implements TrueType fonts (Graf was seen recently mentioning it briefly as a "what if"... can't remember where, maybe it was on the Mantis board).
- Ral22
- Posts: 531
- Joined: Sun Sep 05, 2010 12:09 pm
- Preferred Pronouns: He/Him
- Location: The Fortress of Dr. Radiaki
- Contact:
Re: The "How do I..." Thread
Wow, that'd be a dream. If I'm picturing it right, it would make for easy font implementation and smooth, clean fonts no matter the resolution. Oh, to dream.Nash wrote:Ral22: Nope, it's currently not possible. Hope this limitation will be lifted when/if GZDoom implements TrueType fonts (Graf was seen recently mentioning it briefly as a "what if"... can't remember where, maybe it was on the Mantis board).
Thanks for the quick reply, Nash! Always appreciate your help.
Re: The "How do I..." Thread
How do I give a FireCustomMissile sideways velocity? Trying to make shell casings that respect the pitch of the player's camera (since SpawnItemEx doesn't) but my casings just always end up falling straight to the floor from the middle of my player sprite. I tried using an example from here but no good, even with the exact numbers the casings don't spawn properly. Even though SpawnItemEx doesn't use pitch, it sure does work a lot better. Why can't it have flags to respect pitch like others do? 

Re: The "How do I..." Thread
Well Randi also briefly touched on it years ago so... I guess we can hope. =PRal22 wrote:If I'm picturing it right, it would make for easy font implementation and smooth, clean fonts no matter the resolution. Oh, to dream.
-
- Posts: 89
- Joined: Tue May 24, 2016 8:59 am
Re: The "How do I..." Thread
So I ran into another issue with the mod I'm working on, and I'm halfway hoping it's another case of me being stupid and only needs a really simple fix. The same weapon I was just getting started has a standard sword swing attack and an alt-fire that launches a projectile. I'm trying to get it put together so that killing monsters with the sword's standard attack gives ammo for the alt-fire, but it doesn't seem to be working right.
Here's what the sword looks like at the moment:
Here's what the sword looks like at the moment:
Spoiler:And here's the death I've tried coding into my one monster so far:
Spoiler:Any advice on getting this to work the way I intend it to would be much appreciated.
- sonic_HD87
- Posts: 287
- Joined: Sat Mar 23, 2013 4:32 pm
- Location: Venezuela
Re: The "How do I..." Thread
Haven't you tried x+Cos(Angle) and y+sin(angle)?Nevander wrote:How do I give a FireCustomMissile sideways velocity? Trying to make shell casings that respect the pitch of the player's camera (since SpawnItemEx doesn't) but my casings just always end up falling straight to the floor from the middle of my player sprite. I tried using an example from here but no good, even with the exact numbers the casings don't spawn properly. Even though SpawnItemEx doesn't use pitch, it sure does work a lot better. Why can't it have flags to respect pitch like others do?
- Dr_Cosmobyte
- Posts: 2852
- Joined: Thu Jun 04, 2015 9:07 pm
- Preferred Pronouns: He/Him
- Location: Killing spiders.
- Contact:
Re: The "How do I..." Thread
The other question wasn't as important as this.
My project has three classes and the player is kinda thrown without any informaion about it. I wanted to make the option to display a little description of the character class when you choose it, so the player can confirm before going to the episode or difficulty screen.
Is there a way to define it on MENUDEF?
My project has three classes and the player is kinda thrown without any informaion about it. I wanted to make the option to display a little description of the character class when you choose it, so the player can confirm before going to the episode or difficulty screen.
Is there a way to define it on MENUDEF?
- 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
LogicalFallacy: A_GiveToTarget instead of A_DropItem should work most of the time.
An initially more complex but more comprehensive and maintainable solution would be to make the sword attack use a custom puff that has +PUFFGETSOWNER, +PUFFONACTORS and +HITTRACER* and have it call A_GiveToTarget when the tracer has no health.
(*I'm assuming this works for puffs, can't confirm right now. If not you can always just hit with an invisible projectile instead of using a punch attack...)
An initially more complex but more comprehensive and maintainable solution would be to make the sword attack use a custom puff that has +PUFFGETSOWNER, +PUFFONACTORS and +HITTRACER* and have it call A_GiveToTarget when the tracer has no health.
(*I'm assuming this works for puffs, can't confirm right now. If not you can always just hit with an invisible projectile instead of using a punch attack...)
- 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
Here's the code for ejecting the bolt-action rifle casing in HD:Nevander wrote:How do I give a FireCustomMissile sideways velocity? Trying to make shell casings that respect the pitch of the player's camera (since SpawnItemEx doesn't) but my casings just always end up falling straight to the floor from the middle of my player sprite. I tried using an example from here but no good, even with the exact numbers the casings don't spawn properly. Even though SpawnItemEx doesn't use pitch, it sure does work a lot better. Why can't it have flags to respect pitch like others do?
Code: Select all
A_SpawnItemEx(
"HDSpent7mm",
//all these are already relative positions so no angle adjustment
cos(pitch)*8,
1,
height-7-sin(pitch)*8,
//all these are relative velocities
//as a simple mnemonic: velx is cos everything
//the -80 is to get the casing coming out sideways
//the starting speed is 6 DUs per tic, so all results are *6
cos(pitch)*cos(angle-80) * 6 + velx,
cos(pitch)*sin(angle-80) * 6 + vely,
-sin(pitch)* 6 + velz, //the minus sign is important!
0, //same as player
SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH
)