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

Pages: 1 2 3 [4] 5
46
Technical forum / Can't use object
« on: December 04, 2008, 06:06:48 AM »
I have an unusual situation.   I have a door key that the actor (first person actor) gets via code in a script on a window button in a dialogue in that window script.

When I gave the actor this key before in script in the scene everything worked fine, the actor could use it on the door. Now getting it via code on a button creates mischief!!

Now the door says I can't use this key on the door.  I'm just really puzzled.  Nothing changed except how the actor gets the key.  ? I don't get a script error in WME log, I just can't use the nice key that appears in inventory.  I get a message in the game that says it can't be used on this object--the door.

This is the script on the door where the key is supposed to be used:

#include "scripts\base.inc"

global DoorUnlocked;

on "LeftClick"
{
Game.Interactive = false; 
  if (!DoorUnlocked)
  {
    Game.Msg("The door is locked and you don't have the right key.");
   Game.Interactive = true;
  }
  }

on "key"
{
  Game.Interactive = false; 
  DoorUnlocked = true; 
  Game.Msg("You unlock the door with your key.");
  Game.DeleteItem("key");
 Game.ChangeScene("scenes\Tunnels\Tunnels.scene");   
  Game.Interactive = true;
}

This is the script on the window in the scene where the actor gets the key--the stuff on Goodbye is just to close out the window--I had trouble with that.  All my dialogues and images stayed on the screen.  I'm using a special window to show dialogue.  I like it and would like to keep it.  The Buttop stuff is just the buttons that are pressed.

#include "scripts\base.inc"
 on "Buttop1"
{
var a = this.GetControl("Buttop2");
a.Text = "Ready for action. Here take this key.";
var key = Scene.GetNode("key");
actor.TakeItem("key");
}

 on "Buttop3"
{
var b = this.GetControl("Buttop4");
b.Text = "Princess Vasilisa's Book of Weather Spells is missing. That could mean mischief in the wrong hands. Let me hop in your back pack and let's go.";
actor.TakeItem("kolo");
}

on "Goodbye"
{   
var d = this.GetControl("Buttop1");
d.ParentNotify = false;
d.Text = "";
var e = this.GetControl("Buttop2");
e.ParentNotify = false;
e.Text = "";
var f = this.GetControl("Buttop3");
f.ParentNotify = false;
f.Text = "";
var g = this.GetControl("Buttop4");
g.ParentNotify = false;
g.Text = "";
var h = this.GetControl("Face");
h.SetImage(null);
h.ParentNotify = false;
var i = this.GetControl("Goodbye");
i.Text = "";
i.ParentNotify = false;
var j = this.GetControl("Textbox");
j.SetImage(null);
j.ParentNotify = false;
}

This is my Items/items script:

ITEM
{
      CURSOR_COMBINED = TRUE
      CAPTION = "Agent Kolobok"
      NAME = "kolo"
      SPRITE = "items\kolo.png"
      CURSOR = "items\kolo.png"
      CURSOR_HOVER = "items\kolo.png"
      SCRIPT = "items\kolo.script"
}

ITEM
{
      CURSOR_COMBINED = TRUE
      CAPTION = "Key"
      NAME = "key"
      SPRITE = "items\key.png"
      CURSOR = "items\key.png"
      CURSOR_HOVER = "items\key.png"
      SCRIPT = "items\key.script"
}

Sigh--it's a nice scene--but I can't get it to work now since I added the dialogue window.  :  {  And I really like the dialogue window. 






47
Technical forum / Scripts attached to windows
« on: December 03, 2008, 07:38:45 AM »
I have a window that overlays every scene.  It has a compass type button that it would be nice it it could be used to move to the previous or next scene--in every scene.  That window is always on top of each scene.  That window has the player avatar and a few other things.

I'd like to let the player click on a part of that compass type button in that window in each individual scene and move to the next correct scene or to the correct prior scene, or another different, unvisited scene. 

I'd have to change the script for that button in each scene.ini file I think to accomplish that.  Can I do it?  :  ) 

Or should I just have the button as part of the graphics of each scene and make region entities over that button that allow the movement to the next or previous scene?

Trying to describe this as best I can.  :  )


48
Technical forum / Caption Window
« on: December 03, 2008, 06:47:55 AM »
No matter how hard I try I can't change the font for the caption window or change where the text of the caption window shows up on the screen. 

I'm not talking about the response def box for actor/entity dialogues.  : )

The caption window is always in a tiny white font and always up in the top left corner of the window.

I'd like it to be midcentral on the screen and a nice, big font of my own choosing.  :  )  I tried changing the font and moving the box---but it doesn't seem to "take". 

49
Technical forum / Question template
« on: November 30, 2008, 05:47:58 AM »
My game has a scene that asks whether the player wants to play as male or female using the question template for the window.

I'm not very good at getting the control for a button or static in another scene---and changing things like its image in another scene---how would I script the yes button (which is now "male"--the no button is "female"--the question is "Play as male or female?" ) so that in another window the avatar in a static is a male pic?  I would have to be able in the script of the question window to get the control for the static in the other window that contains the male avatar and set that static's image path to its male picture. Any help is appreciated.  :  )

Since I'm having so much trouble getting the button controls in script, I need detailed instructions if possible.  :  )  I usually get the error message var (name of button) is not defined or method "getcontrol" is not defined.

It's important for me to nail this down as in dialogues in the game whether the player is male or female would affect the dialogues and I would have to have an if clause that could access the right global--f.e. global male = true. 

Or this is not possible?  I'm pretty sure it's easy but I just don't have the facility yet.  :  ) 

