State see A_Chase with iqm model

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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
solvictusig
Posts: 5
Joined: Sun Oct 22, 2023 8:13 am
Preferred Pronouns: He/Him
Operating System Version (Optional): etc
Graphics Processor: Not Listed

State see A_Chase with iqm model

Post by solvictusig »

Made iqm animations in one file following the guide(Decoupled animations with IQM models: how to) and everything exported fine, but now the question has come up. All animations are displayed normally, but when I want to move the model using A_Chase model starts strange move - It loops a few frames of “walking” and the model starts to loop through just 2 frames(very quickly) and moves behind the player
class testus: actor
{
default
{
Health 500;
Radius 20;
Height 64;
Mass 600;
Speed 2;
PainChance 128;
Monster;
+FLOORCLIP
+BOSSDEATH
+DECOUPLEDANIMATIONS
+NOPAIN
}

States
{
Spawn:
M000 A -1 NoDelay A_SetAnimation('idle', flags:SAF_LOOP);
Loop;
See:
M000 A 1 A_Chase();
M000 A 1 NoDelay SetAnimation('walking', flags:SAF_LOOP);
loop;
}
}

gif for example:
Image
solvictusig
Posts: 5
Joined: Sun Oct 22, 2023 8:13 am
Preferred Pronouns: He/Him
Operating System Version (Optional): etc
Graphics Processor: Not Listed

Re: State see A_Chase with iqm model

Post by solvictusig »

Resolved thx user Jay
1. Add AngleOffset 90 (Use add it before baseframe) in MODELDEF:

Model testus
{
Path "models"
Model 0 "lol.iqm"
Skin 0 A_towering_Lizard_Kin_0927220214_refine.png
Scale 2991 2991 2991
AngleOffset 90
BaseFrame
}

2. Use flags:SAF_LOOP|SAF_NOOVERRIDE:
....
States
{
Spawn:
M000 A 1 NoDelay A_SetAnimation('idle', flags:SAF_LOOP|SAF_NOOVERRIDE);
Loop;
See:
M000 A 0 A_Chase();
M000 A 1 NoDelay SetAnimation('walking', flags:SAF_LOOP|SAF_NOOVERRIDE);
loop;
}
}
...
Post Reply

Return to “Scripting”