Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Ikke on November 25, 2017, 07:31:46 AM

Title: Convert int to float [SOLVED]
Post by: Ikke on November 25, 2017, 07:31:46 AM
Hi there!
Just started out with playmaker, and already bumped into my first problem.
I am trying to convert an int(in this example 3) to float. I would expect it to return 3.0, but it returns 0. Am I thinking wrong?
I added a screenshot of my debugging session as an attachment.
Title: Re: Convert int to float
Post by: Arnoob on November 25, 2017, 07:36:46 AM
You put the int compare before the conversion. The actions will be executed from top to bottom in your state. Therefor, the state is exited before it had the time to convert the int. Put the "int compare" action at the bottom instead and it will work.

Cheers
Title: Re: Convert int to float
Post by: Ikke on November 25, 2017, 07:42:58 AM
Thanks a million! That was really stupid of me :) Anyway, moving on...