50
Technical forum / Adding a true type font
« on: November 27, 2008, 05:40:56 AM »
Have been playing around with adding true type fonts.  There are some instructions in Inside A Game in the online documentation under localization. 

But when I am in the "fonts" file and right click Add Font and choose TrueType for the template, somehow nothing happens.

So I tried copying one of the font files to another directory and then replacing the contents with the truetype font definition from Inside A Game and editing the contents for my new font, for example, rockwell.  I get the right font but----all the true type fonts I add are red---I tried changing the parameters to rgb black parameters but they are still red. The red effect is sometimes very cool.  :  )  But I'd like to have more variety.  : )  What am I doing wrong?

 

51
I have a window with let's say five buttons. 

I would like all the buttons except the first button on scene start up to be "invisible" -- unresponsive--until the buttons are sequentially pressed.

Testing to see if there is such a way to do this, if I put

But2.InGame = False

on the script that applies to button one, button 2 becomes unresponsive.

So following from that---

Can I put

But2.InGame = False
But3.InGame = False
But4.InGame = False
But5.InGame = False

in the scene ini script file so that until you press button 1, the other buttons don't do anything?

And then put in the script that relates to each button, what's needed to activate (make alive) the next button?

Or if this were a puzzle, somehow use variables and testing of variables so that this works?  Whether the button showed or not depends on whether you pressed its prior button number.  If I'm not clear, I'll try again.  :  ) 


52
Technical forum / Def file
« on: November 25, 2008, 11:15:43 PM »
What is a .def file and when would you use it as opposed to a simple window?  Can you make a new one patterned on the ones that already exist?  Is there another way to make one?

What are the ways to load (access) a .def file? 

If this has already been answered and I missed it, would you please point me in the right direction?  Thanks.

53
I have a scene where -- when you left click on a Game Entity Region, you get a message and change scenes and you get an item in your backpack.  I want to get rid of the Wait Cursor that pops up.  I tried using 
Game.RemoveWaitCursor(); but I don't think I put it in the right place.  The wait cursor shows up as soon as the dialogue begins not when you first enter the scene.

This is my script on the Game Entity Region:

#include "scripts\base.inc"
on "LeftClick"
{
   global lookkolo;
   var myvar1 = "Hey, is it really you, old friend?";
   var myvar2 = "Let me hop into your backpack.";
   var myvar3 = "Hello, old friend.";
   if (lookkolo == null) lookkolo = 0;
   Game.Interactive = false;
   if (lookkolo < 3) lookkolo = lookkolo + 1;
   switch(lookkolo)
   {
      case 1:
         actor.Talk(myvar1);
         break;
      case 2:
         actor.Talk(myvar2);
         actor.TakeItem("kolo");
         Game.ChangeScene("scenes\Blocked\Blocked.scene");
         Game.RemoveWaitCursor();
         break;
      default:
         actor.Talk(myvar3);
           break;         
   }
   Game.Interactive = true;
}


54
Technical forum / How Unload a Window in Following Scene
« on: November 21, 2008, 02:28:18 AM »
I have a window called Box in one scene.  I can't seem to get rid of it in the next scene.

I tried:

Code: WME Script
  1.  
  2.  
  3.  

I also tried:

Code: WME Script
  1. Game.UnLoadWindow("scenes\Greet\Box.window");
  2. Box.Visible = false;
  3.  

Neither work.  :o  Greet is the name of the scene the Box.window object is in.

I see there's a function Close--but don't know how to word the entire command.

If you had a window you wanted to appear globally in most scenes but not all, would you add it in system like the inventory and not in a scene?  Or would the first scene you loaded it in keep it in all the other scenes unless you suppressed it somehow? 


 

55
Technical forum / SetText Function
« on: November 20, 2008, 05:02:27 PM »
Is there a SetText function available that changes the text, for example, on a sign.

Or is there a similar function or method to do that?  I checked the scripting reference and couldn't find that particular one.

If I had a sign and it said "Beer 50 gold" and wanted to change it to "Free beer", what function would do that?

Thanks for any help.


56
Technical forum / Spell System ala DeathGate
« on: November 18, 2008, 07:05:40 AM »
How to implement it.  : )  I could describe it--but if you have played it you know what I mean.

Does it have to be a second inventory or can it be done via a button that sits on top of every scene in a window and calls up spells that can interact with objects in the main game?

57
Technical forum / How Add Window
« on: November 15, 2008, 02:55:14 AM »
I need basic instructions for adding a static image using the Window Editor and having it work in the game.

I read through as many forum posts and the docs online but can't find all the pieces or I'm missing something.  :  )

58
Technical forum / Save Game
« on: November 13, 2008, 05:06:16 AM »
Is there a default file where I can find my save games if I want to delete them? :  )

59
Technical forum / How create an executable file
« on: November 13, 2008, 04:49:30 AM »
I've finished Chapter 9 in the WME book online and have a splendid working game with no script errors and it does what it's supposed to do :  )  ---I worked hard for it--but how do I compile it to an executable file?  I see the button "Compile".  Is that all there is to it? 

I did hit the Compile button but since I saved once while I was testing the file--I seem to be brought to that point when I start the executable and not to the beginning. 

Thanks for any help.

60
Technical forum / Small graphic on each screen
« on: November 04, 2008, 04:08:08 PM »
If you wanted to have a small graphic file appear on each screen (like the inventory box) -- is there a simple method to do that?  And be able to hide it like the inventory box can be hidden?

Pages: 1 2 3 [4] 5

Page created in 0.055 seconds with 19 queries.