1
Техниче�?кий фор�?м / Re: Разговор актёра.
« on: January 27, 2011, 08:56:32 AM »
Привет, в
Latest WME version: WME 1.9.1 (January 1st, 2010) - download
#include "scripts\base.inc"
//this script moves the stars of the background of the menu
//start on center
self.X = 1024/2;
self.Y = 768/2;
//ramdom movement direction
var a = Random(0,359);
var incX = sin(a);
var incY = cos(a);
while(true)
{
//move the sprite
self.Y = self.Y + incY*4;
self.X = self.X + incX*4;
Sleep(20);
}
#include "scripts\base.inc"
var Caption = this.GetControl("credit");
var Caption_image = this.GetControl("credit_imge");
Game.PlayMusic("sounds\town_zombie_call1.ogg");
DoCredit("HIman present","sprites\logo.sprite");
Sleep(3600);
Game.StopMusic();
Sleep(1000);
HideCredit();
Sleep(500);
Game.PlayMusic("sounds\windchine1.ogg");
DoCredit("AKAVAKA present","sprites\2d_zast.sprite");
Sleep(3600);
Game.StopMusic();
Sleep(1000);
HideCredit();
Sleep(500);
this.Visible = false;
DoClose();
////////////////////////////////////////////////////////////////////////////////
function DoClose()
{
Game.StopMusic();
this.Close();
Game.ChangeScene("scenes\Menu\Menu.scene");
Game.UnloadObject(this);
}
////////////////////////////////////////////////////////////////////////////////
function DoCredit(Text, Image)
{
var i;
this.AlphaColor = RGB(255, 255, 255, 0);
Caption.Text = Text;
// Not work
// Caption_image.Image = Image;
// Not work to
Caption_image.SetImage(Image);
// show new credit
for(i = 0; i<=255; i=i+10)
{
this.AlphaColor = RGB(255, 255, 255, i);
Sleep(80);
}
this.AlphaColor = RGB(255, 255, 255, 255);
}
////////////////////////////////////////////////////////////////////////////////
function HideCredit()
{
var i;
// hide old credit
for(i = 255; i>=0; i=i-10)
{
this.AlphaColor = RGB(255, 255, 255, i);
Sleep(20);
}
}
WINDOW
{
TRANSPARENT = TRUE
SCRIPT = "scenes\start_logo\scr\credits.script"
STATIC
{
NAME = "credit_image"
X = 270
Y = 100
}
STATIC
{
TEXT = ""
TEXT_ALIGN = "center"
NAME = "credit"
FONT = "fonts\big_grey.font"
X = 0
Y = 568
WIDTH = 800
HEIGHT = 32
}
}
WINDOW
{
TRANSPARENT = TRUE
SCRIPT = "scenes\start_logo\scr\credits.script"
STATIC
{
NAME = "credit_image"
X = 270
Y = 100
IMAGE = "sprites\logo.sprite"
}
STATIC
{
TEXT = ""
TEXT_ALIGN = "center"
NAME = "credit"
FONT = "fonts\big_grey.font"
X = 0
Y = 568
WIDTH = 800
HEIGHT = 32
}
}
self.xResult = false;
if(self.xDescription!=null)
{
var Editor = self.GetWidget("desc");
Editor.Text = self.xDescription;
Editor.SelStart = 0;
Editor.SelEnd = 1000;
}
self.xDescription = "";
Other way to take the text is not present? Only so?I have just looked at the wme-demo, and MenuObject is also defined in Game.Script which includes base.inc - did you delete it there?Is not present did not delete, after change in scripts\game.script