Page 1 of 1

view move to plyer

PostPosted: Wed Oct 10, 2007 12:37 am
by elite
Ok, another post by me :lol: This one is probably the most frustrating problems i have had. Im making a game called GYRMS. Everyone is throwing around grenades, molotov coctails, bombs, bullets, blah blah. Amazing i can do that but i still can figure out the game menu. There is a begin button and when i click it, i want the view to center on the mAJOR gYRM(PLAYER) but unfortunately, it doesnt and whenever the game starts, the view starts dropping down. A pretty confusing problem eh? :evil: :evil: :evil: :evil: :evil: :evil:
Thanks
Twigser :mrgreen:

Re: view move to plyer

PostPosted: Wed Oct 10, 2007 2:21 am
by pixelpoop
Unlike regular actors the view's "center" is actually the top left corner.
If you code:
view.x=player1.x; view.y=player1.y;
this makes the center of actor player1 goto the top left corner of the view. To adjust for this you need to add half of your screen size to the view position for both x and y.

Re: view move to plyer

PostPosted: Sat Nov 17, 2007 11:01 am
by Kalladdolf
there are many good turtorials about that