Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Pages: 1 [2]  All

Author Topic: Making a notepad interface  (Read 18514 times)

0 Members and 1 Guest are viewing this topic.

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:Making a notepad interface
« Reply #15 on: December 26, 2003, 09:42:17 AM »

I'm glad to hear that :)
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

deadworm222

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 197
  • Wintermute Army
    • View Profile
Re:Making a notepad interface
« Reply #16 on: January 02, 2004, 04:24:07 PM »

I have a problem with the notepad system, once again. Everything else works, but...

I have three separate windows - Locations, Events and Characters. Now, when I talk to a person, and choose [Consult Notepad], the Characters-window appears by default. In each window are buttons that open the other windows. Now, if I don't want to ask about anything in the Characters window, I should be able to choose either the Events or locations window - and this works - but because the code looks like this

Code: [Select]

if(Selected==4)
      {

Loop=false;
Game.Interactive = true;
WinCharacters.GoExclusive();

Game.Interactive=false;

if(question=="1")
{
WinCharacters.CrossOutNote(1);//removes the first note

actor.Talk("Ask about the first note");


}






if(question=="2")
{

WinCharacters.CrossOutNote(2);
actor.Talk("ask about the second note");





}


if(question=="3")
{
WinCharacters.CrossOutNote(3);
actor.Talk("ask bout the third note");

}

if(question=="4")
{

WinCharacters.CrossOutNote(4);

actor.Talk("fourth note");

}


OldGuyDialogue();//after asking, go back to dialogue


...the Locations/Events window opens AND the OldGuyDialogue() script is executed, thus displaying the dialogue choices and making the screen a mess.

I tried a different method: I created one window called Notepad, and made Characters/Loacations/Events sort of sub-windows (if real subwindows can be created, I don't know how). Within the Notepad-window I could have switched between the different sub-windows  - but this didn't work, as the only way to open a window is the GoExclusive, and when another window is opened on top of the Notepad window, it makes the controls in Notepad-window unaccessible.

In my mind a few ideas are forming, but... do you have any ideas?
Logged

deadworm222

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 197
  • Wintermute Army
    • View Profile
Re:Making a notepad interface
« Reply #17 on: January 02, 2004, 07:34:49 PM »

Never mind: the notepad interface is now fully functioning! :D
Logged

MMR

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 349
  • http://mmrdeveloper.wordpress.com/
    • View Profile
    • TinyWME
Re:Making a notepad interface
« Reply #18 on: January 02, 2004, 08:19:04 PM »

When will you show us something of that???

I'm eager!!  ;D
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:Making a notepad interface
« Reply #19 on: January 02, 2004, 10:03:11 PM »

Never mind: the notepad interface is now fully functioning! :D


Great, you were faster than me :) How did you fix it?
About the sub-windows, it should be possible, i.e. to nest a WINDOW definition infor other window, but I found it's broken :( It will be fixed in the next build.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

deadworm222

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 197
  • Wintermute Army
    • View Profile
Re:Making a notepad interface
« Reply #20 on: January 03, 2004, 10:08:45 AM »

Sorry, MMR, I'm under a wov of silence ;) . If everything goes well, you don't have to wait too long for a playable demo. Have you visited the teaser site? http://www.foreverdreamstudios.com/games.html

Instead of making the buttons  open a window, I made them assign a value to a global variable (which I cleverly named go_on, don't ask me why); like go_on="characters", go_on="events", go_on="locations". Then, in the dialogue script:

Code: [Select]
if(Selected==4)
{

Loop=false;
Game.Interactive = true;
WinCharacters.GoExclusive();

for(var f=0; go_on!="go_on"; f=f+1)
{
if(go_on=="characters") WinCharacters.GoExclusive();
if(go_on=="events") WinEvents.GoExclusive();
if(go_on=="locations") WinLocations.GoExclusive();
}

if(go_on=="go_on")
{
//we have selected a note, and an appropriate response will be heard

Now it's stuck in the loop, until go_on=="go_on" - whic happens if you close the window or you click on a note that begins a dialogue. Phew!
Logged

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 301
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Making a notepad interface
« Reply #21 on: December 31, 2010, 08:55:23 AM »

Can anyone post a working sample project of this  technique? Thanks
Logged
Pages: 1 [2]  All
 

Page created in 0.045 seconds with 20 queries.