Make actor rotate screen orientation

bluebyu25bluebyu25 Member Posts: 500
edited November -1 in Working with GS (Mac)
Hello, first of all I just wanted to say that I'm thankful for a great community here at the GS forums. I read through them when I get stuck with an issue and generally everyone is very nice and helpful.

Anyways, here is my issue and I searched for a similar topic but had trouble finding it, feel free to point me there if I missed it.

What I am trying to do is when a user touches an actor, it switches the iphone view from landscape to portrait. (And then be able to switch it back.) Not sure if this is a one actor or two actor job. If anyone can help me out, I would very much appreciate it.

*If anyone can give me an in depth way to do this feel free to message me or post here, whatever works! I am DEFINITELY willing to credit whoever helps me with this in the credits area of my game when I publish it. Credit where credit is due :-)

Comments

  • bluebyu25bluebyu25 Member Posts: 500
  • FranzKellerFranzKeller Member Posts: 517
    you can "fake it" by clever coding in your app?
  • bluebyu25bluebyu25 Member Posts: 500
    Sorry, I am relatively new at coding and even more so with gamesalad. I'm not sure I know how to do that
  • bluebyu25bluebyu25 Member Posts: 500
    Ok I created a rule but when I tested it within the gamesalad creator it didnt work. I dont know if it doesnt simulate screen orientation or not within it but more than likely my rule just isnt working.

    What I did was create an actor with a rule that says "when touch is pressed" then in behavior I have "attribute-->game device---> screen orientation----> is landscape right."

    But nothing changes when I press the actor. Anybody out there got any other ideas? Really would help.
  • MotherHooseMotherHoose Member Posts: 2,456
    don't think the GS Creator... can show you those things (can't very well flip your monitor)
    ... but you could try it in GS Viewer on your device...

    or on the xcode iPhone simulator on your desktop.

    ===
    as a developer you should make Display Text actors...
    to show state or conditions of items you are manipulating

    in your case create an actor...drag to scene... unlock... drag-in Display Text behavior in Text: [expression]Current scene>Autorotate>Landscape Left

    do one for each orientation you are concerned about...
    you will see true or false on the actor in Preview.
    (also you have to disable the other orientations |To: false / or the device will turn any which way the user wants)
    when you can see your rules/coding are performing correctly... delete the display text

    what you are trying to do...does work!

    MH
Sign In or Register to comment.