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.

Messages - Mnemonic

Pages: 1 ... 379 380 [381] 382
5701
Technical forum / Re:Stopping cutscenes
« on: January 28, 2003, 01:44:02 PM »
The "keypress" handler should be in a script that is attached to the Game object, because the Game recieves the keypresses.

And...yes, it is messy. But now that you mention it, detaching the cutscene script from the keypress handler should also work and it would be a much cleaner solution.

(Sorry, I can't test it right now)

5702
Feature requests, suggestions / Re:More datatypes
« on: January 28, 2003, 10:47:14 AM »
The variables in WME are actually hash tables. By using just numbers as the hash codes, you get a simple list (array). And if you assign a value an another variable, you'll get a tree (i.e. technically speaking, one hash table member references an another hash table).
The only problem is, that the scripting language doesn't allow nested member references, like

Code: [Select]
MyVariable.MyProperty.AnotherProperty.YetAnotherNestedProperty = 10; // this doesn't work :-(


But maybe Santa's gonna do something about it, when the right time comes...  ;)

5703
Technical forum / Re:Stopping cutscenes
« on: January 28, 2003, 10:38:52 AM »
The "Keypress" event should work no matter it a scripted sequence is running or not. I think the easiest solution would be to:

1) set up a global variable and set it to false before you execute the cutscene
2) in the "keypress" event handler set the global variable to true
3) in the cutscene script check for the value of that global variable every now and then and if it's true, then interrupt the script (by return or something...).

By calling the Sleep command, you return control to the engine. But methods like GoTo or Talk call the Sleep command automatically so you don't have to call it explicitly.

5704
Technical forum / Re:about the ACTOR object...
« on: January 28, 2003, 08:26:46 AM »
If a character doesn't walk, you can use an "entity" instead. It's actually a simplified version of an actor - although they can't walk, they still have the Talk and PlayAnim methods. See the WME demo project, the "Old Guy" person is an entity (check the oldguy.entity file).

About the music fading... there is not a command for it in WME (well, maybe there should be...), but you can do it with a bit of scripting. Something like:
Code: [Select]
var OrigMusicVol = Game.GetGlobalMusicVolume();

for(var i=0; i<OrigMusicVolume; i=i+10)
{
  Game.SetGlobalMusicVolume(i);
  Sleep(100);
}

Well, it's just a dumb example, it would need to be tweaked a bit...

5705
Feature requests, suggestions / Re:ALPHA Channel for Sprites
« on: January 28, 2003, 08:17:00 AM »
No, it's only in my working version of WME, it wasn't released yet. I will probably throw in a few more functions before releasing a new version of the dev kit.

5706
Feature requests, suggestions / Re:ALPHA Channel for Sprites
« on: January 27, 2003, 09:46:14 PM »
Hehe, I did it on saturday  ;D

5707
Feature requests, suggestions / Re:Speech question
« on: January 27, 2003, 09:44:54 PM »
Same level.

5708
Technical forum / Re:Some Questions About Features - Procedures
« on: January 27, 2003, 08:53:12 AM »
Changing the caption can be done easily setting the object's "Caption" property. Attach a similar script to your "poster" entity in SceneEdit.

Code: [Select]
global SeenPoster = false;

on "LookAt"
{
  if(!SeenPoster)
  {
    self.Caption = "Star Wars Poster";
    SeenPoster = true;
  }
  actor.Talk("This is an original Star Wars movie house poster");
}

