Hello i have a little problem concerning a window i want to use for an automap. it should act just like the inventory.
if the mouse is over y=700 it should come in and if it is under 650 again it should get away.
the coming in part works fine but the get away part gives me this error:
17:34: Runtime error. Script 'scripts\game_daemon.script', line 64
17:34: Call to undefined method 'FadeOut'. Ignored.
here is the part of the gamedaemonscript:
var InvWindow = Game.GetInventoryWindow();
var MapWindow;
// display the inventory window
if(Game.Interactive && Game.MouseY < 100 && !Game.ResponsesVisible && !WinMenu.Visible && Scene.Name!="Intro" && Scene.Name!="Kapitel_1" && Scene.Name!="Schachwelt" && invsichtbar==0)
{
InvWindow.FadeIn();
}
else if(Game.MouseY > 150 || Game.ResponsesVisible || !Game.Interactive)
{
InvWindow.FadeOut();
}
// display the automap window
if(Game.Interactive && Game.MouseY > 700 && !Game.ResponsesVisible && !WinMenu.Visible && Scene.Name!="Intro" && Scene.Name!="Kapitel_1" && Scene.Name!="Schachwelt" && invsichtbar==0 && Map !=true)
{
MapWindow = Game.LoadWindow("interface\automap.window");
MapWindow.FadeIn();
Map=true;
}
else if(Game.MouseY < 650 && Map==true )
{
MapWindow.FadeOut();
//Game.UnloadObject(MapWindow);
Map=false;
}
and here is the automap.script:
#include "scripts\base.inc"
Map=false;
method FadeOut()
{
for (var i = 255; i >= 0; i = i - 15)
{
this.AlphaColor = RGB(255, 255, 255, i);
this.Y=this.Y+6;
Sleep(5);
}
this.AlphaColor = RGB(255, 255, 255, 0);
}
method FadeIn()
{
for (var i = 0; i <= 255; i = i + 15)
{
this.AlphaColor = RGB(255, 255, 255, i);
this.Y=this.Y-6;
Sleep(5);
}
this.AlphaColor = RGB(255, 255, 255, 255);
}
anybody any idea ??
greets stucki