Extention to A_SkullAttack
Moderator: GZDoom Developers
Extention to A_SkullAttack
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
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.
- 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
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?)
Needs a NORANDOM.Ghastly_dragon wrote:the only flag I can think of at the moment is allow-pain

- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Extention to A_SkullAttack
Needs no randomness in the passed damage value. 

Re: Extention to A_SkullAttack
Can't damage be defined already, like it was a projectile?
- 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
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?
Also, how about a flag that makes it so that the monster's momentum can't be cancled out, outside of running into something?
- 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
What about using parentheses as for projectiles? I.E.XutaWoo wrote:Yes, but that sucks up the damage property and is always randomized.
Code: Select all
Damage (20)
Re: Extention to A_SkullAttack
It's also logical to add a flag for invulnerability, since Heretic's Minotaurs have that, I would think.
Re: Extention to A_SkullAttack
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.
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.
Re: Extention to A_SkullAttack
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?
Quick semi-related question: what affect does A_SkullAttack have on a player when called?
- Caligari87
- Admin
- Posts: 6236
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Extention to A_SkullAttack
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.


- 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
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.Snarboo wrote:It would make for more interesting behavior for rushing monsters.

Re: Extention to A_SkullAttack
You don't, I don't think. I've used A_SkullAttack and ThrustThingZ to get leaping monsters, and they're affected by gravity.NeuralStunner wrote:This way you wouldn't get randomly flying Demons, for instance.
- 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
Horrid luck on my part then, I tried it and they flew. 

Re: Extention to A_SkullAttack
Well, they will leave the ground, if their target is higher than they are, but they're still gravity-affected.
Re: Extention to A_SkullAttack
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).