How to start moving camera when player starts at left corner of screen?
Hi there,
I'm new to GameSalad and trying to create my first game. So, need some expert help. The player of my game starts from left corner and I intend to start moving the camera as the player starts moving. This is because I want to stop the player moving as soon as some enemies come into focus on the right side of the screen.
I've set the "Control Camera" on the player and tried to minimize the camera area to the center. But the screen starts scrolling only when the player reaches the middle of the screen. But I want the screen to start scrolling as soon as the player starts moving at the left corner.
How do I achieve this?
Thank you
Best Answer
-
Simple Apps Posts: 158
Its SImple... you make two player actors... 1st player keep left and 2nd player at the center
make control camera to 2nd player..and make 2nd player constrain to 1sr player x, y positions. then hide the 2nd player....thats it...
Answers
You will need to make your scene bigger !
There is nothing past the lower lefthand corner (I'm assuming it's the lower lefthand corner) for the camera to see, so make some more 'land' so the camera has something to look at, hope that makes sense !
I believe Socks is right I did a similar game before like this. As Socks mentioned you need to make the game scene wider.
Big Smile Games Play Happy!
Check out our other GameSalad exclusives.
Thanks guys for the suggestions. But, I couldn't get it working with the above.
However for anyone else who may want a solution for this can refer to this discussion - http://forums.gamesalad.com/discussion/23380/control-camera-don-t-move-to-center-please
i am having the same prob. i tried what socks said but my player one and 2 just centred on the xy the same as if i locked the camera on player1. seems to me there needs to
be a rule between the camera actor and where i place my visible player. not just set x and y. more a follow the leader behaviour by a set distance but i don't know how to do that in GS . I would really appreciate some help understand how this works!:)
@childerhouses Make sure you remove the camera actor. Open and unlock the player actor in the scene. Put a constrain attribute at the top, and say: CurrentScene.Camera.OriginX to selfPosition.X-200. You can tweak the 200 to shift the camera back an forward.
Edited - (couldn't delete post?)
@Zurtagh after 24 hours, posts can no longer be edited except by moderators (aka Sous Chefs).
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User