Ok I now I don't deserve full credits on this one, but if you use this code I want you to credit, chris, insurrectionman (he helped me to understand the T_Bite sound system hehe) and me, Razi (or Just Karharis or Ritual )
Plus even if you think I'm wrong and you don't think I deserve any credits at all I think I still deserve those credits for Putting this code for you guys that maybe want to make this happen. Anyway, 'nuff said.. Let's code!
First off, Open WL_ACT2.C
Now do a search for
After that go a down a bit and right exactly below that part we've just changed you will see these lines:
to T_DogChase.
Now do a search for:
Okay, do a search for:
Now just change the Guards pistol sound with a swing of a sword sound or whatever you want.. Now the guard is attacking from close range and he doesn't bark! and like my old fella Fat Bastard used to say. ain't that magical?
Just don't forget to credit the people I mentioned above including me :muwaha: and there you have it! a guard that attack you from a close range. Hope you understood this rough tutorial because it's my first one So if you got questions about it or whatever please do (NOT) ask me..
EDIT1: if you want the guard to attack harder like he's shooting you (but only from close range you should leave the first line where we changed the T_Shoot to T_Bite intact. And to make the guard to take less damage with each attack: Apply this quick tutorial by BrotherTank http://diehardwolfers.areyep.com/viewtopic.php?t=1606
Hope this helps...
-Razi
Plus even if you think I'm wrong and you don't think I deserve any credits at all I think I still deserve those credits for Putting this code for you guys that maybe want to make this happen. Anyway, 'nuff said.. Let's code!
First off, Open WL_ACT2.C
Now do a search for
- Code:
statetype s_grdshoot2 = {false,SPR_GRD_SHOOT2,20,NULL,T_Shoot,&s_grdshoot3};
- Code:
statetype s_grdshoot2 = {false,SPR_GRD_SHOOT2,20,NULL,T_Bite,&s_grdshoot3};
After that go a down a bit and right exactly below that part we've just changed you will see these lines:
- Code:
statetype s_grdchase1 = {true,SPR_GRD_W1_1,10,T_Chase,NULL,&s_grdchase1s};
statetype s_grdchase1s = {true,SPR_GRD_W1_1,3,NULL,NULL,&s_grdchase2};
to T_DogChase.
Now do a search for:
- Code:
check for byte range
- Code:
NewState (ob,&s_dogjump1);
return;
- Code:
if (ob->obclass == guardobj)
NewState (ob,&s_grdshoot1);
else
NewState (ob,&s_dogjump1);
return;
Okay, do a search for:
- Code:
PlaySoundLocActor(DOGATTACKSND,ob);
- Code:
switch (ob->obclass)
{
case dogobj:
PlaySoundLocActor(DOGATTACKSND,ob); // JAB
break;
case guardobj: // replace guardobj with guard that uses knife sound
PlaySoundLocActor(NAZIFIRESND,ob); // or whatever u used for the sound
break;
}
Now just change the Guards pistol sound with a swing of a sword sound or whatever you want.. Now the guard is attacking from close range and he doesn't bark! and like my old fella Fat Bastard used to say. ain't that magical?
Just don't forget to credit the people I mentioned above including me :muwaha: and there you have it! a guard that attack you from a close range. Hope you understood this rough tutorial because it's my first one So if you got questions about it or whatever please do (NOT) ask me..
EDIT1: if you want the guard to attack harder like he's shooting you (but only from close range you should leave the first line where we changed the T_Shoot to T_Bite intact. And to make the guard to take less damage with each attack: Apply this quick tutorial by BrotherTank http://diehardwolfers.areyep.com/viewtopic.php?t=1606
Hope this helps...
-Razi