playMaker

Author Topic: Float Compare Store Boolean  (Read 4502 times)

Flying Robot

  • Sr. Member
  • ****
  • Posts: 293
  • Od ton yebo redro
    • Flying Robot Studios
Float Compare Store Boolean
« on: September 25, 2013, 03:47:22 AM »
Another little action. Nothing special. A variance of Float Comparison action.

Compares two floats and store them in Booleans. Can come handy if you want to constantly check and set flags instead of sending events. Especially if you don't want to leave the state while comparing.



« Last Edit: September 25, 2013, 08:10:03 AM by Flying Robot »

Flying Robot

  • Sr. Member
  • ****
  • Posts: 293
  • Od ton yebo redro
    • Flying Robot Studios
Re: Float Compare Store Boolean
« Reply #1 on: September 25, 2013, 06:06:22 AM »
Interesting thing I found while using this action.

While I was using this with trigger events, I found that it's not working properly. So, I found that the trigger events and Update is having a gap in execution. So, if used with Trigger events this action can throw some garbage booleans before it starts operating.

I wonder what can be the solution.

Flying Robot

  • Sr. Member
  • ****
  • Posts: 293
  • Od ton yebo redro
    • Flying Robot Studios
Re: Float Compare Store Boolean
« Reply #2 on: September 25, 2013, 08:09:19 AM »
Sorry false alarm. The code is quite alright. Was fooled by the lateupdate in one of the action of the state. Namely Get Angle to Target.

Also, found a typo in the code. A variable declared twice. Replacing that with new version in the first post.

gbug

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Float Compare Store Boolean
« Reply #3 on: January 22, 2014, 06:44:42 PM »
Thank you! Just what I needed to keep things tidy and clean.