Page 1 of 1

MoveTo why is the world moving around?

PostPosted: Mon Nov 17, 2008 1:35 pm
by imagremlin
I have a "The End" splash screen I want to show. So I made it into an actor and its floating around in the world where the player can never get to it. When the player loses his last life, I wanted to do this:

Code: Select all
MoveTo("view",-320,-240,1000,"TheEnd","");


I was hoping that would display my splash screen (the resolution being 640x480). Not only it does not work, but it seems to be dependant on where my main character dies. Even this:

Code: Select all
 MoveTo("view", 0,0, 999.000000, "Game Center", "");
 


Seems to be dependant on the main player position.

What am I missing?

Re: MoveTo why is the world moving around?

PostPosted: Mon Nov 17, 2008 10:45 pm
by skydereign
Your code, is for the splash screen? Because by the look of it, you are moving your view to that spot, not relative to the splash screen, just to the player.
Code: Select all
MoveTo("TheEnd", 0.0, 0.0, 1000.0, "view", "");

That should work, you might need to adjust the positioning, it moves TheEnd to 0,0 relative to the view.
MoveTo works as such: MoveTo("The actor you wan't moved", position, position, velocity, "relative to", "actor to avoid";
Another way, If you don't want the player to see TheEnd until game over, then have the actor be created upon the death of the player. The player's Destroy Actor event, just add a create actor, and set the position of the splash you want to put in.

Re: MoveTo why is the world moving around?

PostPosted: Tue Nov 18, 2008 12:34 am
by imagremlin
Interesting, so I should move the actor (the splash), not the view. Works for me.

I'm still curious though, why can't I move the view? I thought I was moving the view to those coordinates, relative to "The End", therefore, displaying the splash.

Re: MoveTo why is the world moving around?

PostPosted: Tue Nov 18, 2008 1:14 am
by BlarghNRawr
anything (like the stage or something) parented to the view would follow it there

Re: MoveTo why is the world moving around?

PostPosted: Tue Nov 18, 2008 2:51 am
by imagremlin
Thanks for the responses. I figured out why the view was not moving to where I expected. I'm using the "centerview" technique from the tutorials, so I really had to move the centerview actor which is the view's parent.