Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. 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 - Marek

Pages: [1] 2
1
Technical forum / "Subtitle" style dialog
« on: August 20, 2004, 08:23:58 PM »
I'm modifying the Talk function in an attempt to show the text centred at the bottom of the screen, along with the name of who is doing the talking.

I'm approaching this the same way as described in this thread.
However, I don't want to specify the duration for each line. It should work by default like the normal Talk function.

Does the WME scripting language have a function for counting the number of characters in a string? I'm guessing no since it's not in the manual, but who knows. I need a way to have an adaptive default duration for my hacked talk function. If there's another way let me know.

Okay, second issue is having the name there of the character who is talking.
First I was thinking I should do something like

if actor isTalking --> char = "Mike"
load entity Sally
if Sally isTalking --> char = "Sally"
load entity Larry
if Larry isTalking --> char = "Sally"
etc. [not actual code, obviously]

But that seems so awkward and wrong that I haven't even tried it yet.
Is there an easy way to retrieve the name of the object that is talking at any time?

Thanks for the assistance, as usual.

Marek

2
Technical forum / Everything dark except circle around character?
« on: August 13, 2004, 12:12:48 AM »
I'm a bit stumped at a major challenge. I've made a top-down maze puzzle and now I want to make it so that everything is dark except the area around the character, who has a flashlight. Sort of like some of the dungeons in Zelda: Link to the Past (except here it's just one puzzle in a regular 3rd person point and click adventure).

What would the most efficient way be to achieve this effect? Should I make a massively large (my screen size is 800x600, so it'd have to be 2400x1800 :o ) black overlay sprite with a little hole in it that follows the character sprite when it moves? Or is there some other, more clever way to handle this?

Your help would be very much appreciated.

3
Feature requests, suggestions / "Idle time" tracking?
« on: June 26, 2004, 03:55:12 PM »
I'd love to have a function that returns the number of seconds the user hasn't a) interacted with anything or b) moved the mouse.

For example when the user hasn't done anything for X minutes, I could give him a new hint. This could also be used for things like idle animations, 'screensavers' or returning users to a menu screen when the game has been idle for a while (this would be really useful for my game for example, since I have to show it at an event where people will probably play for only 5 minutes or-so ... I could make it so that it automatically resets the game when no one is playing it).

Maybe there's a way to do it already, but a function for it sure would make it easier.

4
Technical forum / Disabling inventory
« on: June 25, 2004, 03:26:53 PM »
I have a "world map" screen in the game that should not display the inventory.

So in scene_init I put this:

Code: [Select]
Game.InventoryVisible = false;
That doesn't work. I figure game.deamon might be overriding it constantly?

Code: [Select]
if(!Game.ResponsesVisible && !WinMenu.Visible) Game.InventoryVisible = true;
else if(Game.ResponsesVisible || Stateworldmap.Active) Game.InventoryVisible = false;

How can I achieve what I want?

5
Technical forum / Stack overflow
« on: June 02, 2004, 10:20:26 PM »
Holy shit, what does that mean?  :o

" 23:17: Fatal: Stack underflow "

The game in fact crashes. It seems to come down to the if clause in this file:

Quote
////////////////////////////////////////////////////////////////////////////////
on "LeftClick"
{
  actor.GoToObject(this);
}

on "bonesliver"
{

  if (GuardDistracted = false) {
  Game.Interactive = false;

  snark.Talk("Hmmm, I'll try and prod this into the keyhole");
  snark.GoTo(398, 362);
  snark.TurnTo(DI_UP);
  snark.Talk("(squeeky noises)");
  Sleep(200);
  snark.Talk("(more squeeky noises)");
  Sleep(400);

  var Guard = Scene.GetNode("guard");
  Guard.PlayAnim("scenes\prisoncell\sprites\door1guard_appear.sprite");
  Guard.SetSprite("scenes\prisoncell\sprites\door1guard_there.sprite");

  Guard.Talk("Feeble prisoner! What are you doing?");
  snark.Talk("Err... nothing?");
  Guard.Talk("I heard something.");
  snark.Talk("It must have been the wind.");
  Guard.Talk("Silence, prisoner! Don't even think of escape!");

  Guard.PlayAnim("scenes\prisoncell\sprites\door1guard_disappear.sprite");
  Guard.SetSprite("scenes\prisoncell\sprites\door1guard_dummy.sprite");

  Game.Interactive = true;
  } else {
 
  snark.Talk("Quickly now, while the guard is distracted...");
  snark.GoTo(398, 362);
  snark.TurnTo(DI_UP);
  snark.Talk("(squeeky noises)");
  Sleep(200);
  snark.Talk("(more squeeky noises)");
  Sleep(400);
  snark.Talk("YES!");

  Narrator.DisplayText("Puzzle completed!", 2000);
  Narrator.DisplayText("In the full game, the door will now open.", 4000);

  }
}

