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 have multiple sectors and want them all to flicker simultaneously, how can I do this?
Re: The "How do I..." Thread
What sort of flickering do you want? Do you want the sectors all to go to a predetermined light level with each flicker or do you want a bunch of different sectors that are at different light levels already to increase/decrease their light level by the same amount but stay different to each other.
If it's the first, it's pretty easy. I would do it with a restarting script and [wiki]Light_ChangeToValue[/wiki] with a randomised delay in there so that they don't flicker at a regular time interval.
The second is a bit more complicated. I do it by having a "flickerfactor" variable and then using it like this (from one of my levels):
That will lower every sector tagged 63 by whatever number was chosen for "flickerfactor", waits for a random delay, uses the same flicker factor to increase the lights back to what they were, waits another random time and then restarts. Note, you have to decrease and increase by the same value (rather than using one flicker factor for the decrease and another for the increase) otherwise the lights will get slowly brighter or duller overall depending on which random values are chosen.
If it's the first, it's pretty easy. I would do it with a restarting script and [wiki]Light_ChangeToValue[/wiki] with a randomised delay in there so that they don't flicker at a regular time interval.
The second is a bit more complicated. I do it by having a "flickerfactor" variable and then using it like this (from one of my levels):
Code: Select all
int flickerfactor;
Script 203 OPEN
{
flickerfactor = random (4,16);
Light_LowerByValue (63, flickerfactor);
delay(random(2,8));
Light_RaiseByValue (63, flickerfactor);
delay(random(16,50));
Restart;
}
Re: The "How do I..." Thread
Hmm, is there a way to fake it with projectiles or something? Having fine control over the angle and how many enemies can be hit would be nice, but not essential for me. What I want to do is make a 4 directional (or 8 if I can) dash move that will stun enemies and knock them back if it connects with them, so having a lot of range or a true "swing" arc isn't really necessary.Blue Shadow wrote:You mean like sword slash and such? Not currently.
Re: The "How do I..." Thread
You could make it with some very 'short-living' invisible projectiles. Just spawn them in the 'arc' you want and make them disapear in 1 frame. It's a kludge, but I guess it'd work.
Re: The "How do I..." Thread
How to make a weapon that shoots multiple projectiles that spread like a shotgun?
- 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
[wiki]A_FireCustomMissile[/wiki]
0-length frames let you do multiple things at once
use "frandom(minimum, maximum)" for pitch and angle
Beyond that, the wiki should be read.
Buggy real option: Fire a dummy missile that instantly calls [wiki]A_SpawnItemEx[/wiki] before disappearing, to spawn a projectile at the location of your choice which then moves along the specified arc.
0-length frames let you do multiple things at once
use "frandom(minimum, maximum)" for pitch and angle
Beyond that, the wiki should be read.
Shitty fake option: As above, firing one projectile after the other going down a line.Lork wrote:How do I make a melee attack that hits an arc in a specified direction rather than a fixed point in front of the player?
Buggy real option: Fire a dummy missile that instantly calls [wiki]A_SpawnItemEx[/wiki] before disappearing, to spawn a projectile at the location of your choice which then moves along the specified arc.
Re: The "How do I..." Thread
How do I make it so that when the player crosses a line, after being frozen (or before, I guess, either way, he's getting frozen
) he is forced to look at a specific thing?
I assume that I will have to get the player's position in relation to that thing and then use [wiki]SetActorAngle[/wiki] but I don't know how to get the angle of the thing in relation to the player. Failing that, I will just for him to face south. With the setup in the map, that will work 99% or the time anyway.
As a bonus question, how could I make it so the plater turns smoothly to the correct facing rather than just snapping into position?
[edit]
Well, I'm sure that this is not going to be the best way to do this but, putting that aside, I'm dead chuffed that I was able to produce...
Simply because it works and a few years ago I was struggling to make a script where a platform and a door moved after each other. Yay! Go me or something.
Now, I wonder if I can get view pitch in here somehow? [/edit]
[edit2] Wait wut? So, no wonder I was struggling with pitch. I was messing with numbers like 0-90 and the range is actually something like -16384 to 16384. [/edit2]

