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

Pages: 1 2 [3] 4
31
Technical forum / Enlarging hot spot area?
« on: June 29, 2007, 07:21:20 PM »
I'm using the WME demo as the initial template for my inventory. When combining objects in the inventory, the upper left corner of object no. 1 has to hit the center of object no. 2. I'm fraid that this can cause the player to miss the fact that some objects can be combined, especially when object no. 1 is approaching object no. 2 from the left side. Is it possible to change this somehow, so that the objects can be combined as soon as they overlap each other in one way or another, or at least expand the "hot" area to the left side?

I know that placing a dot or something similar in the upper left corner of the cursor is a way around this, but I prefer to avoid that.

I hope I am making myself clear.

Thanks in advance!

32
Technical forum / Problems with disabling the inventory
« on: June 29, 2007, 04:46:43 PM »
I have this little problem that I hope that someone can help me with. Try to follow me here:

To be able to disable the inventory in certain scenes I have done the following:

Changed the line in the data/scripts/game_daemon.script file which reads

Code: [Select]
if(Game.Interactive && Game.MouseY < 45 &&! Game.ResponsesVisible &&! WinMenu.Visible) Game.InventoryVisible = true;
to

Code: [Select]
if(Game.Interactive && Game.MouseY < 45 &&! Game.ResponsesVisible &&! WinMenu.Visible && InventoryActive) Game.InventoryVisible = true;
Added the line

Code: [Select]
global InventoryActive;
in data/scripts/base.inc.

Added the line

Code: [Select]
InventoryActive = true;
in data/scripts/game.script.

I then enabled/disabled the inventory by setting the global variable InventoryActive in the scene_init.script files.

So far so good. Then, in order to make the inventory slide down when an item is picked up, I added the following piece of code to game.script.

Code: [Select]
method TakeItem(var ItemName)
{
// call the original method we have just overriden
this.TakeItem(ItemName);

global InventoryHint = true;
Sleep(1000);
InventoryHint = false;
}

And modified the inventory-showing condition in game_daemon.script to:

Code: [Select]
global InventoryHint;
if(InventoryHint;
(Game.Interactive && Game.MouseY < 45 && !Game.ResponsesVisible && !WinMenu.Visible))

The inventory slides down when an item is picked up now, BUT it overrides the enable/disable inventory settings. Is there a way around this?

Thanks in advance!

33
Technical forum / Flashlight script issue
« on: May 19, 2007, 03:14:24 AM »
I have this peculiar problem when using the (magnificent) flashlight script by Mnemonic. The player is supposed to light up a room by holding a bicycle lamp. The lamp is in the inventory, and is dragged to a large hotspot in an almost black screen. The flashlight script is activated and up comes the light beam. So far no problems. Then something happens which I didn't anticipate. Since the lamp item was used to bring up the scene where the script is used, the icon for the lamp stays in the middle of the light beam (until the player right clicks, off course). The scene contains an item that can be picked up, and has a hand icon attached to it. Assuming that the player doesn't think of right clicking to get rid of the lamp icon, the hand icon is never revealed.

Is there any way to make the lamp icon go away (to be "released") as soon as it is used in the scene?

Making a transparent icon for the lamp doesn't help, since that doesn't reveal the hand icon either.

If there isn't any workaround for this, I will try a different approach, like letting the game itself activate the lamp as soon as it is held, so the player doesn't have to drag it. However, I'm not really pleased with that compromise, so I thought I'd turn here for advice first.

Thanks in advance!

Mikael

34
Technical forum / Warning message question
« on: April 28, 2007, 02:50:59 AM »
I'm trying out a script that makes entities appear and disappear depending on the positions of switches. Everything works exactly as planned, except that I get this error log message: "Warning: variable 'ent_handle_2_down' is inaccessible in the current block. Consider changing the script."

I've tried the scene back and forth, and it no doubt works perfectly, despite the message. I can not see how I could mess around with the "inaccessible" variable without causing major dysfunction.

