playMaker

Author Topic: Setting conditions based on player direction  (Read 389 times)

nickg84

  • Playmaker Newbie
  • *
  • Posts: 7
Setting conditions based on player direction
« on: August 18, 2022, 02:39:43 PM »
How would I go about doing this?  For example, I've got a topdown game going on, and I need specific control changes to happen if the player is facing down or up.

I know I can use "GetRotation: Player" and store a Float.  But I need to call an action if the Float is between 90 and 270 (player facing down), but it needs to continually update and change if they're facing up.  Using Float Compare, I'm just getting loop errors checking for all the conditions.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Setting conditions based on player direction
« Reply #1 on: August 23, 2022, 01:09:05 AM »
Hi.
Can you show some pictures of your setup.

if you get an infinite loop there must be an issue with the compare values.
to prevent infinite loops you can also use a next frame event.
but in this case i would check the compare values 1st