It is currently Tue Oct 23, 2018 9:08 pm




Post new topic Reply to topic  [ 3 posts ] 
HEEEEEEELP 
Author Message
UNATCO
User avatar

Joined: Fri Oct 28, 2016 12:54 pm
Posts: 214
Post HEEEEEEELP
Okay, I have compiled a few animation calls, I want the pawn to stand still while having the shoot animation, I want the pawn to freeze and not play all the 6 shooting frames instead loop the first one, the pawn should completely freeze, and the gun should automatically fire in his hand, here is the code, if anyone wishes to help me :smile:

Code:
// ----------------------------------------------------------------------
// PlayRunningAndFiring()
// ----------------------------------------------------------------------

function PlayRunningAndFiring()
{
   local DeusExWeapon W;
   local vector       v1, v2;
   local float        dotp;

   bIsWalking = FALSE;

   W = DeusExWeapon(Weapon);

   if (W != None)
   {
      if (Region.Zone.bWaterZone)
      {
         if (W.bHandToHand)
            LoopAnimPivot('Tread',,0.1,,GetSwimPivot());
         else
            LoopAnimPivot('TreadShoot',,0.1,,GetSwimPivot());
      }
      else
      {
         if (W.bHandToHand)
            LoopAnimPivot('Run',runAnimMult,0.1);
         else
         {
            v1 = Normal((Enemy.Location - Location)*vect(1,1,0));
            if (destPoint != None)
               v2 = Normal((destPoint.Location - Location)*vect(1,1,0));
            else
               v2 = Normal((destLoc - Location)*vect(1,1,0));
            dotp = Abs(v1 dot v2);
            if (dotp < 0.70710678)  // running sideways
            {
               if (HasTwoHandedWeapon())
                  LoopAnimPivot('Strafe2H',runAnimMult,0.1);
               else
                  LoopAnimPivot('Strafe',runAnimMult,0.1);
            }
            else
            {
               if (HasTwoHandedWeapon())
                  LoopAnimPivot('RunShoot2H',runAnimMult,0.1);
               else
                  LoopAnimPivot('RunShoot',runAnimMult,0.1);
            }
         }
      }
   }
}


// ----------------------------------------------------------------------
// TweenToShoot()
// ----------------------------------------------------------------------

function TweenToShoot(float tweentime)
{
   if (Region.Zone.bWaterZone)
      TweenAnimPivot('TreadShoot', tweentime, GetSwimPivot());
   else if (!bCrouching)
   {
      if (!IsWeaponReloading())
      {
         if (HasTwoHandedWeapon())
            TweenAnimPivot('Shoot2H', tweentime);
         else
            TweenAnimPivot('Shoot', tweentime);
      }
      else
         PlayReload();
   }
}


// ----------------------------------------------------------------------
// PlayShoot()
// ----------------------------------------------------------------------

function PlayShoot()
{
   if (Region.Zone.bWaterZone)
      PlayAnimPivot('TreadShoot', , 0, GetSwimPivot());
   else
   {
      if (HasTwoHandedWeapon())
         PlayAnimPivot('Shoot2H', , 0);
      else
         PlayAnimPivot('Shoot', , 0);
   }
}


// ----------------------------------------------------------------------
// TweenToCrouchShoot()
// ----------------------------------------------------------------------

function TweenToCrouchShoot(float tweentime)
{
   if (Region.Zone.bWaterZone)
      TweenAnimPivot('TreadShoot', tweentime, GetSwimPivot());
   else
      TweenAnimPivot('CrouchShoot', tweentime);
}


// ----------------------------------------------------------------------
// PlayCrouchShoot()
// ----------------------------------------------------------------------

function PlayCrouchShoot()
{
   if (Region.Zone.bWaterZone)
      PlayAnimPivot('TreadShoot', , 0, GetSwimPivot());
   else
      PlayAnimPivot('CrouchShoot', , 0);
}


// ----------------------------------------------------------------------
// TweenToAttack()
// ----------------------------------------------------------------------

function TweenToAttack(float tweentime)
{
   if (Region.Zone.bWaterZone)
      TweenAnimPivot('Tread', tweentime, GetSwimPivot());
   else
   {
      if (bUseSecondaryAttack)
         TweenAnimPivot('AttackSide', tweentime);
      else
         TweenAnimPivot('Attack', tweentime);
   }
}


// ----------------------------------------------------------------------
// PlayAttack()
// ----------------------------------------------------------------------

function PlayAttack()
{
   if (Region.Zone.bWaterZone)
      PlayAnimPivot('Tread',,,GetSwimPivot());
   else
   {
      if (bUseSecondaryAttack)
         PlayAnimPivot('AttackSide');
      else
         PlayAnimPivot('Attack');
   }
}

// ----------------------------------------------------------------------
// PlayFiring()
// ----------------------------------------------------------------------

/*
function PlayFiring()
{
   local DeusExWeapon W;

//   ClientMessage("PlayFiring()");

   W = DeusExWeapon(Weapon);

   if (W != None)
   {
      if (W.bHandToHand)
      {
         PlayAnimPivot('Attack',,0.1);
      }
      else
      {
         if (W.bAutomatic)
         {
            if (HasTwoHandedWeapon())
               LoopAnimPivot('Shoot2H',,0.1);
            else
               LoopAnimPivot('Shoot',,0.1);
         }
         else
         {
            if (HasTwoHandedWeapon())
               PlayAnimPivot('Shoot2H',,0.1);
            else
               PlayAnimPivot('Shoot',,0.1);
         }
      }
   }
}

_________________
Being a soldier isn't just following orders, it's following those orders in the service of a higher cause. When that cause is betrayed, we're not soldiers anymore, just pieces on a chess board dying for the wrong reason.


Sat Dec 17, 2016 9:40 am
Profile
UNATCO
User avatar

Joined: Fri Oct 28, 2016 12:54 pm
Posts: 214
Post Re: HEEEEEEELP
Like he should freeze in this position and the gun should fire in his hand without moving.


Attachments:
Capture.JPG
Capture.JPG [ 19.95 KiB | Viewed 1905 times ]

_________________
Being a soldier isn't just following orders, it's following those orders in the service of a higher cause. When that cause is betrayed, we're not soldiers anymore, just pieces on a chess board dying for the wrong reason.
Sat Dec 17, 2016 9:48 am
Profile
UNATCO
User avatar

Joined: Fri Oct 28, 2016 12:54 pm
Posts: 214
Post Re: HEEEEEEELP
Can someone help. I want the pawn to stand with the weapon i his hand, and not move it when firing regardless of the recoil

_________________
Being a soldier isn't just following orders, it's following those orders in the service of a higher cause. When that cause is betrayed, we're not soldiers anymore, just pieces on a chess board dying for the wrong reason.


Sun Jan 01, 2017 11:43 am
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © phpBB Group.
Designed by Vjacheslav Trushkin for Free Forum/DivisionCore.