playMaker

Author Topic: Add 2D Force To Last Moved Direction & Loop Error  (Read 1004 times)

MorGD

  • Playmaker Newbie
  • *
  • Posts: 5
Add 2D Force To Last Moved Direction & Loop Error
« on: December 20, 2020, 05:36:48 PM »
Hello guys I need help and this is what I'm trying to do:
I want  to add force to the 2D Rigidbody of the player on direction of the last key pressed (A = Left S = Down W = Up D= Right), either when actually moving to that direction or when the player is not moving.

But this frustrating loop count error keeps going and Im not sure where should I use the "Next Frame Action"so that this loop count exceeded error is solved.

Please take a look at the screenshots in the link and thank you in advance.

https://imgur.com/gallery/NPWuWlm



djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Add 2D Force To Last Moved Direction & Loop Error
« Reply #1 on: December 20, 2020, 07:37:47 PM »
Hi.
Please don't lock topics, even when you have solved your problem :)

In you logic you have a 'infinite loop going' and playmaker will give an error if the loop exceeds 1000 loops in 1 frame. (default is 1000 but you can adjust if needed)

For the next frame event  probably between start state and state 1.