Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: fabiobasile on August 17, 2006, 09:15:22 PM

Title: SkipTo...where?
Post by: fabiobasile on August 17, 2006, 09:15:22 PM
I'm a bit puzzled about this all "SkipTo" business:

My initial scene is a 2000x1399 map encased into an 800x600 res screen.

I want my initial scene to start immediately with the viewport focused on the main actor which is located approximately at pixel 450x300 in a 800x600 view, instead of opening the scene with the view slowly moving towards the actor.

I had a look in the docs and in the forum but i couldn't really find anything helpful. I thought the SkipTo method would work but apparently it doesn't. It just locks the scrolling and doesn't even allow me to move the player.

I placed
Code: [Select]
{
 scene.SkipTo(actor);
}
in the scene_init.script of my start up scene but i am not totally sure that's where i'm supposed to place it.
Title: Re: SkipTo...where?
Post by: fabiobasile on August 17, 2006, 11:55:40 PM
nevermind i got it!

I just had to remove the brackets and place it within the actor's loading attribs... :-)
Title: Re: SkipTo...where?
Post by: IvanErtlov on November 11, 2007, 08:10:26 PM
Yes I know, I`m bumping a thread, which is not appreciated on many boards - however, opening a thread without using the search function is the greater evil, and hereby I can prove that we indeed used it.

We have done some screens and puzzles for our game now, but we ran into the same problem - during usability tests the testers also mentioned that it is pretty annoying when the actor comes into the scene on the outer right, but the scene scrolls slowly (or fast, I know how to adjust the scrollspeed) from the outer left to the desired position. Is there any way to define the starting viewport on a 3000+ Pixel Scene without scrolling there?

Title: Re: SkipTo...where?
Post by: Mnemonic on November 12, 2007, 08:57:51 AM
The answer is already in this thread, although a little cryptic. If you put:

Code: WME Script
  1. Scene.SkipTo(actor);
  2.  

to scene_init.script, the "camera" will skip to the actor immediately.
Title: Re: SkipTo...where?
Post by: IvanErtlov on November 12, 2007, 12:13:19 PM
Thank you very much - I already had the code snippet included, but I was dumb enough to write ("Actor") instead of (actor)