Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Pages: 1 [2]  All

Author Topic: How Add Window  (Read 11018 times)

0 Members and 1 Guest are viewing this topic.

sychron

  • Wanderer zwischen den Welten
  • Global Moderator
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 223
  • There is no spoon. The enemy gate is down!
    • View Profile
Re: How Add Window
« Reply #15 on: November 18, 2008, 12:25:29 PM »

Use DialogBranches / Dialog functions to store the topics. The WME Book gives an outline of this.
Logged
... delete the inner sleep ...

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: How Add Window
« Reply #16 on: November 18, 2008, 04:18:25 PM »

Thanks, Sychron, I appreciate your help but I don't know how to do that with the setup I have.  I have my talk topic on a button.

For example,
"Hi, how are you."

Button has a name in the window editor  Button1

Player depresses that, then the response should show up in the static control on the upper right.  Static control has a name in the window editor  Textbox.

"I'm fine."

I don't know where to put the script to invoke the appearance of the text in the static control or what script to put there.

There are now 3 buttons--each one should invoke its own text to appear in the static control and player does not have to click on any one in any order to get the text for that button to show up.

I'll keep trying.  I don't think I understand completely how the engine uses the responses.def file.
« Last Edit: November 18, 2008, 04:44:39 PM by Catacomber »
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: How Add Window
« Reply #17 on: November 18, 2008, 08:14:53 PM »

I figured out how to do this so it works for me.  I know there's a subtler more sophisticated method but since I'm a very new newbie, I'm just happy to have this work and to understand it. 

Since it might help someone else, I'm going to post what I did. I followed Organican's instructions for making a subtitle box.  It might also help the more knowledgeable people give me some tips on a better way to do it. If you don't think it's at all helpful, you can delete it.  :  )

I put a global in my little game's script base.scripts called "text".

I made a window in the scene where this all is to occur and called the window Box.

I attached one script to Box.  That says: 

#include "scripts\base.inc"
var Win = this.Parent;

Then I made a button "Topic" in the bottom left of the Window. 
Parent notify True
Text "How are you?"
Font Franklin
Text Aligned Left
Disabled False
Visible True
Pressed True
etcetera

To that button I attached a script I added by hitting scene add script called Topic:

#include "scripts\base.inc"

var Topic = this.Button;

on "LeftClick"
{
text="I'm fine. How are you?";
}


Then I made another button under that one in the bottom left for the second talk topic:
Parent notify True
Text "Tell me about the missing spell books."
Font Franklin
Text Aligned Left
Disabled False
Visible True
Pressed True
etcetera

Attached script same way called Topic2:

#include "scripts\base.inc"
var Topic = this.Button;
on "LeftClick"
{
text="Strange things are happening in the palace.";
}

Then on the upper right side I made a third button instead of a static object.

Called this button Text
Parent notify True
Text "This is where you will see the response. (Although I could probably leave this blank-haven't tried yet.)"
Font Franklin
Text Aligned Left
Disabled True
Visible True
Pressed False
etcetera

To that button I attached the script -- same way as before via scenes add script:

Text

#include "scripts\base.inc"

var Text = this.Button;

while(true)
{ this.Text=text;
Sleep(300);
}


Now when the player presses a talk topic on the bottom, the responsive answer shows up in the box on the right---and I still have my nice picture in a static on the left.

If anyone can improve on this or shorten it, please do.

Thank you all for your help----eventually I'll understand the better way to do this.   :D

« Last Edit: November 18, 2008, 08:24:52 PM by Catacomber »
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: How Add Window
« Reply #18 on: November 18, 2008, 11:25:51 PM »

The only problem with this is that [null] appears on the screen in the response box until I've left clicked on the talk topic.  Is there a way to get rid of that without putting some code in the prior scene when changing scense to put some text there?
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: How Add Window
« Reply #19 on: November 19, 2008, 04:39:07 AM »

Cat, for this you need exactly one window. You can even use the stock responses.def to boot. Simply put another static component to the right (the huge flowing text) and one static (or entity container) for the person's face. The rest is just background imagery. :)

I'd like to try this again but I still need some help to do it the way Metamorphium suggests.

By "the rest is just background"--does that mean that the questions (I call them talk topics) at the bottom, would be part of the background--drawn in with Text Art and regions put around each one that would trigger on left click the right static box to display the responses? 

I tried opening response def in my window but i then couldn't load the window--game wouldn't let me.

How do you open response def in a window? 

If I take this one step at a time maybe I can do the sleek way of doing this.  But I need some help here. : )

« Last Edit: November 19, 2008, 06:38:13 AM by Catacomber »
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: How Add Window
« Reply #20 on: November 19, 2008, 11:02:57 AM »

Cat, please send me a link (pm) to some minimalistic repro project, I'll look into it for you.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: How Add Window
« Reply #21 on: November 19, 2008, 04:05:42 PM »

Thanks, I can send it tonight. There isn't much in there yet but I did set up the window--2 static screens and a button at the bottom on the left and some script for the window and the button.  I took the responses.def out of the window as I just couldn't get the window to load otherwise.  Thank you very much for any help.
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: How Add Window
« Reply #22 on: November 20, 2008, 03:22:18 AM »

I sent the link.  Thanks, Metamorphium.
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  
Pages: 1 [2]  All
 

Page created in 0.047 seconds with 20 queries.