flipping images (horizontal)

InLaNocheInLaNoche Member Posts: 20
edited July 2012 in Working with GS (PC)
I was chatting in another thread about moving characters around and they talked about a feature where you can flip your actor so you don't have to double up animation for left/right movement. I found the attribute, but I can't seem to change that with a rule. How is this done in the windows version of the GSC?

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited July 2012

    Hi @InLaNoche

    I don't know the GS windows version at all so I don't know why you can't change the flips within the Rules, so I'm not much help there...

    But if you can't at the moment, for whatever reason, I guess the only other option is to go with my prev. suggestion in your other thread, - copying the animation frames and flipping them in the rules before you drag them into the animation behaviour... just a thought. Hope that helps out.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Under the actor attributes there is an images section. In that section there should be an attribute call flip image horizontally and flip Image Vertically. You set it to true to flip it opposite of the original image.
  • InLaNocheInLaNoche Member Posts: 20
    edited July 2012
    Under the actor attributes there is an images section. In that section there should be an attribute call flip image horizontally and flip Image Vertically. You set it to true to flip it opposite of the original image.
    I have tried to do this in a rule. For testing sake, I made a quick shooter game. Again, just as a test, I have tried to use Change Attribute when the player's ship moves left. In the set field I try and add the flipHorizontally attribute (click, not typing it in) and the field shows Invalid Path. If I try a different attribute, such as color red (again, clicking) it shows self.color.red. So why is it not working with the flip attribute?

    @gyroscope
    The problem is I cannot change it in the rules. Are you talking about in the attributes panel itself? That won't work unless I make an actor. I am trying just to flip the image to save on images imported.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited July 2012

    Sure thing, but you won't "waste" anything by having a duplicate set of actors to flip for the other direction. Try it: the original images obviously add to the file size, but any copies to flip won't add any more to the file size.

    So as I say, if you can't get flipping to work while running and somehow get these flipped images into an Animation Behaviour (I've no idea how that's done, if it can be done at all....), then duplicate and flip each one before dragging them into the new Animation Behavior for the other direction, as I previously described. Just a suggestion.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • InLaNocheInLaNoche Member Posts: 20
    edited July 2012
    @gyproscope
    The whole issue is I do not know how to flip them other than the actor attribute. And this does not seem to be a run time changble value. It just adds a lot more work to what I want to do. I can always make duplicates of all the animation stuff, but that doubles the work. Well if it has to be done, it has to be done. It seems that all the self.graphics are "locked" in the same way.

    [EDIT]
    Ok, it might have been in the way I was trying to use the Graphics attributes. I got this to work, and incase someone else runs across this, and wants a good face palm, here is what I was doing wrong. I was trying to horizontal flip while a key was pressed. Instead, I should have a flag (such as boolean faceRight) to check when to change the flip from false to true. It's working now.
  • tdormaneshtdormanesh Member, PRO Posts: 10
    I was just wrestling with this problem, thanks for posting your fix. Saved me some time
  • tdormaneshtdormanesh Member, PRO Posts: 10
    Damn, I still don't get it.. :(
Sign In or Register to comment.