Make actor rotate screen orientation
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 :-)
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
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.
... 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