MoveTo why is the world moving around?

Talk about making games.

MoveTo why is the world moving around?

Postby imagremlin » Mon Nov 17, 2008 1:35 pm

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?
imagremlin
 
Posts: 15
Joined: Wed Oct 29, 2008 7:16 am
Score: 0 Give a positive score

Re: MoveTo why is the world moving around?

Postby skydereign » Mon Nov 17, 2008 10:45 pm

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: MoveTo why is the world moving around?

Postby imagremlin » Tue Nov 18, 2008 12:34 am

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.
imagremlin
 
Posts: 15
Joined: Wed Oct 29, 2008 7:16 am
Score: 0 Give a positive score

Re: MoveTo why is the world moving around?

Postby BlarghNRawr » Tue Nov 18, 2008 1:14 am

anything (like the stage or something) parented to the view would follow it there
Download Game Music
current projects:
Bold! ?% Started mechanics
Unnamed puzzle game 60% --i need a name!--
User avatar
BlarghNRawr
 
Posts: 767
Joined: Wed Jun 25, 2008 12:36 am
Location: Not using G-E anymore. Now using Source SDK.
Score: 27 Give a positive score

Re: MoveTo why is the world moving around?

Postby imagremlin » Tue Nov 18, 2008 2:51 am

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.
imagremlin
 
Posts: 15
Joined: Wed Oct 29, 2008 7:16 am
Score: 0 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron