two question about constrain self.position to game.position

guillefaceguilleface Member Posts: 1,014
edited November -1 in Working with GS (Mac)
i create two game attributes,platerx and playery, which one should i use, real attribute or integer? and should i use
constrain game.playerx to selfpostion x or
change attribute game.playerx to selfposition x? i want to keep track of my actor position all the time so i can use magnitude with another actors

Comments

  • cbtcbt Member Posts: 644
    Always use "real" for positions. Integer will look bad...
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    For position's use real not interger. The reason is intergers cant have decimal points, real can.

    And use constrain,as that will constantly update that attribute to be the same as the position at all times, change attribute will only do it once
Sign In or Register to comment.