If x of actor is increasing

00george

  • Posts: 161
Hi I have a game attribute called distance to moon and I want to make it so as the y of the actor increases the distance decreases and as the y of the actor decreases I want the distance to increase. How can I do this?

Sunflower

  • Posts: 591
Code: [Select]
always / when updating
  set Distance To Moon to [[CONSTANT] - [y of Self]]
where CONSTANT is the supposed position of moon. So if e.g. character lands on the moon at y equal to 1000, then you should replace CONSTANT with 1000.

00george

  • Posts: 161
Thanks for the reply just before this I figured it out for my self but thanks anyway.