playMaker

Author Topic: Question about get variables with "Every Frame"  (Read 1855 times)

cc099183

  • Playmaker Newbie
  • *
  • Posts: 17
Question about get variables with "Every Frame"
« on: April 15, 2016, 07:06:10 AM »
Hello,


I have some questions about get variable with "Every Frame" this action.

I use the function with "Every Frame" to get global variable which use to get move speed. When I change speed and pause to check, the value in function with "Every Frame" isn't equal to global variable.

But when I use "loadscene" from another scene to that scene which have the function, the value is become equal to global one. But Also have some function use the same template isn't equal to global one.

I'm sure I active those function at the same time, but it still get difference.

How shall I that those function to get correct variable?

Sorry about my pool English, but I have no idea to solve this question... :'(



Zeldag

  • Full Member
  • ***
  • Posts: 198
Re: Question about get variables with "Every Frame"
« Reply #1 on: April 15, 2016, 09:07:20 AM »
 Hi and welcome to the forum!

:) I dont fully understand your problem. But I will still have a guess. I dont know if it will help.

You are multiplying the float, so maybe that is what is making it different (but it is different by such a small number that Im not sure if that is the case).

Still maybe try to disable the multiply float action and see if that helps. Also maybe it would help us to know what you are trying to do with this FSM.

Good luck with it.
« Last Edit: April 15, 2016, 09:09:07 AM by Zeldag »

cc099183

  • Playmaker Newbie
  • *
  • Posts: 17
Re: Question about get variables with "Every Frame"
« Reply #2 on: April 16, 2016, 08:03:55 AM »
Hi Zeldag,

Thanks for your advise :)


Those FSM use for scrolling multiple backgrounds. Those backgrounds set in different layers, and they have different scroll speed. When I Change the global float which means scroll speed, those FSM will get value and scrolling background at same time.

I don't know why the same FSM get the same speed at same time have different result. Maybe difference only 1 frame, but this problem make those FSM not applicable.

Now I try to remove those FSM and paste them back, it get work.
But I'm afraid it get wrong again......

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Question about get variables with "Every Frame"
« Reply #3 on: March 15, 2017, 04:26:04 AM »
Hi,

 Indeed, you should not rely on this, prefer maintaining an absolute position of the scroll that other can match instead of the speed.

 Bye,

 Jean