distance counter help

skippyskippy Member Posts: 106
edited November -1 in Working with GS (Mac)
This was mentioned in the forum about 5 months ago but i need some more info if anyone knows, i need a distance counter on the screen so when my actor goes up say the length of the screen the counter will read 480 or something like that and if it falls down half way it will read 240, i'm not sure if it has to relate to the pixels but i just need some sort of counter constantly displaying how high or low the actor is on the screen
It was said before to increase the actors x or y value to match the scene size or something but i need more details please

Comments

  • synthesissynthesis Member Posts: 1,693
    or position.Y in your case :)
    Nice try Tshirt...(gotta keep an eye on you).
  • skippyskippy Member Posts: 106
    ok so i created the attribute integer playersy then when i add the constrain attribute to the actor self.position.y to game.playersy the actor doesn't move now, i'm doing something wrong for sure

    Update sorry i had them two the wrong way around it works perfectly thanks fellas :)
  • ValanValan Member, BASIC Posts: 410
    Edit: Oops! I see you got it working.

    What the guys meant was that you need to set up an integer attribute(player.Dist).

    Display this integers' value onscreen. Distance = (Game.players.Dist)

    Then in the players actor
    Constrain Game.players.Dist to Self.position.y

    Now you should see the Distance = (Game.players.Dist) alter as the player moves.
Sign In or Register to comment.