playMaker

Author Topic: Position ++1  (Read 1314 times)

qaaz345

  • Playmaker Newbie
  • *
  • Posts: 39
Position ++1
« 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?

Thore

  • Sr. Member
  • ****
  • Posts: 480
Re: Position ++1
« Reply #1 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.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Position ++1
« Reply #2 on: January 02, 2019, 06:06:34 AM »
Hi.
With 'Translate' you can add per second also with 'float add'

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Position ++1
« Reply #3 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