First of all: I wish you all a Happy and healthy new year.
I always asked myself, why ID1 did not use all 3 magic attack animations for the Hellknight.
The animations look very nice and are available/present in the model.
It is a pity that only "hknight_magiccXX" is used.
So I searched for a way to make use of all of them (randomly).
I know, my QC skills are not good, so I am sure there are other ways to do it.
If this topic has already been discussed before, I am sorry for disturbing.
1.) Open "hknight.qc"
Search for "monster_hell_knight ()" function (at the bottom) of the file.
Replace the line
Code: Select all
self.th_missile = hknight_magicc1;
Code: Select all
self.th_missile = hknight_random_magic; // adds random magic attack animation
// self.th_missile = hknight_magicc1;
Code: Select all
void() hknight_random_magic = // adds random magic attack animation
{ // in original ID1, only "hknight_magiccxx" is used
local float zufall;
zufall = random();
if (zufall > 0.66)
self.th_missile = hknight_magica1;
else if (zufall < 0.34)
self.th_missile = hknight_magicb1;
else
self.th_missile = hknight_magicc1;
};
Code: Select all
void() hknight_random_magic;
At the end of each magic attack animation sequence, we need to call "hknight_random_magic ()" again.
So add the call after all 3 magic atack animations:
Code: Select all
...
void() hknight_magica14 =[ $magica14, hknight_run1 ] {ai_face();
hknight_random_magic();};
Code: Select all
...
void() hknight_magicb13 =[ $magicb13, hknight_run1] {ai_face();
hknight_random_magic();};
Code: Select all
...
void() hknight_magicc11 =[ $magicc11, hknight_run1] {hknight_shot(3);
hknight_random_magic();};
Now each individual hknight in a map will use random magic-attack-animation, until he is dead.
Sorry again, if this is an old topic.
=====================================
Small addon:
If you use DarkPlaces and want to make the hellknight visually charging its magic attack,
you can make use of the dpextensions feature: DP_ENT_COLORMOD
Just an example for 1st magic attack:
Code: Select all
void() hknight_magicb1 =[ $magicb1, hknight_magicb2 ] {ai_face();
self.colormod = '1.5 1 1';};
void() hknight_magicb2 =[ $magicb2, hknight_magicb3 ] {ai_face();
self.colormod = '2 1 1';};
void() hknight_magicb3 =[ $magicb3, hknight_magicb4 ] {ai_face();
self.colormod = '2.5 1 1';};
void() hknight_magicb4 =[ $magicb4, hknight_magicb5 ] {ai_face();
self.colormod = '3 1 1';};
void() hknight_magicb5 =[ $magicb5, hknight_magicb6 ] {ai_face();
self.colormod = '3.5 1 1';};
void() hknight_magicb6 =[ $magicb6, hknight_magicb7 ] {ai_face();
self.colormod = '4 1 1';};
void() hknight_magicb7 =[ $magicb7, hknight_magicb8 ] {hknight_shot(-2);};
void() hknight_magicb8 =[ $magicb8, hknight_magicb9 ] {hknight_shot(-1);};
void() hknight_magicb9 =[ $magicb9, hknight_magicb10] {hknight_shot(0);};
void() hknight_magicb10 =[ $magicb10, hknight_magicb11] {hknight_shot(1);};
void() hknight_magicb11 =[ $magicb11, hknight_magicb12] {hknight_shot(2);};
void() hknight_magicb12 =[ $magicb12, hknight_magicb13] {hknight_shot(3);
self.colormod = '2 1 1';};
void() hknight_magicb13 =[ $magicb13, hknight_run1] {ai_face();
self.colormod = '1 1 1';
hknight_random_magic();};
This will make his body slowly rise glowing red, before he shoots his missiles and turn normal again after his attack.
It looks really nice in-game.
Best wishes,
Seven