Trying to emulate the Inquisitor's grenade attack

Discuss all aspects of editing for ZDoom.
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Trying to emulate the Inquisitor's grenade attack

Postby Enjay » Mon Apr 02, 2012 10:33 pm

When the Inquisitor robot attacks it will either fire its gun or launch two Classes:InquisitorShots using the A_InquisitorAttack 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
Enjay
The Force is strong with this one.
 
Joined: 15 Jul 2003
Location: Scotland

Re: Trying to emulate the Inquisitor's grenade attack

Postby NeuralStunner » Tue Apr 03, 2012 3:19 pm

There should be everything you need, including height, in A_FireCustomMissile.
User avatar
NeuralStunner
O'Neill with it.
 
Joined: 21 Jul 2009
Location: The Colonies

Re: Trying to emulate the Inquisitor's grenade attack

Postby Gez » Tue Apr 03, 2012 3:22 pm

That's a weapon attack function. Monsters should use A_CustomMissile.
Gez
 
Joined: 06 Jul 2007

Re: Trying to emulate the Inquisitor's grenade attack

Postby NeuralStunner » Tue Apr 03, 2012 4:28 pm

Whoops, right. Been working on weapons lately so that would be poor reflex. :P
User avatar
NeuralStunner
O'Neill with it.
 
Joined: 21 Jul 2009
Location: The Colonies

Re: Trying to emulate the Inquisitor's grenade attack

Postby LilWhiteMouse » Tue Apr 03, 2012 5:06 pm

@NeuralStunner: So how do we go about making A_CustomMissile() determine the necessary arc in order to hit the player?
User avatar
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 15 Jul 2003
Location: Maine, US

Re: Trying to emulate the Inquisitor's grenade attack

Postby NeuralStunner » Tue Apr 03, 2012 5:25 pm

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
NeuralStunner
O'Neill with it.
 
Joined: 21 Jul 2009
Location: The Colonies

Re: Trying to emulate the Inquisitor's grenade attack

Postby Enjay » Tue Apr 03, 2012 11:51 pm

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
Enjay
The Force is strong with this one.
 
Joined: 15 Jul 2003
Location: Scotland

Re: Trying to emulate the Inquisitor's grenade attack

Postby LilWhiteMouse » Wed Apr 04, 2012 12:09 am

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
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 15 Jul 2003
Location: Maine, US

Re: Trying to emulate the Inquisitor's grenade attack

Postby Enjay » Wed Apr 04, 2012 9:33 pm

Xtyfe's bump of this thread:

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
Enjay
The Force is strong with this one.
 
Joined: 15 Jul 2003
Location: Scotland

Re: Trying to emulate the Inquisitor's grenade attack

Postby amv2k9 » Thu Apr 05, 2012 5:40 pm

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
amv2k9
Satanic Redux, Order & Chaos, Mutation, and Weapons of Rebellion Series Dev
 
Joined: 10 Jan 2010
Location: Southern California

Re: Trying to emulate the Inquisitor's grenade attack

Postby Xtyfe » Thu Apr 05, 2012 6:56 pm

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
Xtyfe
 
Joined: 14 Dec 2007
Location: Kitchener, Ontario

Re: Trying to emulate the Inquisitor's grenade attack

Postby SwordGrunt » Fri Apr 06, 2012 11:08 am

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
SwordGrunt
 
Joined: 05 Apr 2012

Re: Trying to emulate the Inquisitor's grenade attack

Postby LilWhiteMouse » Fri Apr 06, 2012 1:06 pm

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
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 15 Jul 2003
Location: Maine, US

Re: Trying to emulate the Inquisitor's grenade attack

Postby NeuralStunner » Sat Apr 07, 2012 2:03 pm

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
NeuralStunner
O'Neill with it.
 
Joined: 21 Jul 2009
Location: The Colonies

Re: Trying to emulate the Inquisitor's grenade attack

Postby LilWhiteMouse » Sat Apr 07, 2012 2:08 pm

How does this help?
User avatar
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 15 Jul 2003
Location: Maine, US

Next

Return to Editing

Who is online

Users browsing this forum: Bing [Bot], Google Feedfetcher and 1 guest