Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - HIman

Pages: [1]
1
Technical forum / Stars of the background
« on: November 21, 2005, 11:58:45 AM »
 All greetings!
I try to make running up stars, from the center to edges of the screen.
Also there were some questions:
1. How to place sprite stars in a starting position after she has reached edge of the screen?
2. Why twitching moving of stars, though FPS = 100 is appreciable?

The script of a star is resulted below:
Code: [Select]
#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);
}

Can eat easier with the decision?

2
Technical forum / Bad quality of video Theora
« on: September 01, 2005, 08:49:27 AM »
Greetings!
    I have tried to recode from AVI in Teora, and with help VLC media player,
 and with the help ffmpeg2theora-0.15.exe, but the half-scientific result absolutely has not pleased me,
very strong distortions. Such into game to insert it is impossible!
How to be?

3
Technical forum / How to transfer the image to component STATIC?
« on: August 28, 2005, 08:06:02 AM »
Example
scenes\start_logo\scr\credits.script
Code: [Select]
#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);
}

}

scenes\start_logo\scr\credits.window

Code: [Select]
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
  }
}

The text works perfectly, but the image is not :(

If in scenes\start_logo\scr\credits.window to insert

Code: [Select]
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
  }
}

That the picture is shown as it is necessary, but whereas it can be changed?

4
Technical forum / singl line editor control
« on: August 24, 2005, 06:38:03 PM »
Hello,
And it is possible to show a small example how to work with a line,
 read, write, erase
for singl line editor control?

5
Greetings!

  Three questions, I in fact only study:)

The first:

   In an example wme_demo
From interface\menu\menu.script
In scripts\base.inc
Has transferred a line global MenuObject,
Mistakes are not present but after start the black screen, why?

The second question:
    In an example wme_demo after successful insert Edit in
interface\menu\menu.window
Example of a code
Code: [Select]
EDIT
  {
    NAME = "desc"
    BACK = "ui_elements\editor.image"
    FONT = "fonts\outline_green.font"
    FONT_SELECTED = "fonts\outline_red.font"
    SCRIPT = "scripts\parser.script"
    X = 0
    Y = 100
    WIDTH = 250
    HEIGHT = 20
    FRAME_WIDTH = 4
    TEXT = " "
    MAX_LENGTH = 200
    PARENT_NOTIFY = TRUE
    CURSOR_BLINK_RATE = 300
}
Has created scripts\parser.script with a code
Code: [Select]
#include "scripts\base.inc"
#nclude "scripts\keys.inc"

  var Editor = self. GetWidget ("desc");
  Editor. Text = self.xDescription;
  Editor. SelStart = 0;
  Editor. SelEnd = 200;

on "Keypress"
{
 self. Close ();
 if (Keyboard. KeyCode == VK_RETURN)
  {
    actor. Talk (Editor. Text);
}
  MenuObject = null;
}
  error opening script 'interface\menu\parser.script'
Why? I have obviously specified a way and what script will process EDIT.

The third question:
I have created parser.script in 'interface\menu\parser.script' with code look above.
Has specified what script will be will be executed:
Code: [Select]
EDIT
  {
     ..
    SCRIPT = "interface\menu\parser.script"
     ..
After start:
 Error. Call to undefined method 'GetWidget.' Ignored.

I have absolutely got confused: (

6
Technical forum / What do I do not so?
« on: August 21, 2005, 04:00:59 PM »
Greetings!

In an example applied to a cursor wme_demo,
I have created menu1.window and have inserted the program

Code: [Select]
WINDOW
{
  NAME = "WINDOW"
  IMAGE = "interface\menu\menu.bmp"
  SCRIPT = "interface\menu\menu1.script"
  MENU = TRUE

EDIT
  {
  NAME = "MyEditor"
  ;TEMPLATE = "templates\MyTemplate.editor"

  ; position and size (relative to the window position)
  X = 100
  Y = 100
  WIDTH = 200
  HEIGHT = 50

  ; editor state
  VISIBLE = TRUE
  DISABLED = FALSE

  ; text
  TEXT = "My brand new editor" 
 
  ; background
  BACK = "ui_elements\win_inactive.image"
 
  IMAGE = "interface\menu\menu1.sprite"
 
 
  ; fonts 
  FONT = "fonts\outline_white.font"
  FONT_SELECTED = "fonts\outline_red.font"

 
  ; script
  ;SCRIPT = "path\menu1.script"
 
  ; cursor
  ;CURSOR = "path\beam.sprite"
 
  ; extended properties
  PARENT_NOTIFY = TRUE
  MAX_LENGTH = 100
  FRAME_WIDTH = 2
  CURSOR_BLINK_RATE
  }   
}

Preview gives out crach
Run game gives out crach

Example of component EDIT to take from the Documentation
What do I do not so?
HELP  ???

Pages: [1]

Page created in 0.21 seconds with 22 queries.