playMaker

Author Topic: New Input System loop error  (Read 427 times)

katanant

  • Playmaker Newbie
  • *
  • Posts: 12
New Input System loop error
« on: June 11, 2023, 01:48:36 PM »
Good evening, I'm trying different things with unity and playmaker, at the moment I'm setting the player movements in third person, for idle and walk I used a simple blend tree which depends on magnitude obtained from player input get move vector (new input system) and so far so good, i was planning to run the player only by holding left shift and gamepad left trigger...the problem arises when i try to use the new input system, if i use the simple get key down in state of idle and walk and get key up in the running state works perfectly, I just had to insert an intermediate state that checks if you are moving otherwise the "running" animation starts even when standing still holding down shift, however everything works correctly as long as i use the old input system but i just try with the new input system if i hold down the button for running while the player is moving everything is fine but if i try to press it just once it just tries to access the second state where the float is present appears that checks if you are actually moving it freezes and gives the error "Loop count exceeded limit: 1000. Override the default limit (1000) in FSM Inspector > Settings > Max Loop Override.", this only happens using the new input system and don't get key down or up, I hope I was clear and I apologize if my English is not the best I'm Italian  :)
« Last Edit: June 11, 2023, 01:50:22 PM by katanant »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: New Input System loop error
« Reply #1 on: June 12, 2023, 08:27:06 AM »
Hi.
What action you have in the loop that gives the error.
it might be a logic issue or you need to add a next frame event in between.

what happen when you check if hes moving when tru/false.

if it loops back, it might be an issue as this will happen 1000's of times in a single frame, as physical movement is happening in fixed update.

katanant

  • Playmaker Newbie
  • *
  • Posts: 12
Re: New Input System loop error
« Reply #2 on: June 12, 2023, 08:50:27 AM »
Hi, thanks for replying, for the moment I solved it by simply using get key/button down and up, the error comes to me on my own with the new input system I don't know why....however, I'll do some screenshots

katanant

  • Playmaker Newbie
  • *
  • Posts: 12
Re: New Input System loop error
« Reply #3 on: June 12, 2023, 09:02:10 AM »
https://ibb.co/9HgxsTf
https://ibb.co/fY3SnwR
https://ibb.co/zhHxn4P

I made three screens, one for each state, I re-enabled the actions of the new input system to show you what happens, if I disable it and use get key/button down or up it works perfectly....

I forgot to specify that the error occurs only by pressing the stroke key once not holding it down which does not occur anyway with the old input system
« Last Edit: June 12, 2023, 09:17:18 AM by katanant »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: New Input System loop error
« Reply #4 on: June 13, 2023, 05:25:00 AM »
Hi.
The compare will loop back and forth to movement within the same frame.
you can set a state with a next frame event between check mag / walk to Movement.

But, why do you have this compare?

if its for animator, then it will be better to set a float parameter and connect to the controller axis for example, (for example) if less than 0.1 do idle if greater 0.1 and less than 0.5 do walk if greater than 0.5 do run

I would also suggest to make your own move system, unless the project is as prototype (not for releasing the game)

katanant

  • Playmaker Newbie
  • *
  • Posts: 12
Re: New Input System loop error
« Reply #5 on: June 13, 2023, 11:15:55 AM »
Hello, and thanks again for the interest, I had previously set the animator as you say, i.e. in the "idle and walk" blend tree I had also set run and it worked perfectly but I wanted to set it so that it only ran while holding pressed a key like left shift or a gamepad button and that way I didn't know how to do it, so I made the run state separate, with a blend tree "idle,walk,run" it immediately ran from the keyboard not having the sensitivity of one gamepad stick and from gamepad it ran according to the position of the right stick and this last time it wasn't bad actually but I still wanted to do it by pressing a key ... this is the reason why I didn't use the blend tree even for running , I'm still a beginner maybe there was a different way to control it with a key but I didn't know. As for the "check mag" status, I set it because the running animation started as soon as I pressed left shift even when stationary... instead checking if we are moving first, it works correctly.. even here I improvised, I'm not an expert...in the various tutorials I've seen they all do it differently. To answer the last thing...no it's not a real project...not even a prototype actually, all I do is exercise for me so as not to feel bad if one day I have a real project ;)

First of all i started learning c# last year actually but i like playmaker better as it gives me the impression that you actually really see what is happening while the game is running if you know what i mean

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: New Input System loop error
« Reply #6 on: June 15, 2023, 05:03:08 AM »
Hi.
Its a good think that you don't start immediately with a real project.

I actually learned C# thanks to playmaker by looking to their actions and start making my own custom actions.