Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Mihulik on December 22, 2009, 01:34:53 PM

Title: Scene's methods overriding and question about Fade out.
Post by: Mihulik on December 22, 2009, 01:34:53 PM
Hi,

1)  Is it possible to override Scene's object methods?

I'd like to do:
Code: [Select]
method ScrollTo(object){
var mainObject = Game.MainObject;
Game.MainObject = null;
this.ScrollTo(object);
Game.MainObject = mainObject;
}


2) When my actor leaves scene I just fade in screen. It's no problem.
However, when I am setting new scene I place actor on right place, turn him and so on. However, I need to fade out screen as long as I am setting scene. Because in some scenes (maybe if they load so quickly?) I see how actor is turning and so on.
I could set longer fade out time of course but I am hoping that better approach exists.

3) Is it possible to change default fade in/out time? I haven't found this option yet.


Thank you!
Title: Re: Scene's methods overriding and question about Fade out.
Post by: Mnemonic on December 29, 2009, 09:36:14 AM
1) You should be able to override any built-in method.
2) If you see the actor turning, perhaps you're using actor.TurnTo() method. If you want immediate direction change, use the actor.Direction property instead.
3) You can't change the duration of the default fading. You can however disable it (Game.ChangeScene("some.scene", false, false)) and use the Scene.FadeOut() / Scene.FadeIn() methods manually, which allows you to use any duration.
Title: Re: Scene's methods overriding and question about Fade out.
Post by: Mihulik on December 29, 2009, 09:59:34 AM
1)I didn't find AttachScript method in Scene object so I asked. However, I'll try it.
2)It's what I need!
3)I was afraid that it's the only one option. Never mind.

Thank you:-)