Attribute change X/Y Anchor?

I have an image that is 384 pixels wide/tall and I have it set to fixed and the width/height as 96/96 so you only see 96 pixels x/y of it at a time. I am trying to change the attribute of Vertical/Horizontal Anchor via key press.

Think of it as a sprite sheet, which it is. I am simply trying to change which part of the image is being shown depending on arrow key press (direction).

I have the movement understood, but here's what I have after the move:

Change Attribute: self.Graphics.Vertical Anchor To: __________________

I have tried a few things, but I am simply not understanding what to put in the blank. The image is set up in a 96x96 pixel grid if that helps. I simply need to change the value to match the direction it is moving.

Thanks?

Comments

  • SolarPepperStudiosSolarPepperStudios Member Posts: 754
    edited April 2013
    I'm not sure if you can do that, but I may be wrong. Does anyone have an idea?
  • SocksSocks London, UK.Member Posts: 12,822
    In theory your plan should work, you should be able to set your actor on . . .

    Horizontal = Fixed
    Vertical = Fixed

    . . . and then change the Horizontal and Vertical Anchors, with 'Left', 'Bottom' and 'Right', which should give you 9 positions . . . . . but as you've discovered it doesn't work !

    Why not simply have 16 separate 96x96 images and use 'Change Image' ?
  • VoobusVoobus Member Posts: 4
    edited April 2013
    Well, that would work, but it's really inconvenient in more ways than one. I dunno. Gamesalad looked nice, but it also doesn;t have HTML5 export to host on my own site either. I'm getting some shotty vibes.
  • SocksSocks London, UK.Member Posts: 12,822
    @Voobus

    Why not simply have 16 separate 96x96 images and use 'Change Image' ?
  • SocksSocks London, UK.Member Posts: 12,822
    Well, that would work, but it's really inconvenient in more ways than one.
    It really is pretty straightforward, if you say why this won't work for you someone might be able to suggest a solution.
  • VoobusVoobus Member Posts: 4
    Well, I know how to do it, but I would have to go through, cut up my sprite sheets, then change the picture for each keypress instead of changing the anchor positions of one sprite sheet. It's just nonsense.
  • SocksSocks London, UK.Member Posts: 12,822
    edited April 2013
    Well, I know how to do it, but I would have to go through, cut up my sprite sheets, then change the picture for each keypress instead of changing the anchor positions of one sprite sheet. It's just nonsense.
    Doesn't seem to be much in it as far as I can see, changing the anchor position or changing the image used, both are no more than a few minutes work to set up.
Sign In or Register to comment.