Aiden9 Posted June 15, 2020 Share Posted June 15, 2020 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 :Â Â 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 More sharing options...
0 Aiden9 Posted June 15, 2020 Author Share Posted June 15, 2020 Embedded Video Link Sorry for spam, here is a video of two bug i have, my entities continue to take the running animation while stand. Â Â Â Â Link to comment Share on other sites More sharing options...
0 Shenmue Posted June 15, 2020 Share Posted June 15, 2020 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. Aiden9 1 Link to comment Share on other sites More sharing options...
0 Aiden9 Posted June 15, 2020 Author Share Posted June 15, 2020 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 More sharing options...
0 Shenmue Posted June 16, 2020 Share Posted June 16, 2020 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 More sharing options...
0 Aiden9 Posted June 16, 2020 Author Share Posted June 16, 2020 Okay, thank it work. Link to comment Share on other sites More sharing options...
-1 Aiden9 Posted June 15, 2020 Author Share Posted June 15, 2020 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 :   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 More sharing options...
Question
Aiden9
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 :Â
Â
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
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 accountSign in
Already have an account? Sign in here.
Sign In Now