Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: The Man on July 26, 2012, 06:35:42 PM
-
Hi, everybody! I've been experiencing a problem with my last scene. I'll explain briefly!
The scene is a 1000x800 scene. What I wanted to achieve was a scene in which the screen would only scroll horizontally. I created then a 800x600 new scene and changed the scene's dimensions to 1000x600(In the "main" field), thinking this would do the trick.
It didn't.
Now, I don't understand where's the mistake! I followed the WME documentation and the procedure looks right... there must be some detail I misunderstood in the process! Can somebody help me figure it out?
-
Hmmm! I'm afraid that you have made a mistake. I've tried in my own project and works OK.
- My project has a 1024 x 768 resolution
- My scene has a 1300 x 768 resolution
- I've changed the game resolution in Project Manager / Startup Settings/ Resolution to 800 x 600 (are you changed the resolution here?)
- I've changed the scene resolution in the Layer properties option in SceneEdit to 1300 x 600
And the scene works ok with 800 x 600 resolution, as the scene has 1300 pixels width, the layer scroll horizontally. As the project and the scene has 600 pixels height, the bitmap has clipped to 600 pixels.
Review the resolution in Project Manager and SceneEdit, becouse don't need other options.
Note that the game resolution is changed in the Project Manager, the scenes can be less, equal or greater than the game resolution, if the size of the scene is greater than the game resolution, WME scrolls the scene when the actor moves through this one.
-
I don't know, everything is set as you said(I almost rhymed, here!)
Project has a 800x600 resolution and scene has a 1000x600 resolution, but still the scene doesn't scroll.... I don't know, couldn't I write a script that forces the game to follow the actor in this particular scene? And if so, how should it looks like?
-
I don't know, I can't think of anything, only stupids questions, but... here are:
- Do you have defined a floor region with the suficient size to permit to the actor go to the position of the scene when WME made the scroll?
- Try this:
in scene_init write this code.
actor.SkipTo(900, 400); This position is outside the screen
Scene.ScrollTo(actor); This force to scroll the scene to actor position.
If this works, there isn't any problem with the scene.
I don't know what's the problem, becouse WME should scroll the scene automatically.
-
I tried that, and the scene initially scrolls to reach the actor's position. But then when I walk toward the left of the screen the scene doesn't scroll anymore!
I'd need a script that tells the game to CONTINUOSLY check the actor's position and scroll the scene properly. I would attach this script to the scene and the trick would be done... problem is, I'm not such a good programmer... I'm more into graphic and animation...
-
Ok, I managed to make it!
I wrote a simple code similar to scene.script:
#include "scripts\base.inc"
////////////////////////////////////////////////////////////////////////////////
on "LeftClick"
{
Scene.ScrollToAsync(Game.MouseX, Game.MouseY);
actor.GoTo(Scene.MouseX, Scene.MouseY);
}
And I attached it to the scene. Now the scene scrolls depending on the point in which the player clicks. It's even better than the normal scrolling system!
Anyway, Hellraiser, thank you very much for your patience!
-
I'd guess you simply forgot to set Game.MainObject :
From Demo Project:
actor = Game.LoadActor("actors\molly\molly.actor");
Game.MainObject = actor;
Then the Games scrolls using molly.
I personally for RotT only use event based scrolling. Means: I created two regions, like two lines going from top to bottom of the screen, and when the player walks over that line, the whole screen scrolls to the Scenes end. I personally don't like it when the game scrolls all the time, it looks kinda nervous to me.
Greets,
Spellbreaker
-
Anyway, Hellraiser, thank you very much for your patience!
::thumbup