Monster Railgun aiming

Archive of the old editing forum
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.
User avatar
Anakin S.
Posts: 1067
Joined: Fri Nov 28, 2003 9:39 pm
Location: A long time ago in a galaxy far, far away...

Monster Railgun aiming

Post by Anakin S. »

It's very hard to dodge a monster railgun because of its near-perfect aim. Is there a way to make a monster fire not at the target itself but rather in the direction it happens to be facing (so the player can dodge it)? That way A_FaceTarget can do the aiming in a frame before that and the player can run out of the way when the monster shoots. Unless this is how it's done already.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

I believe that's how it's done already, but am not 100% sure. (It may just do it so that the sprite visually faces the target and the imp doesn't end up shooting a fireball out its ass...) Try putting a delay between A_FaceTarget and the firing frame and see what happens.
User avatar
Nanami
Posts: 1066
Joined: Tue Jul 15, 2003 5:13 pm
Location: That little island pritch created.
Contact:

Post by Nanami »

At least with projectiles, the shot itself will be toward the player even if the monster isn't. This can be seen with large delays between face and shot, or even freezing the game at the right time and moving.

Don't know about railguns though, but it's likely the same.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49073
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

A_MonsterRail does not contain an A_FaceTarget. As doesn't A_CustomMissile. All old attack functions do however. A_MissileAttack is just a generalized clone of the old attack functions and does also contain A_FaceTarget.
User avatar
Anakin S.
Posts: 1067
Joined: Fri Nov 28, 2003 9:39 pm
Location: A long time ago in a galaxy far, far away...

Post by Anakin S. »

Thanks for the info. I put 15 duration for the A_FaceTarget frame before the firing frame and the monster still scored a few direct hits as I ran out of its path.

But whether or not the monster faces the player does not determine the direction the projectile is aimed. If an imp shoots a fireball out of its ass, it means that although the imp doesn't face the player (no A_FaceTarget), it still shoots toward the target. It seems as though A_FaceTarget really does only have a visual effect. The railgun would still shoot toward the player, even if the monster doesn't use A_FaceTarget.

So is it possible to make the monster shoot the railgun in the direction it's facing, rather than directly at the target so that the player can dodge it?
User avatar
BouncyTEM
Posts: 3820
Joined: Sun Aug 24, 2003 5:42 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: 2280 Lol Street: The Calamitous Carnival (formerly Senators Prison)

Post by BouncyTEM »

SPEAKING of railguns, how much damage does the Railgun in Railgun.bex do? i needed this info YESTERDAY.
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

enough to kill the player in almost 1 shot
User avatar
BouncyTEM
Posts: 3820
Joined: Sun Aug 24, 2003 5:42 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: 2280 Lol Street: The Calamitous Carnival (formerly Senators Prison)

Post by BouncyTEM »

that doesn't tell me the numerical value..... :roll:
i'll never get the railgunner done.... :cry:
User avatar
The Ultimate DooMer
Posts: 2109
Joined: Tue Jul 15, 2003 5:29 pm
Location: Industrial Zone

Post by The Ultimate DooMer »

Set missile damage to 100.
User avatar
Giest118
Posts: 2914
Joined: Fri Dec 05, 2003 11:02 pm

Post by Giest118 »

Or if you're working with decorate, just set the monster's damage value to 100. (missiledamage is for DeHackEd)
User avatar
BouncyTEM
Posts: 3820
Joined: Sun Aug 24, 2003 5:42 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: 2280 Lol Street: The Calamitous Carnival (formerly Senators Prison)

Post by BouncyTEM »

giest118 wrote:Or if you're working with decorate, just set the monster's damage value to 100. (missiledamage is for DeHackEd)
same effect. the railgunner Decorate is done.
User avatar
Anakin S.
Posts: 1067
Joined: Fri Nov 28, 2003 9:39 pm
Location: A long time ago in a galaxy far, far away...

Post by Anakin S. »

I was hoping that the monster railgun would be done the way the quake 2 gladiator does it. He has to aim for a few ticks, then fire in the direction he's facing. The player can move out of the way while he's loading his railgun and dodge the blast since the monster can't fire directly at his target, only in the direction the monster is facing. Can this be done in zdoom? Suppose the railgun is fired with the monster's facing angle, and if a target happens to be in the way as it is fired, then the railgun would shoot up or down to auto aim at the target.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

It'd be even better if both the horizontal and vertical aiming were done separately. That way a falling player isn't toast just because he can't dodge horizontally.
User avatar
Anakin S.
Posts: 1067
Joined: Fri Nov 28, 2003 9:39 pm
Location: A long time ago in a galaxy far, far away...

Post by Anakin S. »

How about having some function in the frame before the firing frame like A_MonsterRailAim which takes in a target's location so that A_MonsterRail can use those coordinates to shoot the railgun at that location, whether the target is there or not. But if the designer doesn't have A_MonsterRailAim before using A_MonsterRail or its equivalent, then A_MonsterRail could operate like it does now (doing the aiming as it is fired) so that other mods wouldn't be broken. But I don't know whether it can be done with doom's code, so this might just be wishful thinking.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

If nothing else, a function to spawn a Mapspot at the target's current location, and then use that as the target for the next firing frame, would be sufficient.
Locked

Return to “Editing (Archive)”