I assume that I will have to get the player's position in relation to that thing and then use [wiki]SetActorAngle[/wiki] but I don't know how to get the angle of the thing in relation to the player. Failing that, I will just for him to face south. With the setup in the map, that will work 99% or the time anyway.
As a bonus question, how could I make it so the plater turns smoothly to the correct facing rather than just snapping into position?
[edit]
Well, I'm sure that this is not going to be the best way to do this but, putting that aside, I'm dead chuffed that I was able to produce...
Code: Select all
if (GetActorAngle(0) >0.76)
{
While ((GetActorAngle(0) - 0.75) > 0)
{
SetActorAngle (0, GetActorAngle (0) - 0.01);
delay(1);
}
}
if (GetActorAngle(0) <0.74)
{
While ((GetActorAngle(0) - 0.75) <0)
{
SetActorAngle (0, GetActorAngle (0) + 0.01);
delay(1);
}
}
Now, I wonder if I can get view pitch in here somehow? [/edit]
[edit2] Wait wut? So, no wonder I was struggling with pitch. I was messing with numbers like 0-90 and the range is actually something like -16384 to 16384. [/edit2]
Last edited by Enjay on Wed Feb 27, 2013 1:10 pm, edited 2 times in total.
-
- Posts: 5046
- Joined: Sun Nov 14, 2010 12:59 am
Re: The "How do I..." Thread
All I know is that it has something to do with [wiki]VectorAngle[/wiki] (or I think anyway). Though how to utilize it, I haven't got a clue.Enjay wrote:I assume that I will have to get the player's position in relation to that thing and then use [wiki]SetActorAngle[/wiki] but I don't know how to get the angle of the thing in relation to the player.

Re: The "How do I..." Thread
How to make projectiles stick to monsters?
Re: The "How do I..." Thread
The old way was a combination of the Archvile's A_Fire and +DONTFALL, along with some other tricks. If you want to see it in action, download the Bio-Pipebomb Launcher on Realm667. Now you can do it with A_Warp, which through some work could let you stick projectiles onto different parts of a monster, which you couldn't do with the A_Fire technique.Warhawk wrote:How to make projectiles stick to monsters?
Re: The "How do I..." Thread
Not really a "how do I" but not worth its own thread. I know that there has been some restrictions on sector heights and step-ups. So, is a sector with floor -4224 and ceiling 1792 (total height 6016) OK? The biggest stepup is about 1600. Is that OK?
All in ZDoom Hexen format.
All in ZDoom Hexen format.
-
- Posts: 5046
- Joined: Sun Nov 14, 2010 12:59 am
- timmyr0x0r
- Posts: 200
- Joined: Sat Mar 27, 2010 5:37 am
Re: The "How do I..." Thread
This is super n00bey, but how do I use portals correctly again?
I am trying to reproduce the Non-euclidian geometry trick from that secret Duke Nukem 3d level (the "making two complete turns of the circular room to be back at the start" trick) but no results for now.
I am trying to reproduce the Non-euclidian geometry trick from that secret Duke Nukem 3d level (the "making two complete turns of the circular room to be back at the start" trick) but no results for now.
Re: The "How do I..." Thread
Thanks for the reply. I've tried the heights too and not experienced any problems. So it seems OK but I was just a little worried that somehow it might not fail massively but create little oddties (such as the ones you can get where very large maps go outside a certain coordinate). However, like I said, it seems OK and with your trial backing me up, I can be more confident with it.
Re: The "How do I..." Thread
New Question - Am I correct in saying that there is no way to make a hi-res confont or to change which fonts are used in the menus?
I'm currently trying to use a HR font but the menus (especially the controls config) look odd with a HR font on the left and the regular confont on the right.
I'm currently trying to use a HR font but the menus (especially the controls config) look odd with a HR font on the left and the regular confont on the right.