The code looks like this (it's probably idiotic):

Code: [Select]
global handles_down;

on "LeftClick"

{
  if(handles_down==1)
  {
  global handle_2_down = 1;
  var ent_handle_2_down = Scene.GetNode("handle_2_down");
  if(handle_2_down==1) ent_handle_2_down.Active = true;
  handles_down = 2;
  }
  else
  {
  handle_2_down = 1;
  ent_handle_2_down = Scene.GetNode("handle_2_down");
  if(handle_2_down==1) ent_handle_2_down.Active = true;
  handles_down = 0;
}}

The warning refers to the 3rd line from the bottom.

Thanks,

Mikael

35
Technical forum / Subtitles disappearing when changing scenes
« on: April 26, 2007, 02:18:59 PM »
I have this (slight) problem with subtitles. When a subtitle is displayed upon using the Talk command, it is interrupted as soon as another scene is loaded. So let's say that I have a closeup scene of something. I look at something in the closeup, which triggers a comment, with its subtitle. I have set the subtitle to be displayed for 3 seconds. However, if I get out of the closeup scene 1 second after the subtitle line is triggered, the subtitle will disappear. This is no biggie, but I was wondering if there is any way around it?

Thanks!

Mikael

36
Technical forum / Inventory sliding down
« on: April 22, 2007, 02:56:04 AM »
This is not really that important, but I think it would be a nice touch to let the inventory slide down for a second or two when an object is added to it. Is there any way to implement this without much hassle to it?

Thanks,

Mikael

37
Technical forum / Bringing up the menu with right click
« on: April 20, 2007, 07:06:47 PM »
I've tried to modify game.script in the WME Demo to make a simple right click on an "inactive" area bring up the main menu. I know that this should be simple, but for some reason, I haven't succeed.

Thanks for any help!

Mikael

38
Technical forum / Compiled game questions
« on: April 10, 2007, 07:33:03 PM »
I seem to remember that there is some kind of debug log for games that have been test run from the compiled .exe file. Is this something I have dreamt?

And while I'm at the topic: Is there some easy way to change the icon for the compiled .exe file? The (otherwise excellent) installer that I use snatches the Wintermute icon for the install file, and off course, I'd like to use my own.

Thanks!

Mikael

39
Technical forum / Custom menu screen problems
« on: April 08, 2007, 03:04:22 PM »
Again, I feel quite stupid. However, it's clear that I am not the only one having this problem, which gives me the courage to ask.

I want to bring up a custom menu screen when the escape key is pressed. I've borrowed a code snippet from the Mystic Triddle demo (see below).

When I paste the code into the game script everything works PERFECTLY FINE, except that when I am in the menu scene, and press escape again, it reloads the menu scene, instead of resuming the game. What makes this especially annoying is that when the menu scene has been reloaded, "Resume game" does not work, since it goes back to the previous scene, in this case the previous occurence of the menu scene.

In the Mystic Triddle demo, pressing escape when in the menu resumes game, BUT, in the Beyond the Threshold demo, in which the same method is used, the exact same problem occurs, that is when pressing escape in the menu, the menu reloads, and the game can't be resumed after that.

This is the code I've used:

Code: [Select]
////////////////////////////////////////////////////////////////////////////////
on "Keypress"
{
  // on Esc or F1 key
  if(Keyboard.KeyCode==VK_ESCAPE || Keyboard.KeyCode==VK_F1)
  {

  if(Scene.name == "menu")
  {
     if(Game.PrevSceneFilename == "")
      ;
     else
      {
  Game.ChangeScene(Game.PrevSceneFilename); // Go back to game - acts like resume game
  }
  }
  else
  {
  if(Game.SelectedItem!=null) // deselect Items if active
  Game.SelectedItem = null;
 
  //Game.ScreenshotEx("saves\temp.bmp",200,150);   // when we want to store a screenshot manually
  Game.ChangeScene("scenes\menu\menu.scene");      // load and display the main menu window
  }
   
  }
}

Thanks for any help!

Regards,

Mikael

40
Technical forum / Two entity questions
« on: April 05, 2007, 01:46:09 AM »
Let's say that I wanted a certain entity repeated in all (or at least lots) of the scenes in one game. Is there an easy way to do this?

Is there a way to get the hover effect when I place an inventory item over an entity ONLY when there is a possible action when clicking the inventory item on the entity?

Thanks again,

Mikael

41
Technical forum / Crossfading transition
« on: April 04, 2007, 07:14:28 PM »
Is there any way to crossfade to scenes into one another during scene change?

Thanks!

Mikael

42
Technical forum / Length of subtitle lines
« on: April 03, 2007, 02:29:02 PM »
Is there any way to control the length of the lines in the subtitles while using the talk method? I find the default somewhat narrow for the 1024x768 resolution, with only four or five words per line.

Thanks,

Mikael

43
Technical forum / Unbelievably basic variable question
« on: April 03, 2007, 12:07:48 AM »
OK, this is really basic, and I'm kind of embarrassed for asking it, but here goes:

Let's say that I want different things to happen when I left click a certain region entity, depending on which value the variable "myvariable" is set to. I have no problems with the if...else statements, as long as there are only two conditions involved, but trying to use more conditions only makes me confused.

I've tried this:

global myvariable;

on "LeftClick"
{
  if(myvariable==1) Game.ChangeScene("scenes\scene1\scene1.scene");
  if(myvariable==2) Game.ChangeScene("scenes\scene2\scene2.scene");
  if(myvariable==3) Game.ChangeScene("scenes\scene3\scene3.scene");
  else Game.ChangeScene("scenes\scene0\scene0.scene");
}


It doesn't work at all, off course. How the heck should I code this?

Regards,

Mikael

44
Technical forum / Question about 1st person template
« on: March 31, 2007, 02:17:32 AM »
I'm creating a template for a first person game here, and I still have some basic things to figure out.

1) To get rid of the actor, I put "actor.Active = false;" in the scene.init_script file. Is there any way that I can implement this in the game script, so that I don't have to do this in every single scene?

2) Is there some way to make the scale levels and regions invisible when I load the Scene editor, so that I don't have to uncheck them in the properties tab in every scene?

3) I've touched upon this subject in an earlier thread, but I really have to know before I start my project. The reason that I'm asking is because several of the other game engines I've tried fails considerably in this department: My game will consist of approximately 1,200 "frames", in other words 1,200 scenes. Do this large amount of scenes slow down WME a lot?

Thanks in advance!

Regards,

Mikael

45
Technical forum / Entity connected to variable
« on: March 14, 2007, 01:44:53 PM »
I just need a quick explanation of how I make entity xxx visible only when variable yyy has the value of 1.

Thanks!

Regards,

Mikael

Pages: 1 2 [3] 4

Page created in 0.02 seconds with 21 queries.