Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: qaaz345 on December 31, 2018, 12:31:58 PM

Title: Position ++1
Post by: qaaz345 on December 31, 2018, 12:31:58 PM
Do this to increase the distance of the X-axis at a certain time interval.

Get position
x = n

add float
n = (n + 1)

Set position
x = n

Isn't there an easier way?
Title: Re: Position ++1
Post by: Thore on December 31, 2018, 12:36:33 PM
If nothing else is affecting x, you don’t need n. Just x + 1, and set position.
Title: Re: Position ++1
Post by: djaydino on January 02, 2019, 06:06:34 AM
Hi.
With 'Translate' you can add per second also with 'float add'
Title: Re: Position ++1
Post by: jeanfabre on February 07, 2019, 01:38:13 AM
Hi,

 It's difficult to make this easier than as you describe it, it's totally fine. It's tricky sometimes to assess if a pattern can be optimized or not, and at some point the work has to be done somehow, so getting the position, modify it and setting it back is as close as you can get to a minimal pattern.

then, as other replies suggested, you can use translate for a constant movement, it depends on your time interval and how you want the movement of the object to be.

Bye,

 Jean