Extention to A_SkullAttack

Moderator: GZDoom Developers

User avatar
Ghastly
... in rememberance ...
Posts: 6109
Joined: Fri Jul 06, 2007 2:34 pm

Extention to A_SkullAttack

Post by Ghastly »

A_SkullAttack[(int speed[, int damage[, str damagetype[, str state[, str attacksound[, int flags]]]]])]

Damage is damage-on-collision (randomized like the Lost Soul damage is, but allowing for custom formulae?), damagetype is obvious (defaults to whatever A_SkullAttack uses normally), state is the state it jumps to after it collides with something, and the only flag I can think of at the moment is allow-pain, allowing the calling monster to enter their pain state while charging (Lost souls, for example, can't enter their pain state until they stop).

Current ideas for flags:
-Allow pain
-No random damage
-Don't lose momentum when hit
-Don't adjust z momentum
-Charge-where-facing, not at target
Last edited by Ghastly on Sun Apr 15, 2012 7:49 pm, edited 6 times in total.
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: Extention to A_SkullAttack

Post by NeuralStunner »

I certainly like this! For any such function is good to add customization. :)
Ghastly_dragon wrote:Damage is damage-on-collision (randomized like the Lost Soul damage is, but allowing for custom formulae?)
Ghastly_dragon wrote:the only flag I can think of at the moment is allow-pain
Needs a NORANDOM. ;)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Extention to A_SkullAttack

Post by Graf Zahl »

Needs no randomness in the passed damage value. :P
User avatar
Ichor
Posts: 1784
Joined: Wed Jul 23, 2003 9:22 pm

Re: Extention to A_SkullAttack

Post by Ichor »

Can't damage be defined already, like it was a projectile?
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Re: Extention to A_SkullAttack

Post by XutaWoo »

Yes, but that sucks up the damage property and is always randomized.

Also, how about a flag that makes it so that the monster's momentum can't be cancled out, outside of running into something?
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: Extention to A_SkullAttack

Post by NeuralStunner »

XutaWoo wrote:Yes, but that sucks up the damage property and is always randomized.
What about using parentheses as for projectiles? I.E.

Code: Select all

Damage (20)
User avatar
Spleen
Posts: 497
Joined: Fri Nov 28, 2008 7:07 pm

Re: Extention to A_SkullAttack

Post by Spleen »

It's also logical to add a flag for invulnerability, since Heretic's Minotaurs have that, I would think.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Extention to A_SkullAttack

Post by Gez »

I think it'd be a better idea to use an actor flag for that, called INVUNLCHARGE. My reasoning is based on two points:
1. The MinotaurFriend would not need to have redefined states.
2. It'd be the same as in Eternity, and I like it when different ports propose a consistent implementation of the same feature.

Though you could as well have a flag in the function itself too if so you want.
User avatar
Snarboo
Posts: 2599
Joined: Tue Nov 29, 2005 4:37 am

Re: Extention to A_SkullAttack

Post by Snarboo »

I definitely approve of this. It would make for more interesting behavior for rushing monsters.

Quick semi-related question: what affect does A_SkullAttack have on a player when called?
User avatar
Caligari87
Admin
Posts: 6236
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: Extention to A_SkullAttack

Post by Caligari87 »

Depending on the output of A_JumpIfTargetInLOS, it usually forces the playerpawn to enter it's default "OhShit" state, which then decides whether to strafedodge or fire, depending on the selected weapon.

8-)
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: Extention to A_SkullAttack

Post by NeuralStunner »

Snarboo wrote:It would make for more interesting behavior for rushing monsters.
This gets me to thinking, perhaps it could also use a flag to retain gravity. This way you wouldn't get randomly flying Demons, for instance. :P
User avatar
Ghastly
... in rememberance ...
Posts: 6109
Joined: Fri Jul 06, 2007 2:34 pm

Re: Extention to A_SkullAttack

Post by Ghastly »

NeuralStunner wrote:This way you wouldn't get randomly flying Demons, for instance. :P
You don't, I don't think. I've used A_SkullAttack and ThrustThingZ to get leaping monsters, and they're affected by gravity.
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: Extention to A_SkullAttack

Post by NeuralStunner »

Horrid luck on my part then, I tried it and they flew. :?
User avatar
Ghastly
... in rememberance ...
Posts: 6109
Joined: Fri Jul 06, 2007 2:34 pm

Re: Extention to A_SkullAttack

Post by Ghastly »

Well, they will leave the ground, if their target is higher than they are, but they're still gravity-affected.
User avatar
Amuscaria
Posts: 6634
Joined: Mon Jul 26, 2004 12:59 pm
Location: Growing from mycelium near you.

Re: Extention to A_SkullAttack

Post by Amuscaria »

What about a flag that keeps the monster calling this action on the ground instead of flying up at monsters with a higher Z-pos? (unless there is already a way to do this).
Locked

Return to “Closed Feature Suggestions [GZDoom]”