Trying to emulate the Inquisitor's grenade attack

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
Enjay
 
 
Posts: 26991
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Trying to emulate the Inquisitor's grenade attack

Post by Enjay »

When the Inquisitor robot attacks it will either fire its gun or launch two [wiki]Classes:InquisitorShot[/wiki]s using the [wiki]A_InquisitorAttack[/wiki] function. However, this function has a slight problem: the robot has got two shoulder-mounted weapons where the grenades are supposed to come from but the grenades (one in particular) fire much lower than that - pretty much at foot level, certainly low enough to get caught even on relatively small obstacles.

I've been trying to make something that launches the grenades at the correct height but otherwise keeps the feel of the attack much the same. However, I have failed. Can anyone help out here?
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Trying to emulate the Inquisitor's grenade attack

Post by NeuralStunner »

There should be everything you need, including height, in [wiki]A_FireCustomMissile[/wiki].
Gez
 
 
Posts: 17942
Joined: Fri Jul 06, 2007 3:22 pm

Re: Trying to emulate the Inquisitor's grenade attack

Post by Gez »

That's a weapon attack function. Monsters should use [wiki]A_CustomMissile[/wiki].
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Trying to emulate the Inquisitor's grenade attack

Post by NeuralStunner »

Whoops, right. Been working on weapons lately so that would be poor reflex. :P
User avatar
LilWhiteMouse
Posts: 2270
Joined: Tue Jul 15, 2003 7:00 pm
Location: Maine, US
Contact:

Re: Trying to emulate the Inquisitor's grenade attack

Post by LilWhiteMouse »

@NeuralStunner: So how do we go about making A_CustomMissile() determine the necessary arc in order to hit the player?
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Trying to emulate the Inquisitor's grenade attack

Post by NeuralStunner »

From the description of the original function, I see no such provision in the original function. :?

I wouldn't know how to make a "smart trajectory", other than working with the distance and pitch to the current target. (Neither of which is currently possible without some ACS integration, AFAIK.) I'm of no help there.
User avatar
Enjay
 
 
Posts: 26991
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Trying to emulate the Inquisitor's grenade attack

Post by Enjay »

Yes, that's been my problem - getting that intelligent arc. The closest to something that felt right was actually using A_SpawnItemEx rather than a typical projectile function. It worked really quite well, especially at medium distances but it was too easy for the player to get out of range - which is less easy with the inbuilt function which can throw the grenades further if you are far away from the Inquisitor.
User avatar
LilWhiteMouse
Posts: 2270
Joined: Tue Jul 15, 2003 7:00 pm
Location: Maine, US
Contact:

Re: Trying to emulate the Inquisitor's grenade attack

Post by LilWhiteMouse »

This has been an on and off trial for me. I've tried numerous times to get an enemy to properly toss a grenade, but with little success. I've looked up ballistic trajectory equations, but found nothing I could translate to ACS. I could have sworn someone (I thought I did?) posted a feature request for tossing a projectile, but I can't find it.
User avatar
Enjay
 
 
Posts: 26991
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Trying to emulate the Inquisitor's grenade attack

Post by Enjay »

Xtyfe's bump of this thread:

http://forum.zdoom.org/viewtopic.php?f=34&t=30291

got me wondering if the stuff therein would be any use for this kind of attack (if it was implemented, of course).
User avatar
amv2k9
Posts: 2178
Joined: Sun Jan 10, 2010 4:05 pm
Location: Southern California

Re: Trying to emulate the Inquisitor's grenade attack

Post by amv2k9 »

Somebody made a smart grenade firing enemy... can't remember the thread, but the mod was also packaged with a couple other minimods that included laser tripmines and a Half-Life-style rocket launcher (weapon emits a laser dot, fired rockets will follow the dot wherever it goes).
User avatar
Xtyfe
Posts: 1490
Joined: Fri Dec 14, 2007 6:29 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support

Re: Trying to emulate the Inquisitor's grenade attack

Post by Xtyfe »

amv2k9 wrote:Somebody made a smart grenade firing enemy... can't remember the thread, but the mod was also packaged with a couple other minimods that included laser tripmines and a Half-Life-style rocket launcher (weapon emits a laser dot, fired rockets will follow the dot wherever it goes).
I'd be interested in this smart grenade thing as well if anyone remembers the thread
User avatar
SwordGrunt
Posts: 13
Joined: Thu Apr 05, 2012 7:36 pm

Re: Trying to emulate the Inquisitor's grenade attack

Post by SwordGrunt »

For the 'smart grenade' attack, couldn't it be done with A_JumpIfCloser and then creating several attack states using A_CustomMissile with a different angle and pitch?
User avatar
LilWhiteMouse
Posts: 2270
Joined: Tue Jul 15, 2003 7:00 pm
Location: Maine, US
Contact:

Re: Trying to emulate the Inquisitor's grenade attack

Post by LilWhiteMouse »

It's not that simple because of height differences. The pitch needs to be altered according to the target's relative height to the shooter, not just the range.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Trying to emulate the Inquisitor's grenade attack

Post by NeuralStunner »

LilWhiteMouse wrote:The pitch needs to be altered according to the target's relative height to the shooter, not just the range.
You rang? ;)
User avatar
LilWhiteMouse
Posts: 2270
Joined: Tue Jul 15, 2003 7:00 pm
Location: Maine, US
Contact:

Re: Trying to emulate the Inquisitor's grenade attack

Post by LilWhiteMouse »

How does this help?
Locked

Return to “Editing (Archive)”