UE3 - General problema animaciones MELEE ATTACK ENEMY

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.
Hola gente, hacia mil años que no pasaba por aqui, pero llevo unos dias buscando una solución y me tope con vosotros otra vez...

a partir de ahora me pasaré por aqui mas a menudo que tambien he retomado el tema del UDK! pero ya que estoy os pido tambien ayuda!

TENGO DOS PROBLEMAS:

1-tengo un problema con las animaciones de ataque, tanto del player, como del enemy_pawn
vereis, os dejo unas imagenes y el codigo a ver si me ayudais a saber donde leches tengo que poner la instruccion que sea para que haga la animacion "attack1" que tengo en el animset guardada!?

[screenshot]http://4.bp.blogspot.com/-RGpqs50TdHQ/T9KGA8rEQ4I/AAAAAAAAByA/bnsfrmpfJoA/s1600/help1.jpg[/screenshot]
[screenshot]http://2.bp.blogspot.com/-GaGrZGF1ku0/T9KGUVnbwxI/AAAAAAAAByU/y93anR8eoac/s1600/help3.JPG[/screenshot]
[screenshot]http://1.bp.blogspot.com/-P-gR0GRASq8/T9KGQuYmjZI/AAAAAAAAByM/OoSqhXervIg/s1600/help2.jpg[/screenshot]

os dejo el codigo del PAWN zombie
(el cual ataca, persigue, esta bien animado anando y parado, pero no se donde colocar la animacion ataque, por lo que no se mueve cuando ataca?)


Code:
class Zombie1Pawn extends UTPawn
Placeable;


var Pawn P;
var() int DamageAmount;


simulated function PostBeginPlay()
{
super.PostBeginPlay();
//wake the physics up
SetPhysics(PHYS_Falling);
}


//over-ride epics silly character stuff
simulated function SetCharacterClassFromInfo(class Info)
{
Return;
}


simulated event Bump( Actor Other, PrimitiveComponent OtherComp, Vector HitNormal )


{
`Log("Bump");
Super.Bump( Other, OtherComp, HitNormal );
if ( (Other == None)
Other.bStatic )
return;


P = Pawn(Other); //the pawn we might have bumped into


if ( P != None) //if we hit a pawn
{


if (Zombie1Pawn(Other) != None)
{
Return;
}


else
{
SetTimer(0.1, false, 'EatSlow');
}
}


}






simulated function EatSlow()
{


P.Health -= DamageAmount;
PlaySound(SoundCue'Survival_SoundsMonsters.Atack.A ttack_ramdom');
//PlayCustomAnim('Atack1', 1.0, 0.2, 0.2, false, true); //Play attack animation is all right???


if (P.Health <= 0)
{
P.Destroy(); //kill it
}


}






defaultproperties
{


Begin Object Name=WPawnSkeletalMeshComponent


Scale=0.075
SkeletalMesh=SkeletalMesh'Survival_player.Meshes.z ombie1_SkeletalMesh'
PhysicsAsset=PhysicsAsset'Survival_player.Meshes.z ombie1_Physics'
AnimSets(0)=AnimSet'Survival_player.Meshes.zombie2 __AnimSet'
AnimtreeTemplate=AnimTree'Survival_player.Meshes.Z ombie1_AnimTree'


End Object


RagdollLifespan=180.0
JumpZ=0
AirSpeed=200
GroundSpeed=6


ControllerClass=class'Zombie1Bot'


bDontPossess=false


DamageAmount=100


y este, el controlerAI del enemigo:




Code:
class Zombie1Bot extends GameAIController;
var Pawn thePlayer;


simulated event PostBeginPlay()
{
super.PostBeginPlay();
}


event SeePlayer(Pawn SeenPlayer)
{
if (thePlayer ==none)
{
thePlayer = SeenPlayer;
GoToState('Follow');
}
}


state Follow
{
Begin:
if (thePlayer != None)
{
MoveTo(thePlayer.Location);
GoToState('Looking');
}
}


state Looking
{
Begin:
if (thePlayer != None)
{
MoveTo(thePlayer.Location);
GoToState('Follow');
}
}
defaultproperties


{
}


DONDE TENGO QUE METER LA ANIMACION ATACK1 (el ataque del emigo cuerpo a cuerpo) ?

esta todo ok, el pawn sigue al player, y cuando se tocan, el player pierde vida y el pawn emite sonido de ataque. Si el pawn ataca varias veces al player, el player terminara muerto. Game Over.


Pues bien, solo me queda meter la animacion ataque... pero donde? como es la sentencia en el script? a que tengo que llamar, algun tutorial, he buscado muchisimo y ninguna solucion me va bien...


Y EL SEGUNDO PROBLEMA: (mas sencillo creo yo, pero q me esta matando tambien)
el enemigo va bien, como decia (sólo la animacion de ataque es el problema 1)
pero el enemigo, al alcanzar la posiscion del player, pasa a la animacion de IDL (waiting), pero se hunde un poco en el suelo!!

tb creo q esta todo bien, las animaciones estan encuadradas y tal, no hay fallo ahí, de hecho, si el enemigo no comienza la partida anadando (si no que no ve al player) esta en posicion waiting OK... ?¿

alguna idea sobre esto ultimo?

bueno, lo dicho, que me pasaré mas amenudo! sobretodo a ver si me echais un cable!

un saludo!
 
Last edited by a moderator: