[solved] Maulotaur query

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
DooMAD
Posts: 44
Joined: Fri Dec 30, 2005 5:13 pm
Location: UK
Contact:

[solved] Maulotaur query

Post by DooMAD »

One of my projects at the moment is taking a bunch of sprites from Might & Magic 6, 7 and 8 to use as replacement Heretic monsters. I'm having some issues with the Minotaur class and the charge attack.

Cobbled together some frames where the Minotaur rakes at the ground with his hoof, so naturally I wanted to use those before the Minotaur charges forward:
http://www.teamhellspawn.com/minotaur.gif (excuse the rogue cyan pixels)

and then show the charging frame itself while it charges:
http://www.teamhellspawn.com/MINSA1.png

The charge sequence in Heretic is just a single frame with "A_MinotaurCharge", so I figured that adding my "raking" frames before that would work and that he wouldn't start SKULLFLY until "A_MinotaurCharge" was called. But I'm definitely wrong about that, because the Minotaur moves forward while the raking frames are playing and it looks like the Minotaur is trying to push himself forwards on an invisible skateboard. :?

Code: Select all

Charge:
    MINR A 3 
    MINR B 3
    MINR C 3
    MINR D 3
    MINR E 3 
    MINS A 3 A_MinotaurCharge
    Loop
So it looks like SKULLFLY function is actually called during A_MinotaurDecide? And if so, any suggestions on how to remedy this?


//EDIT: Took the lazy option and moved the frames into the "Missile:" state. Also added a second variety of charge attack to make it a little more unpredictable.
Last edited by DooMAD on Thu May 14, 2020 2:11 pm, edited 2 times in total.
User avatar
Enjay
 
 
Posts: 27060
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [DECORATE] Maulotaur query

Post by Enjay »

Without testing, something like this might work:

Code: Select all

Charge:
    MINR A 3
    MINR B 3
    MINR C 3
    MINR D 3
    MINR E 3
    //fallthrough
ChargeLoop:
    MINS A 3 A_MinotaurCharge
    Loop
User avatar
DooMAD
Posts: 44
Joined: Fri Dec 30, 2005 5:13 pm
Location: UK
Contact:

Re: [DECORATE] Maulotaur query

Post by DooMAD »

Enjay wrote:Without testing, something like this might work:

Code: Select all

Charge:
    MINR A 3
    MINR B 3
    MINR C 3
    MINR D 3
    MINR E 3
    //fallthrough
ChargeLoop:
    MINS A 3 A_MinotaurCharge
    Loop
It's definitely an improvement animation-wise. But the charge movement, or SKULLFLY, still starts before the raking animation finishes.
User avatar
Enjay
 
 
Posts: 27060
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [DECORATE] Maulotaur query

Post by Enjay »

You mean it doesn't get as far as displaying frame E (MINRE) ? or do you want it to do a few rakes before the charge?

If it's the former, I'm not sure why it would leap forward to a new state label. If it's the latter, you just need to repeat the frames as often as you want them to be seen.

BTW, they can be consolidated on to one line:

Code: Select all

MINR ABCDE 3
User avatar
DooMAD
Posts: 44
Joined: Fri Dec 30, 2005 5:13 pm
Location: UK
Contact:

Re: [DECORATE] Maulotaur query

Post by DooMAD »

Enjay wrote:You mean it doesn't get as far as displaying frame E (MINRE) ? or do you want it to do a few rakes before the charge?

If it's the former, I'm not sure why it would leap forward to a new state label. If it's the latter, you just need to repeat the frames as often as you want them to be seen.

BTW, they can be consolidated on to one line:

Code: Select all

MINR ABCDE 3
When playing, the Minotaur starts moving forward at MINR A, so you get the "invisible skateboard" look, which is very much unintended. A_MinotaurCharge mostly just spawns some puffs and does some other checks. The actual movement (SKULLFLY) seems to be called before the "Charge:" state even begins.

I'm starting to get the impression I'd have to put the "raking" frames in the "Missile:" state, before A_MinotaurDecide, because that's apparently where the movement comes from:

Code: Select all

Missile:
    <raking frames here>
    MNTR V 10 A_MinotaurDecide   
    MNTR Y 4 A_FaceTarget
    MNTR Z 9 A_MinotaurAtk2
    Goto See
But then the Minataur will do it before most of his attacks, which might also look odd.

Alternatively I need to get better at DECORATE and write my own MinotaurDecide function from scratch, heh.
User avatar
Enjay
 
 
Posts: 27060
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [DECORATE] Maulotaur query

Post by Enjay »

OK, something else that might be worth trying. Perhaps if you give the raking frames the [wiki]A_Stop[/wiki] pointer it might work. I'm not sure if that will interfere with the charge or not, but worth a go?
User avatar
DooMAD
Posts: 44
Joined: Fri Dec 30, 2005 5:13 pm
Location: UK
Contact:

Re: [DECORATE] Maulotaur query

Post by DooMAD »

I tried:

Code: Select all

  Charge:
    MINR ABCD 4 A_Stop
    MINR E 4 A_FaceTarget
    MINS A 2 A_SkullAttack
  ChargeLoop:
    MINS A 2 A_MinotaurCharge
    Loop
But yeah, it initiates a charge for a split-second and then immediately stops and goes back to the "Chase:" state.
User avatar
Enjay
 
 
Posts: 27060
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [DECORATE] Maulotaur query

Post by Enjay »

I wonder if you could use [wiki]A_ChangeFlag[/wiki] to take away the SKULLFLY flag and then give it back when the charge starts?

I know that wiki page says that the pointer is deprecated, but I don't *think* there is another way of doing that in DECORATE (someone please correct me if I'm wrong). I think direct access to flags is only a ZScript thing. Of course, you could convert the enemy to ZScript if you wanted. That would then give you access to more options anyway - including the ability to write your own version of A_MinotaurDecide that doesn't call A_SKULLFLY. You could probably move it into your own custom version of A_MinotaurCharge.

If you want to look at the zscript code for the Minotaur, it can be found in gzdoom.pk3\zscript\actors\raven\minotaur.zs but be aware that because it does have quite a few of its own specific functions, its zscript is quite a bit more complicated than that of a simple enemy.
User avatar
DooMAD
Posts: 44
Joined: Fri Dec 30, 2005 5:13 pm
Location: UK
Contact:

Re: [DECORATE] Maulotaur query

Post by DooMAD »

As it happens, I was just playing with A_ChangeFlag, heh. I definitely tried setting A_ChangeFlag("SKULLFLY", FALSE) and a few other variations with SETSPEED, STANDSTILL and DORMANT, but weirdly none of them seem to stop the charge in progress. It's also funny that my use of "MINS A 2 A_SkullAttack" in the above post made a second follow-up charge that was faster than the first charge, which certainly made it more challenging.

So far, the best results have come from putting "MINR ABCDE" in the "Missile:" state before A_MinotaurDecide. It's baffling, but it kinda works (although the limited playtesting I've done gives me the impression it might make the creature too easy to fight).

I'll keep screwing around with it to see if I can find a good balance. Cheers for your help. I'm probably too lazy to learn zscript just for the Minotaur, since this is the final monster in the pack and all the others are basically done, so I'll leave that as a last resort. :)

*shakes fist at Raven devs for logical incongruities when the "charge" pointer isn't the actual charge because that already happened*
Post Reply

Return to “Scripting”