playMaker

Author Topic: [Solved] How to delay a variable float ?  (Read 2101 times)

vonpopov

  • Junior Playmaker
  • **
  • Posts: 98
[Solved] How to delay a variable float ?
« on: February 14, 2014, 02:48:20 PM »
Hi, (me again  ;D)

I would like a variable(float) to copy another variable(float) BUT with a delay (delay could be a variable (float)  to).

How should i do this ?

« Last Edit: February 15, 2014, 05:24:50 PM by vonpopov »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
Re: How to delay a variable float ?
« Reply #1 on: February 14, 2014, 09:04:12 PM »
Add a delay state that uses a Wait action. When finished transition to a Get Variable state that gets the variable value.

Does that work for you...?

vonpopov

  • Junior Playmaker
  • **
  • Posts: 98
Re: How to delay a variable float ?
« Reply #2 on: February 15, 2014, 09:32:44 AM »
- I deleted my previous messages in order to make myself clear :)
I find my way through a "Curve Float Action" but i still have a last problem.

Here is what i have.


My problem is :
"To Value" (In the curve Float Action), which is actualy : "Globals/Aircraft_Theoric_Speed".

It is set at start (to 25 in my exemple) and this is ok, it acts like a clamp at 25 (from 0 to 25 in the exemple), but when "To value" is reached (25), my Curve Float Action deactivate itself (goes grey)

How can i make a Curve Float updated each frame ?
I suppose this is through the "Finish event" ... but i am not sure, and i would like a cleaner way than creating another state/event to try a loop or what ever.

any clue ?




Nb : Another problem is WHY , curve float value are never exact as is just should be ? should i convert it to integer ? and approximate the result to min or max ?
« Last Edit: February 15, 2014, 10:08:20 AM by vonpopov »

vonpopov

  • Junior Playmaker
  • **
  • Posts: 98
Re: How to delay a variable float ?
« Reply #3 on: February 15, 2014, 05:24:32 PM »
as usual, i find my answer before anybody can help ahaha :D

But i think, talking about the problem is helping a loooot  to find the solution alone.

So, curve float was the solution, but as the "to value" as to be updated before doing every curve float i had to creat a specific event architecture for it.

I have to admit that i find the solution doing a mistake ahahah.


So :
1 State = Set a float value
2 State = Curve float when finished go 3 state
3 State = Verify if float changed (if yes go 2 state) +  Get the float value from 1 State

great great great  8)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: [Solved] How to delay a variable float ?
« Reply #4 on: February 17, 2014, 11:09:54 AM »
Hi,

 Indeed. always formulate your problem to others, that's half of the answer :)

 thanks for sharing back your findings. Always appreciated.


bye,

 Jean