Any ideas?
Sorry if I seem insane, I'm under a deadline here and I didn't expect WME to crash after my last changes  ;D

6
Technical forum / Buttons do not respond
« on: June 02, 2004, 09:13:09 PM »
Ok ok ok ok ok LAST support question, heh. I need to have a demo for my teachers tomorrow... after that I can chill and go back to not annoying you.

Any theory as to why the buttons in this window don't seem to be doing anything?

Quote
WINDOW
{

    NAME = "characterselect"
    X = 650
    Y = 510
    WIDTH = 130
    HEIGHT = 90

    SCRIPT = "interface\characterselect.script"
    VISIBLE = TRUE
    IN_GAME = FALSE

    BUTTON
    {
      NAME = "togglesnark"

      IMAGE = "interface\snark.png"
      IMAGE_HOVER = "interface\snark_h.png"
      IMAGE_PRESS = "interface\snark_h.png"
      IMAGE_DISABLE = "interface\disabled.png"
      IMAGE_FOCUS = "interface\snark.png"

      WIDTH = 65
      HEIGHT = 90
      X = 0
      Y = 0
    }

    BUTTON
    {
      NAME = "toggleazalia"
      DISABLED = FALSE

      IMAGE = "interface\azalia.png"
      IMAGE_HOVER = "interface\azalia_h.png"
      IMAGE_PRESS = "interface\azalia_h.png"
      IMAGE_DISABLE = "interface\disabled.png"
      IMAGE_FOCUS = "interface\azalia.png"

      WIDTH = 65
      HEIGHT = 90
      X = 65
      Y = 0
    }

}

characterselect.script:
Quote
#include "scripts\base.inc"

////////////////////////////////////////////////////////////////////////////////
on "toggleazalia"
{
  azalia.Talk("Hi there, it's a-me!");
  actor = azalia;
  Game.MainObject = actor;
}

////////////////////////////////////////////////////////////////////////////////
on "togglesnark"
{
  snark.Talk("Hi there, it's a-me!");
  actor = snark;
  Game.MainObject = actor;
}

7
Technical forum / Multiple characters
« on: June 02, 2004, 03:50:48 PM »
Okay, you're probably getting sick of my whining, but here goes another question ;)

I'd like to have 2 characters in the same room, and a button that switches control between them.

I know how to load actors of course, but how do I make it so that when I load actor B, actor A still stays in the scene, except as an entity?

I think I understand how to do multiple inventories. Just to make sure... I have to write:
Game.InventoryObject = "characterA";
and then all game.takeitems commands etc. affect character A's inventory?
and when I switch to
Game.InventoryObject = "characterB";
all those functions affect only character B's inventory, right?

Hopefully I'm on the right track here.

8
Technical forum / Can an item delete itself?
« on: June 01, 2004, 08:52:47 PM »
When the player combines item X with Y to form item Z, I want item X and Y to be deleted. But when it gets at Game.DeleteItem("X"); it just stops there. Is it because Game.DeleteItem("X"); will not work inside x.script ?

9
Technical forum / Undefined method 'CanHandleEvent'
« on: June 01, 2004, 12:53:54 PM »
Sorry for temporarily taking over the forums with the last few topics ::)

I have a little bug that I can't figure out:

13:50: Runtime error. Script 'scripts\game.script', line 44
13:50:   Call to undefined method 'CanHandleEvent'. Ignored.

I changed the interface so that it doesn't use the coin, but instead only has two verbs: LookAt (left clicks) and Action (right clicks). It's all in game.script now, not in inventory.script.

Quote
////////////////////////////////////////////////////////////////////////////////
on "LeftClick"
{
  // what did we click?
  var ActObj = Game.ActiveObject;
 
  // if there's an inventory item selected, deselect it
  if (Game.SelectedItem != null){
    Game.SelectedItem = null;
    return; }

  // if there's no inventory item selected, but the cursor is hovering above an object, apply the LookAt verb
  else if(ActObj!=null && ActObj.CanHandleEvent("LookAt"))
  {
    ActObj.ApplyEvent("LookAt");
  }   

  // else propagate the LeftClick event to a scene
  else
  {
    Scene.ApplyEvent("LeftClick");
  }
}

