Direction of my Player

I would like know if I can do this:

image

When I press the arrow Left or Right, my player walk through the white line to the next red point, What attribute use to do this?

Comments

  • doug_smuppetdoug_smuppet Member Posts: 99
    anyone?
  • JarrenHJarrenH Member Posts: 206
    I think you could probably use tables to save the x and y locations of each of the points. Have one column for the x and one column for the y. Then when you push your left or right arrows, add or subtract from an attribute, and then use that to reference the correct row to pick the x and y values.
    Hopefully that makes some sort of sense, I might be able to throw together a quick project a little later in the day.
  • doug_smuppetdoug_smuppet Member Posts: 99
    @JarrenH only with tables? there are another way? because I do not get along very well with tables.
  • JarrenHJarrenH Member Posts: 206
    I can't think of any simple solution. It would require a lot of attribute changes back and forth between the arrows, actor, and points. Tables would make it so much simpler.
  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2013
    When I press the arrow Left or Right, my player walk through the white line to the next red point, What attribute use to do this?
    It's not too difficult but the L/R arrow system might be a bit confusing, as it will 'flip' once you pass the mid point.

    If the right key always moves you in the same direction along the path you will be going right when you press it whilst at the top of the path - and you will be going left when pressing the right key whilst you are in the bottom half, imagine you are on the bottom line one point to the right of he end of the bottom half of the path, which key, left or right, do you press to go to the very end of the bottom half of the path ?

    The alternative is to change commands half way, but then the mid point becomes an issue - if you move right from the top to the mid point, then want to go back up to the left which key do you press ? If left takes you back up and to the left then how do you go down and to the left ? If pressing right takes you up and to the left then things start to get weird.


    Maybe up and down buttons would make more sense.
  • doug_smuppetdoug_smuppet Member Posts: 99
    Hi @Socks, I would like create this, to be my levels lock/unlocked, so I would like create something like this:

    image

    Do you remember this game?!?
  • SocksSocks London, UK.Member Posts: 12,822
    made you a quick template
    https://www.dropbox.com/s/ktaffjqbhfbvs8x/template.zip

    @Wingmanapps

    Excellent, works really well !
  • doug_smuppetdoug_smuppet Member Posts: 99
    @Wingmanapps yehhhh... good job man! it's EXACTLY what I looking for.

    thanks a lot. ;)
  • doug_smuppetdoug_smuppet Member Posts: 99
    I have other issue. the file from @Wingmanapps works perfectly, buuut, I thought, I can use this project to incorporate in Lock and Unlocked levels?!? I use this video to create a template to lock and unlocked levels: from gshelper.

    I tried incorporate, but, only work when all levels are unlocked, if I have 2 or 3 levels unlocked, didn't worked, and I don't know how do this.

    anyone can help me?
Sign In or Register to comment.