(Note: I didn't test this piece of code so it may contain errors, but you get the idea).

About playing the speech sound: it's supported directly by the "Talk" method:

Code: [Select]
actor.Talk("Blah blah blah", "filename.ogg");

The "filename" parameter is optional.

5709
Technical forum / Re:Quest for Glory-style RPG elements?
« on: January 27, 2003, 08:38:41 AM »
I must confess I didn't play any game from the QfG series but I believe I know what you'd like to achieve.

Well, I think the RPG elements (stats) can be done easily using a bunch of script variables; the stats screen could be build using the WME's UI layer, and combat is just a matter of moving actors on screen and playing their animations.
How does the spell inventory work? Does it mean you have actually two inventories, one for spells and one for items? Such thing currently isn't possible in WME, it would need to be "cheated" using the UI somehow...

5710
Feature requests, suggestions / Re:Speech question
« on: January 27, 2003, 08:26:15 AM »
Yes, like Cl

5711
Feature requests, suggestions / Re:DirectX ... OpenGL/SDL?
« on: January 24, 2003, 11:04:52 AM »
Yes, I agree with you. Using OpenGL would make porting to Linux considerably easier (I know absoultely nothing about Mac OS) and I'd like to do it eventually, because Linux is a very sympathetic OS :). But as you said, it's currently a very low priority... Sorry.

5712
Technical forum / Re:CMI Inventory
« on: January 24, 2003, 10:58:33 AM »
OK, I should really finish the documentation, it will cover the inventory definition (among the other things).
But I will give you a brief description now. Open the WME demo project in ProjectMan and open the "interface" folder. There is a "inventory.def" file, which defines the layout of the inventory box. As you can see, you can define a space reserved for each item (ITEM_WIDTH, ITEM_HEIGHT). Now, the important thing is the "AREA" line. It defines a rectangle on screen, which will contain the items.

The definition is as follows:

AREA { left, top, right, bottom }

For example, if you want the area to cover the whole screen, use

AREA { 0, 0, 800, 600 }

The engine will automatically fill this area with items, and if the items won't fit, the "next" and "prev" buttons will be enabled.

Once again, I will describe this in the documentation in more depth.


5713
Technical forum / Re:Some Questions About Features - Procedures
« on: January 24, 2003, 10:46:27 AM »
1: When I import my BMP in and make them sprites for a foreground entity, they are still square and the black pixels around the object are visible. How do I:
A - Make some area of the sprite transparent?
B - Make sure that only the visible area of the sprite is transparent?

You must choose some color to be transparent. Black color isn't a good choice. By default the transparent color is pink, RGB(255, 0, 255), but you can choose any color you want in the SpriteEdit tool.


2: How would i incorporate an "idle" animation for the main character? So they might check their pockets or look up at the sky randomly when waiting for you to do something?

The idle animation is not directly supported by the engine, but you can implement it easily using a script similar to this:

Code: [Select]
#include "scripts\base.inc"

var IsIdle = false;
var IdleStartTime = 0;

while(true) // endless loop
{
  if(actor.Ready) // is the actor doing something?
  {
    if(!IsIdle)
    {
      // actor enters idle state
      IsIdle = true;
      IdleStartTime = Game.CurrentTime;
    }
    else if(Game.CurrentTime - IdleStartTime > 5000) // is the actor idle for 5 seconds?
    {
      IdleStartTime = Game.CurrentTime;
      actor.TurnTo(DI_DOWN);
      actor.Talk("Do something! I'm bored!");
    }
  }
  else IsIdle = false; // actor is busy; set IsIdle to false

  Sleep(100); // wait for 100 milliseconds
}

If you attach this script to your actor, he will say "I'm bored" every 5 seconds. Of course you can modify the script to play an animation of something.


3: How robust is the sound engine? How many channels at once?
How do I trigger a song to play when a room is entered?

No known limit on simultaneous sound channels.
Every scene has a "scene_init.script" file attached. All you need to do is to add a following line to the script:

Code: [Select]
Game.PlayMusic("music\MyMusic.ogg");

You can use either an OGG or a WAV file for the music.

5714
Technical forum / Re:Problem
« on: January 24, 2003, 10:32:22 AM »
Thank you for the log. Well, I must admin I'm clueless at the moment :-( Everything seems to be OK. And since I'm unable to replicate the error, I'll have to dig into the hardware detection routine to find out what might be wrong...

5715
General Discussion / Re:New download idea...
« on: January 24, 2003, 10:29:23 AM »
Done!  8)

Pages: 1 ... 379 380 [381] 382

Page created in 0.044 seconds with 19 queries.