Any idea why I can't use CanHandleEvent in this context?
The error occurs when left clicking on the floor, not when clicking on objects.

10
I didn't see this in todo.txt, so here it goes.

It would be great if the different letters didn't have to be left-aligned in their "cell".
I tried Bitmap Font Builder, but the fact that the letters can't be centered pretty much renders it useless, unless I'm missing a feature somewhere.

11
Technical forum / Example of loop?
« on: May 31, 2004, 12:12:28 PM »
I'm trying to make a sort of limited help system, in that the game tracks the time and if the player hasn't done something after 5 minutes, the character will give a hint.

Could someone supply an example of a loop for such a thing, and tell me where I should probably insert it? I haven't done a loop before yet in this project so it would be great if I had a template  :)

What I'm trying to do is this:
- At the start of scene, the game stores the time in a variable
- When the game time is 5 minutes later, it checks if inventory has object "X"
- If not, then actor.Talk("Hey, maybe I should check out object X!");

Muchos gracias!

12
I've got two minor questions.

Firstly, am I limited to using .bmps for fonts? Or can I use a png not with a pink background, but just a transparent background so I can have nice smooth edges? The same question goes for character sprites, actually. (The game's own alpha blending is a little weak considering how pixelated the edges of my character still are :) )

Secondly, I'm trying to project some text on top of an inventory object. You see, I need to have a lot of similar inventory objects except with a different word on top of them, and I need the text to stay dynamic. Don't ask why, heh. What's the proper approach for this? I gather I should place a window of the same size on top of the inventory object and put the text in it, but I'm not sure where to put the code that refers to this window. If you've got a rough starter, that would be cool.

Edit: oh, and here's another question.
I need inventory items to play a little animation when they appear. That's easy. But I also need some of them to fade them out and make a sound when they are dropped. This can either be an animation or a fade that's coded (whatever does the trick). I take it I have to write some kind of loop that decreases the alpha of the item until it's at 0. Again, I am probably already on the right line of thought, but I am always a little hamstrung when I have to decide where to put this code, where to reference it, and so on. A little help on this would be awesome!

13
Technical forum / Problem with character
« on: April 29, 2004, 12:13:23 PM »
I drew my game's protagonist in 4 different directions. I used Molly as a template and replaced all her animations with mine. My new character is about half the size of Molly. I left Molly's "take" animations in there as I don't have replacements for those yet.

A test scene that worked fine before is now messed up. My main character won't walk in certain areas (even though they're not blocked), he can walk off the screen and sometimes the scaling "snaps back" to his default size.

I don't know what's going on, but I'm guessing I have to define my character's size somewhere, or re-set a reference point in his frames for where he's standing? Any thoughts on what it could be?

Thanks!

14
Technical forum / Making a method for showing a window
« on: March 08, 2004, 09:37:10 PM »
Sorry for posting so many messages today, but I'm trying hard to learn WME very fast.

I'm trying to do the following...
My game is going to have "narrators" text like in Gabriel Knight. I want it to run at the bottom of the screen.

Basically I want to be able to stick something like
Code: [Select]
Narrator("I felt very strange that day. Like something was about to happen...");...inside my scripts. This custom function should be available in my whole game, not just one scene.

Okay, so I probably need to make a window for that. And I need to make a method, right?

Could you guys give one or two pointers as to how to set this up in terms of structure? I think I can handle making the individual parts, but I'm a bit lost how to set up the grand scheme ;)

Still learning, still learning ...

Thanks guys.

15
Feature requests, suggestions / More camera control
« on: March 08, 2004, 07:27:00 PM »
WME already automatically tracks the player-controllable character with the camera. That's cool. But sometimes you want to pan to the other side of the room, see what's happening there, and pan back to the main character. I don't think WME offers an immediate way of doing that, unless I'm mistaken. It would be cool to have some functions for that.

I sure hope I'm not the annoying noob who makes requests for stuff that's already there. If it isn't I think it belongs in that top-priority list in your txt file ;)

Pages: [1] 2

Page created in 0.046 seconds with 21 queries.