Monster Railgun aiming
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.
- 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
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.
- Anakin S.
- Posts: 1067
- Joined: Fri Nov 28, 2003 9:39 pm
- Location: A long time ago in a galaxy far, far away...
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?
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?
- Bio Hazard
- Posts: 4019
- Joined: Fri Aug 15, 2003 8:15 pm
- Location: ferret ~/C/ZDL $
- Contact:
- The Ultimate DooMer
- Posts: 2109
- Joined: Tue Jul 15, 2003 5:29 pm
- Location: Industrial Zone
- Anakin S.
- Posts: 1067
- Joined: Fri Nov 28, 2003 9:39 pm
- Location: A long time ago in a galaxy far, far away...
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.
- Anakin S.
- Posts: 1067
- Joined: Fri Nov 28, 2003 9:39 pm
- Location: A long time ago in a galaxy far, far away...
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.