Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

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 - benkovici

Pages: [1]
1
Technical forum / Question about using of the keyboard
« on: February 18, 2009, 04:45:18 PM »
Hello!
In my game I would like some event to happen after the player presses a button, but I don't know exactly how to do this. Here is my code:

on "eye"
{
 actor.GoTo(597, 484);
 actor.TurnTo("DI_UPRIGHT");
 Game.Interactive = false;
 actor.Talk("Oh God! I don't wanna do this");
 actor.Direction = DI_DOWN;
 Sleep(700);
 actor.Talk("Give me a sign");
 actor.Talk("Press Y to oblige");
 actor.Talk("Press N to take pity on mental state");
 var button;
 var VK_Y;
 var VK_N;
  if(Keyboard.IsKeyDown(VK_Y))
 {
  button.Press(VK_Y);
    actor.Talk("Why do you do this to me?");
  actor.Direction = DI_UPRIGHT;
  Game.PlaySound("sound\event.ogg");
  var ent = Scene.GetNode("toy_big");
    ent.Active = true;
   this.Active = false;
   Game.TakeItem("mask");
   var EntMask = Scene.GetNode("mask");
  EntMask.Active = false;
 }
  else if(Keyboard.IsKeyDown(VK_N))
  {
    button.Press(VK_N);
    actor.Talk("Thanks for saving my mental state");
  }
  Game.Interactive = true;
}
 -----------------------
I also tried to use VK_UP and VK_DOWN cause I thought that if VK_N and VK_Y aren't mentioned in keys.inc, they might not work. But something is not right with my code. Could you help me please?

2
Technical forum / About save game
« on: February 13, 2009, 05:10:44 PM »
Hello!
 when I press the Save button to save my game in debug console this message appears:

17:59:26:  Saving game 'C:\Documents and Settings\Vginju\My Documents\Game\save002.dsv'...
17:59:27:  Warning: invalid instance 'm_WaitObject'

---------------
Could you tell me please what it means, cause on the face of it all seems all right: the game Do Save and Do Load and in the map where the saves are stored I have 2 saves:

save001.dsv
save002.dsv
----------
Maybe smth is wrong with the extension dsv? It decipheres as Demo Saves am I right?

3
Technical forum / Leaving the scene after all is done
« on: February 12, 2009, 02:05:21 PM »
Hello! How to do that the actor could leave a scene only after all the puzzles are solved and all the things collected??

For example: the first chapter of my game consists of 4 scenes. To leave this chapter the actor must find a key to open the gate. He can find this key befor collecting other items and solving puzzles. So how to permit the actor to open the gate only after all in this chapter is done?

4
Technical forum / Question about item amount
« on: February 11, 2009, 03:53:09 PM »
Hello again!

I have a trouble with item amount. In my game the actor must collect 6 pieces of an item called "dead_memory". The problem is that the amount of the item doesn't increase. It displayes always amount "1".
Here is the code written in items.items:

ITEM
{
   CURSOR_COMBINED = TRUE
   CAPTION = "dead memory"
   NAME = "dead_memory"
   SPRITE = "items\dead_memory.sprite"
   CURSOR = "items\dead_memory.sprite"
   SCRIPT = "items\dead_memory.script"
   FONT = "fonts\outline_white.font"
   
    DISPLAY_AMOUNT = TRUE
   AMOUNT_ALIGN = right
   AMOUNT_OFFSET_x = 7
   AMOUNT_OFFSET_Y = 36
}
----------------------
And the code written in items\dead_memory.script:

var DeadMemoryItem = Game.GetItem("dead_memory");
DeadMemoryItem.Amount = DeadMemoryItem.Amount + 1;
--------------
Tell me please what am I doing wrong?

5
Technical forum / Question about dialogues
« on: February 05, 2009, 07:37:16 PM »
Hello! For example in entity.script I have this dialogue:

global PhoneRing;
on "RightClick"
{
  if (!PhoneRing)
  {
 actor.Talk("There is nothing I can do. It's broken");
 }
 else
{
actor.Talk("Hello...");
 this.Talk("Why did you call me?");
 actor.Talk("I...I didn't...");
 Sleep(800);
 actor.Talk("Who are you anyway?");
}
}
----------
Is it possible to do that the dialogue would be talked only once without using Response box cause in this case I don't want the actor to chose responses ?

6
Technical forum / Question about Game.PlayMusic()
« on: January 29, 2009, 08:12:34 PM »
Hellow! In the menu of my game to make a music  play  I wrote this code:

Game.PlayMusic("music\Aguado.ogg");

on "New game"
{
//to stop the music when the button "New Game" is pressed
  Game.StopMusic("music\Aguado.ogg");
  Game.ChangeScene("scenes\video\video.scene");
  Game.UnloadObject(this);
 
}

And when I write the same code Game.PlayMusic() for another music in the script file of the first scene it doesn't work.
Maybe I'm doing smth wrong cause I'm not a programmist. Help me please?
And is it posible to make a music play just for one scene ?

7
Technical forum / How to place the inventory or sprites on viewport?
« on: January 24, 2009, 07:47:29 PM »
Hellow! I need to put an arrow (that if pressed will change the scene) on viewport. How can I do it?  Also I want the inventory to appear at the viewport's bottom line and actor speach at the upper viewport line like in "Black mirror" game.
Help me please!

Pages: [1]

Page created in 0.081 seconds with 15 queries.