Jump to content
  • 0

Attack frame is blocked


Aiden9

Question

Hello,

 

First i'm using the dev version with entities animations like _idle _attack.

 

I have succesfully applied the diagonal mouvement patch and the running. (also the MouseScroll)

 

but now after pressing attack boutton, the player is blocked at the last frame : a07157be3360a9b257d5e8e3d80bba89.png

 

i'm not that good at C#, so if anyone have an idea where is the probem in the code.

 

Thank you.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0
13 minutes ago, Shenmue said:

I guess when you walk the sprite change right?

You should check the "TimeBeforeIdling" value in "Intersect.Client/Entities/Entity.cs" and reduce its amount. Should be somewhere near the line 164. 

 

It doesnt work

Link to comment
Share on other sites

  • 0

Actually the bug with the character always running/walking is because you don't have an idle sprite or your idle sprite is your character running/walking.

About the attack frame not disappearing, it's related to "TimeBeforeIdling" value.

Link to comment
Share on other sites

  • -1

I understand where is the problem.

 

The first first error who make i cant apply the running patch was with this lines :

 

diff --git a/Intersect.Client/Entities/Player.cs b/Intersect.Client/Entities/Player.cs
index e7af06e0..7ae3299c 100644
--- a/Intersect.Client/Entities/Player.cs
+++ b/Intersect.Client/Entities/Player.cs
@@ -57,7 +57,7 @@ public class Player : Entity
         public Guid TargetIndex;
 
         public int TargetType;
-
+		
         public Player(Guid id, PlayerEntityPacket packet) : base(id, packet)
         {
             for (var i = 0; i < Options.MaxHotbar; i++)
@@ -814,7 +814,17 @@ private void HandleInput()
                 movex = 1;
             }
 
-            Globals.Me.MoveDir = -1;
+			if (Controls.KeyDown(Control.Running))
+			{
+				Running = true;
+			}
+			else
+			{
+				Running = false;
+			}
+
+
+			Globals.Me.MoveDir = -1;
             if (movex != 0f || movey != 0f)
             {
                 if (movey < 0)
@@ -1873,7 +1883,7 @@ public void DrawTargets()
             }
         }
 
-    }
+	}
 
     public class FriendInstance
     {
@@ -1902,4 +1912,6 @@ public void Load(string data)
 
     }
 
+	
+
 }
 diff --git a/Intersect.Client/Entities/Player.cs b/Intersect.Client/Entities/Player.cs
index 7ae3299c..cc874571 100644
--- a/Intersect.Client/Entities/Player.cs
+++ b/Intersect.Client/Entities/Player.cs
@@ -814,17 +814,9 @@ private void HandleInput()
                 movex = 1;
             }
 
-			if (Controls.KeyDown(Control.Running))
-			{
-				Running = 1;
-			}
-			else
-			{
-				Running = 0;
-			}
+            Running = Controls.KeyDown(Control.Running);
 
-
-			Globals.Me.MoveDir = -1;
+            Globals.Me.MoveDir = -1;
             if (movex != 0f || movey != 0f)
             {
                 if (movey < 0)

I let u see what the error i have :

 

d6c6996a7c344ff53c4a5600e8e3bc80.png

 

It mean that its not possible ton convert int type in boolean.

 

The error is from here 1000000000000%.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...