Imp ranged & melee attack animation bug [Resolved]
We (the Doom Ascension Team http://www.doomascension.com) have been concentrating so much on newer things that I don't know how long we've had this bug. Previously our imp had one animation for its ranged attack and another for its melee attack. A little while back I was getting smacked by the imp and noticed that the ranged animation was being used for the melee state when it should be using the melee animation.
Last known version that had both animations working:
Doomsday 1.8.6
Known versions that have this bug:
Doomsday 1.9.8
Doomsday 1.9.9(Unstable)
Not sure if its related but I have noticed that back when the melee animation worked there was a similar quirk where the imp would begin his ranged attack but if I came within melee range the ranged attack animation would continue but the imp would just do a melee scratching sound and there would be no fireball. I doubt they are related but I understand these things so little that I thought I'd mention it.
I have attached the code we are using in the .ded file for the imp.
Last known version that had both animations working:
Doomsday 1.8.6
Known versions that have this bug:
Doomsday 1.9.8
Doomsday 1.9.9(Unstable)
Not sure if its related but I have noticed that back when the melee animation worked there was a similar quirk where the imp would begin his ranged attack but if I came within melee range the ranged attack animation would continue but the imp would just do a melee scratching sound and there would be no fireball. I doubt they are related but I understand these things so little that I thought I'd mention it.
I have attached the code we are using in the .ded file for the imp.
Header { Version = 6 }
#------------------------------------------------
#---------------------(Imp)----------------------
#------------------------------------------------
#---------------------(Idle)---------------------
State {
ID = "TROO_STND";
Sprite = "TROO";
Frame = 0;
Tics = 10;
Action = "A_Look";
Next state = "TROO_IDLE2";
}
State {
ID = "TROO_IDLE2";
Sprite = "TROO";
Frame = 1;
Tics = 10;
Action = "A_Look";
Next state = "TROO_IDLE3";
}
State {
ID = "TROO_IDLE3";
Sprite = "TROO";
Frame = 1;
Tics = 10;
Action = "A_Look";
Next state = "TROO_IDLE4";
}
State {
ID = "TROO_IDLE4";
Sprite = "TROO";
Frame = 1;
Tics = 10;
Action = "A_Look";
Next state = "TROO_STND";
}
Model {
Scale XYZ { 10.8 8.8 10.8 }
State = "TROO_STND"
Inter = 0.0
sub{
file = "m_imp_idle"
Skin = 0
Frame = "frame1"
}
}
Copy Model { State = "TROO_STND" Inter = 0.6 sub { Frame = "frame2" } }
Copy Model { State = "TROO_IDLE2" Inter = 0.0 sub { Frame = "frame3" } }
Copy Model { State = "TROO_IDLE2" Inter = 0.4 sub { Frame = "frame4" } }
Copy Model { State = "TROO_IDLE3" Inter = 0.0 sub { Frame = "frame5" } }
Copy Model { State = "TROO_IDLE3" Inter = 0.6 sub { Frame = "frame6" } }
Copy Model { State = "TROO_IDLE4" Inter = 0.0 sub { Frame = "frame7" } }
Copy Model { State = "TROO_IDLE4" Inter = 0.4 sub { Frame = "frame8" } }
#---------------------(Walk)---------------------
Model {
Scale XYZ { 10.8 8.8 10.8 }
State = "TROO_RUN1"
Inter = 0.0
sub{
file = "m_imp_walk"
Skin = 0
Frame = "frame1"
}
}
Copy Model { State = "TROO_RUN2" Inter = 0.0 sub { Frame = "frame2" } }
Copy Model { State = "TROO_RUN3" Inter = 0.0 sub { Frame = "frame3" } }
Copy Model { State = "TROO_RUN4" Inter = 0.0 sub { Frame = "frame4" } }
Copy Model { State = "TROO_RUN5" Inter = 0.0 sub { Frame = "frame5" } }
Copy Model { State = "TROO_RUN6" Inter = 0.0 sub { Frame = "frame6" } }
Copy Model { State = "TROO_RUN7" Inter = 0.0 sub { Frame = "frame7" } }
Copy Model { State = "TROO_RUN8" Inter = 0.0 sub { Frame = "frame8" } }
#---------------------(Attack-Ranged)---------------------
Model {
Scale XYZ { 10.8 8.8 10.8 }
State = "TROO_ATK1"
Inter = 0.0
sub{
file = "m_imp_attack"
Skin = 0
Frame = "frame1"
}
}
Copy Model { State = "TROO_ATK1" Inter = 0.3 sub { Frame = "frame2" } }
Copy Model { State = "TROO_ATK1" Inter = 0.6 sub { Frame = "frame3" } }
Copy Model { State = "TROO_ATK1" Inter = 0.0 sub { Frame = "frame4" } }
Copy Model { State = "TROO_ATK2" Inter = 0.3 sub { Frame = "frame5" } }
Copy Model { State = "TROO_ATK2" Inter = 0.6 sub { Frame = "frame6" } }
Copy Model { State = "TROO_ATK2" Inter = 0.0 sub { Frame = "frame7" } }
Copy Model { State = "TROO_ATK2" Inter = 0.3 sub { Frame = "frame8" } }
Copy Model { State = "TROO_ATK3" Inter = 0.6 sub { Frame = "frame9" } }
Copy Model { State = "TROO_ATK3" Inter = 0.0 sub { Frame = "Frame10" } }
Copy Model { State = "TROO_ATK3" Inter = 0.3 sub { Frame = "Frame11" } }
#---------------------(Attack-Melee)---------------------
State {
ID = "TROO_MEL1";
Sprite = "TROO";
Frame = 4;
Tics = 8;
Action = "A_FaceTarget";
Next state = "TROO_MEL2";
}
State {
ID = "TROO_MEL2";
Sprite = "TROO";
Frame = 5;
Tics = 8;
Action = "A_FaceTarget";
Next state = "TROO_MEL3";
}
State {
ID = "TROO_MEL3";
Sprite = "TROO";
Frame = 6;
Tics = 6;
Action = "A_TroopAttack";
Next state = "TROO_RUN1";
}
Model {
Scale XYZ { 10.8 8.8 10.8 }
State = "TROO_MEL1"
Inter = 0.0
sub{
file = "m_imp_melee"
Skin = 0
Frame = "frame1"
}
}
Copy Model { State = "TROO_MEL1" Inter = 0.2 sub { Frame = "frame2" } }
Copy Model { State = "TROO_MEL1" Inter = 0.4 sub { Frame = "frame3" } }
Copy Model { State = "TROO_MEL1" Inter = 0.8 sub { Frame = "frame4" } }
Copy Model { State = "TROO_MEL2" Inter = 0.0 sub { Frame = "frame5" } }
Copy Model { State = "TROO_MEL2" Inter = 0.2 sub { Frame = "frame6" } }
Copy Model { State = "TROO_MEL2" Inter = 0.4 sub { Frame = "frame7" } }
Copy Model { State = "TROO_MEL2" Inter = 0.8 sub { Frame = "frame8" } }
Copy Model { State = "TROO_MEL3" Inter = 0.0 sub { Frame = "frame9" } }
Copy Model { State = "TROO_MEL3" Inter = 0.2 sub { Frame = "Frame10" } }
Copy Model { State = "TROO_MEL3" Inter = 0.4 sub { Frame = "Frame11" } }
Copy Model { State = "TROO_MEL3" Inter = 0.8 sub { Frame = "frame1" } }
#---------------------(Pain)---------------------
State {
ID = "TROO_PAIN";
Sprite = "TROO";
Frame = 7;
Tics = 1;
Next state = "TROO_NPAIN2";
}
State {
ID = "TROO_NPAIN2";
Sprite = "TROO";
Frame = 7;
Tics = 1;
Next state = "TROO_NPAIN3";
}
State {
ID = "TROO_NPAIN3";
Sprite = "TROO";
Frame = 7;
Tics = 1;
Action = "A_Pain";
Next state = "TROO_NPAIN4";
}
State {
ID = "TROO_NPAIN4";
Sprite = "TROO";
Frame = 7;
Tics = 1;
Next state = "TROO_NPAIN5";
}
State {
ID = "TROO_NPAIN5";
Sprite = "TROO";
Frame = 7;
Tics = 1;
Next state = "TROO_RUN1";
}
Model {
Scale XYZ { 10.8 8.8 10.8 }
State = "TROO_PAIN"
Inter = 0.0
sub{
file = "m_imp_pain"
Skin = 0
Frame = "frame1"
}
}
Copy Model { State = "TROO_NPAIN2" Inter = 0.0 sub { Frame = "frame2" } }
Copy Model { State = "TROO_NPAIN3" Inter = 0.0 sub { Frame = "frame3" } }
Copy Model { State = "TROO_NPAIN4" Inter = 0.0 sub { Frame = "frame4" } }
Copy Model { State = "TROO_NPAIN5" Inter = 0.0 sub { Frame = "frame5" } }
#---------------------(Death)---------------------
State {
ID = "TROO_DIE1";
Sprite = "TROO";
Frame = 8;
Tics = 2;
Next state = "TROO_ND01";
}
State {
ID = "TROO_ND01";
Sprite = "TROO";
Frame = 8;
Tics = 2;
Next state = "TROO_ND02";
}
State {
ID = "TROO_ND02";
Sprite = "TROO";
Frame = 8;
Tics = 2;
Next state = "TROO_ND03";
}
State {
ID = "TROO_ND03";
Sprite = "TROO";
Frame = 8;
Tics = 2;
Action = "A_Scream";
Next state = "TROO_ND04";
}
State {
ID = "TROO_ND04";
Sprite = "TROO";
Frame = 9;
Tics = 2;
Next state = "TROO_ND05";
}
State {
ID = "TROO_ND05";
Sprite = "TROO";
Frame = 9;
Tics = 2;
Next state = "TROO_ND06";
}
State {
ID = "TROO_ND06";
Sprite = "TROO";
Frame = 9;
Tics = 2;
Next state = "TROO_ND07";
}
State {
ID = "TROO_ND07";
Sprite = "TROO";
Frame = 9;
Tics = 2;
Next state = "TROO_ND08";
}
State {
ID = "TROO_ND08";
Sprite = "TROO";
Frame = 9;
Tics = 2;
Next state = "TROO_ND09";
}
State {
ID = "TROO_ND09";
Sprite = "TROO";
Frame = 10;
Tics = 2;
Next state = "TROO_ND10";
}
State {
ID = "TROO_ND10";
Sprite = "TROO";
Frame = 10;
Tics = 2;
Action = "A_Fall";
Next state = "TROO_ND11";
}
State {
ID = "TROO_ND11";
Sprite = "TROO";
Frame = 10;
Tics = 2;
Next state = "TROO_ND12";
}
State {
ID = "TROO_ND12";
Sprite = "TROO";
Frame = 10;
Tics = 2;
Next state = "TROO_ND13";
}
State {
ID = "TROO_ND13";
Sprite = "TROO";
Frame = 10;
Tics = 2;
Next state = "TROO_ND14";
}
State {
ID = "TROO_ND14";
Sprite = "TROO";
Frame = 11;
Tics = 2;
Next state = "TROO_ND15";
}
State {
ID = "TROO_ND15";
Sprite = "TROO";
Frame = 11;
Tics = 2;
Next state = "TROO_ND16";
}
State {
ID = "TROO_ND16";
Sprite = "TROO";
Frame = 11;
Tics = 2;
Next state = "TROO_ND17";
}
State {
ID = "TROO_ND17";
Sprite = "TROO";
Frame = 11;
Tics = 2;
Next state = "TROO_ND18";
}
State {
ID = "TROO_ND18";
Sprite = "TROO";
Frame = 11;
Tics = 2;
Next state = "TROO_ND19";
}
State {
ID = "TROO_ND19";
Sprite = "TROO";
Frame = 12;
Tics = 2;
Next state = "TROO_ND20";
}
State {
ID = "TROO_ND20";
Sprite = "TROO";
Frame = 12;
Tics = 4;
Next state = "TROO_ND21";
}
State {
ID = "TROO_ND21";
Sprite = "TROO";
Frame = 12;
Tics = -1;
Next state = "NULL";
}
Model {
Scale XYZ { 10.8 8.8 10.8 }
State = "TROO_DIE1"
Inter = 0.0
sub{
file = "m_imp_death"
Skin = 0
Frame = "frame1"
}
}
Copy Model {
State = "TROO_ND01"
sub{
Frame = "frame2"
}
}
Copy Model {
State = "TROO_ND02"
sub{
Frame = "frame3"
}
}
Copy Model {
State = "TROO_ND03"
sub{
Frame = "frame4"
}
}
Copy Model {
State = "TROO_ND04"
sub{
Frame = "frame5"
}
}
Copy Model {
State = "TROO_ND05"
sub{
Frame = "frame6"
}
}
Copy Model {
State = "TROO_ND06"
sub{
Frame = "frame7"
}
}
Copy Model {
State = "TROO_ND07"
sub{
Frame = "frame8"
}
}
Copy Model {
State = "TROO_ND08"
sub{
Frame = "frame9"
}
}
Copy Model {
State = "TROO_ND09"
sub{
Frame = "Frame10"
}
}
Copy Model {
State = "TROO_ND10"
sub{
Frame = "Frame11"
}
}
Copy Model {
State = "TROO_ND11"
sub{
Frame = "Frame12"
}
}
Copy Model {
State = "TROO_ND12"
sub{
Frame = "Frame13"
}
}
Copy Model {
State = "TROO_ND13"
sub{
Frame = "Frame14"
}
}
Copy Model {
State = "TROO_ND14"
sub{
Frame = "Frame15"
}
}
Copy Model {
State = "TROO_ND15"
sub{
Frame = "Frame16"
}
}
Copy Model {
State = "TROO_ND16"
sub{
Frame = "Frame17"
}
}
Copy Model {
State = "TROO_ND17"
sub{
Frame = "Frame18"
}
}
Copy Model {
State = "TROO_ND18"
sub{
Frame = "Frame19"
}
}
Copy Model {
State = "TROO_ND19"
sub{
Frame = "Frame20"
}
}
Copy Model {
State = "TROO_ND20"
sub{
Frame = "Frame21"
}
}
Copy Model {
State = "TROO_ND21"
sub{
Frame = "Frame22"
}
}
Comments
The next step will be to test run your definitions. I'll look into that a bit later (I'm presently working on a urgent bug fix for the imminent Doomsday 1.9.9 release).
I realized that the missile state (TROO_ATK1) was working fine but the Melee state (TROO_MEL1) was grabbing the animation from the missile state.
All I did to fix this was add the Thing properties of the Imp to the DED so that it knew to look for TROO_MEL1 for the melee instead of TROO_ATK1.
The code bellow is what I added.