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

Pages: [1] 2
1
Technical forum / Re: Moving things in a curvy motion
« on: February 11, 2012, 09:29:46 PM »
Oh my gosh, this is just perfect!
Thank you sooooooooooo much, metamorphium! :>
It makes everything so much easier! <3

- R.

2
Technical forum / Moving things in a curvy motion
« on: February 10, 2012, 11:55:16 PM »
Hello! =)

So, I kinda got sick of making a cicular/curvy motion frame for frame. =D"
Then I found >this< Thread, but unfortunatly the links are down.
Would somebody mind explaining it to me?
While I tried to overcome my... uhm... dislike for maths, I'm still not too sure how to translate this into WME script.

I'd appreciate your help, it means a lot to me. :>

- R.

3
Technical forum / Re: Creating Mail System
« on: February 04, 2012, 09:21:00 PM »
The vertical bar is supposed to contain the subjects, so that you can choose the mail which will be displayed. =o
(Well, it might really be a little bit narrow. I might make it a little bit wider later.)
Quote
Could you please post an image of the target window example?
The... target window?
What exactly do you want? (Sorry, I'm really, really slow today. Dx)
An image from WindowEdit or the project or a code or...?

Quote
Also do you plan to have more emails than the vertical part can hold? (you'd need up and down arrows for that).
Jop~
I read that WME automatically recognises buttons with the name "up" and "down" or something?
Or is there still some script that's needed to be written?

Thank you for your patience~ :>

- R.

4
Technical forum / Re: Creating Mail System
« on: February 04, 2012, 07:54:31 PM »
It's something you can always access from the menu. =o

5
Technical forum / Re: Creating Mail System
« on: February 04, 2012, 07:44:22 PM »
Ah, when I was talking 'bout the response list, I meant when choosing which mail to send. =o
But using the Dialoge response list would also be practical, as long as you could put it inside the main window.
Is there a way to do this?
Code: WME Script
  1. DisplayInboxEmail(inbboxResponse); // you would have to write this method which would set statics of your window. :)
So... This method contains the fillable statics (from, to etc.) or something else?
I kinda tried this but I'm afrait I failed.
Window script:
Code: WME Script
  1. #include "scripts\base.inc"
  2. #include "scripts\keys.inc"
  3.  
  4. function Inbox()
  5. {
  6.         Game.StartDlgBranch("Inbox");
  7.  
  8.         var inboxResponse = 0;
  9.  
  10.         while (inboxResponse != 1000)
  11.         {
  12.  
  13.                 var numInboxMails = MailSystem.GetIncomingEmailsCount();
  14.  
  15.                 for (var b = 0; b<numInboxMails; b = b+1)
  16.                 {
  17.                 var email = MailSystem.GetIncomingEmail(b);
  18.                 Game.AddResponse(b, email.Subject);
  19.                 }
  20.  
  21.                 Game.AddResponse(1000, "Exit inbox");
  22.  
  23.                 inboxResponse = Game.GetResponse();
  24.  
  25.                 DisplayInboxEmail(inboxResponse); // you would have to write this method which would set statics of your window. :)
  26.  
  27.         }
  28.         Game.EndDlgBranch();
  29. }
  30.  
  31. this.xResult = false;
  32.  
  33. /*
  34. var sender = this.GetControl("sender"); // "from" static
  35. var betreff = this.GetControl("betreff"); // "subject" static
  36. var nWin = this.GetControl("nWin"); // window for "body" [clipped to main window to make the text scrollable]
  37. var nachricht = nWin.GetControl("nachricht"); // "body" static
  38. var ort = this.GetControl("ort"); // "location" static
  39. var bWin = this.GetControl("bWin"); // window for buttons [clipped to main window to make them scrollable]
  40.  
  41. var incomingCount = MailSystem.GetIncomingEmailsCount();
  42. for (var a=0; a<incomingCount; a=a+1)
  43. {
  44.     var email = MailSystem.GetIncomingEmail(a);
  45.     if (email != null)
  46.     {
  47.            sender.Text = email.From;
  48.        betreff.Text = email.Subject;
  49.        nachricht.Text = email.Body;
  50.        ort.Text = email.Location;
  51.     }
  52.  
  53. }
  54. */
  55. Inbox();
  56.  
  57. ////////////////////////////////////////////////////////////////////////////////
  58. on "close"
  59. {
  60.   this.Close();
  61. }
  62. ////////////////////////////////////////////////////////////////////////////////
  63.  
Method, in the mailsystem:
Code: WME Script
  1.  
  2. method DisplayInboxEmail(inboxResponse)
  3. {
  4.        
  5.         var mailWin = Game.LoadWindow("interface/mails/mails_main.window");
  6.         var sender = mailWin.GetControl("sender"); // "from" static
  7.         var betreff = mailWin.GetControl("betreff"); // "subject" static
  8.         var nWin = mailWin.GetControl("nWin"); // window for "body" [clipped to main window to make the text scrollable]
  9.         var nachricht = nWin.GetControl("nachricht"); // "body" static
  10.         var ort = mailWin.GetControl("ort"); // "location" static
  11.         var bWin = mailWin.GetControl("bWin"); // window for buttons [clipped to main window to make them scrollable]
  12.        
  13.         var incomingCount = MailSystem.GetIncomingEmailsCount();
  14.         for (var a=0; a<incomingCount; a=a+1)
  15.         {
  16.                 var email = MailSystem.GetIncomingEmail(a);
  17.                 if (email != null)
  18.                 {
  19.                 sender.Text = email.From;
  20.                 betreff.Text = email.Subject;
  21.                 nachricht.Text = email.Body;
  22.                 ort.Text = email.Location;
  23.                 }
  24.         }
  25.  
What is the right way? =o

- R.

6
Technical forum / Re: Creating Mail System
« on: February 04, 2012, 06:08:40 PM »
metamorphium, you are godlike.
I never thought of making so many methods but it really seems to make sense here!
(Learned something again. <3)

Ah, I have a question though. =o
How do you make a... list of buttons that links to the mails?
I have this problem with a few scripts because I don't have a clue how to do this.

Ignore the graphics, it's still work in progress.
So, what I want to archive is to create a button with the subject as text - I guess these buttons can be created by script when adding a new mail [in the method?] but I don't know how add them in a way that they are ordered vertically.
(You know, like a vertical list.
Button 1
Button 2
Button 3)

Well, don't know if needed, but this is the window script:
Code: WME Script
  1. #include "scripts\base.inc"
  2. #include "scripts\keys.inc"
  3.  
  4. this.xResult = false;
  5.  
  6. var sender = this.GetControl("sender"); // "from" static
  7. var betreff = this.GetControl("betreff"); // "subject" static
  8. var nWin = this.GetControl("nWin"); // window for "body" [clipped to main window to make the text scrollable]
  9. var nachricht = nWin.GetControl("nachricht"); // "body" static
  10. var ort = this.GetControl("ort"); // "location" static
  11. var bWin = this.GetControl("bWin"); // window for buttons [clipped to main window to make them scrollable]
  12.  
  13. var incomingCount = MailSystem.GetIncomingEmailsCount();
  14.  
  15. for (var a=0; a<incomingCount; a=a+1)
  16. {
  17.     var email = MailSystem.GetIncomingEmail(a);
  18.     if (email != null)
  19.     {
  20.            sender.Text = email.From;
  21.        betreff.Text = email.Subject;
  22.        nachricht.Text = email.Body;
  23.        ort.Text = email.Location;
  24.     }
  25.  
  26. }
  27.  
  28. ////////////////////////////////////////////////////////////////////////////////
  29. on "close"
  30. {
  31.   this.Close();
  32. }


Also, thanks again for your help! <3
Don't know what I'd do without you, and your scripting is a huge inspiration for the future. :>

- R.

7
Technical forum / Re: Creating Mail System
« on: February 03, 2012, 06:59:48 AM »
Hello, dear. =)

Actually, both.
It would be nice if you could use the response thingy (or something) to choose one from the options what to answer.
(Guess the process would be stored in a variable? So, if you get the first mail of a topic, the var is = 1, then you have two choices, and so the var gets to be either 2 or 3. Something like this?)

- R.

8
Technical forum / Creating Mail System
« on: February 02, 2012, 06:15:12 PM »
Hey there, again! =D

Since mailing is kinda essential in my game I started to write the... thingy.
But then I noticed that because of my lack of experience I don't know which way is the best.
I kinda tried out this method to fill the window statics:
Code: WME Script
  1. method Mails(Absender, Location, Titel, Inhalt)
  2. {
  3.         var mWin = Game.LoadWindow("interface/mails/mails_main.window"); // load the mail window
  4.         var mSender = mWin.GetControl("sender");
  5.         var mBetreff = mWin.GetControl("betreff");
  6.         var mOrt = mWin.GetControl("ort");
  7.         var mBild = mWin.GetControl("icon");   
  8.        
  9.         var nWin = mWin.GetControl("nWin");
  10.         var mNachricht = nWin.GetControl("nachricht");
  11.                
  12.         var sender = Absender;
  13.        
  14.         mBild.SetImage("interface/mails/icons/"+sender+".png");
  15.        
  16.         mSender.Text = Absender;
  17.         mOrt.Text = Location;
  18.         mBetreff.Text = Titel;
  19.         mNachricht.Text = Inhalt;
  20. }
Which was fine.
But I don't know how to save this - using variables?
I also tried out working with arrays in the window script but this just got messy.

How would you go on about this?
(Or is there already a script like this and I overlooked it?)
I know that it might be early for me to try something like this but I don't have a programmer - and since I gotta do this stuff myself anyway I might as well start.

I'd really appreciate your input!

- R.

9
HURRAY! <3

Solved it. :>

Forgot the "this" in
Code: WME Script
  1. "laune = this.Stimmung"
And, of course, it's gotta be
Code: WME Script
  1. dlgWindow.Inhalt = Inhalt;
and so on.

I believe I'll be fine from here on.

Thank you both very much - I'm a beginner and really slow when it comes to logic and scripting, but thanks to you I managed to get my textbox and I learned a lot from it! =)
You're both amazing, thank you for your patience! <3

- R.

10
Oh, damn.
I knew I would make such a stupid mistake today. /headdesk
I accidentally changed the GetControl to the ExpandedString instead of the lettera/letterb variable. x_X
Okay, it looks like this now:
Code: WME Script
  1. #include "scripts\base.inc"
  2. #include "scripts\keys.inc"
  3.  
  4. // the other script wants us to do the magic
  5. on "Reden"
  6. {
  7.   // notice that you can access the properties passed by the original script using this.SomeProperty notation
  8.  
  9.         var laune;
  10.         if (this.Stimmung == null) laune = "norm1";
  11.         else laune = Stimmung;
  12.        
  13.         var text1 = this.Inhalt;
  14.         var note1 = this.Notiz;
  15.  
  16.         //this.SetImage("ui_elements/talk/"+laune+".png");
  17.         this.SetImage("ui_elements/talk/norm1.png");
  18.  
  19.         var textbox = this.GetControl("text");
  20.         var notebox = this.GetControl("note");
  21.                
  22.         notebox.Text = "";
  23.         textbox.Text = "";
  24.         var lettera = new String(Game.ExpandString(text1));
  25.         for (var i = 0; i < lettera.Length; i = i + 1)
  26.         {
  27.                 textbox.Text = textbox.Text + lettera.Substr(i, 1);
  28.                 Sleep(50);
  29.         }
  30.                
  31.         var letterb = new String(Game.ExpandString(note1));
  32.         for (var j = 0; j < letterb.Length; j = j + 1)
  33.         {
  34.                 notebox.Text = notebox.Text + letterb.Substr(j, 1);
  35.                 Sleep(50);
  36.         }
  37. }
So, the variables note1 and text1 are supposed to store the information (the text) given to the parameters Notiz and Inhalt in the method.
Current problem is:
Code: [Select]
00:15: Compiling script 'interface\talk\norm1.script'...
00:15:   Error@line 11: Variable 'Stimmung' is referenced but not defined

Thank you for your help, I really overlooked it.

- R.

11
Quote
would be the best if you post the scripts which are troubling you.
Ah. Yes, yes - of course!
(Just how could I forget that?)
Okay, this is the Talkscript, it's attached to the actor:
Code: WME Script
  1. method Talk(Inhalt,Notiz,Stimmung)
  2. {
  3.  
  4.         // load the window
  5.         var dlgWindow = Game.LoadWindow("interface/talk/norm1.window");
  6.  
  7.         // fill in the required dialog properties
  8.         dlgWindow.Inhalt = "text";
  9.         dlgWindow.Stimmung = "normal"; // the name of the main window
  10.         dlgWindow.Notiz = "note";
  11.  
  12.         // init the window and start the text display
  13.         dlgWindow.ApplyEvent("Reden");
  14.  
  15.         // this is crucial, it will pause this script until the window closes
  16.         dlgWindow.GoExclusive();
  17.  
  18.         // we're done, unload
  19.         Game.DeleteWindow(dlgWindow);
  20. }
And that's the window script:
Code: WME Script
  1. #include "scripts\base.inc"
  2. #include "scripts\keys.inc"
  3.  
  4. // the other script wants us to do the magic
  5. on "Reden"
  6. {
  7.   // notice that you can access the properties passed by the original script using this.SomeProperty notation
  8.  
  9.         var laune;
  10.         if (this.Stimmung == null) laune = "norm1";
  11.         else laune = Stimmung;
  12.        
  13.         var text1 = this.Inhalt;
  14.         var note1 = this.Notiz;
  15.  
  16.         //this.SetImage("ui_elements/talk/"+laune+".png");
  17.         this.SetImage("ui_elements/talk/norm1.png");
  18.  
  19.         var textbox = this.GetControl(Game.ExpandString(text1));
  20.         var notebox = this.GetControl(Game.ExpandString(note1));
  21.                
  22.         notebox.Text = "";
  23.         textbox.Text = "";
  24.         var lettera = new String(text1);
  25.         for (var i = 0; i < lettera.Length; i = i + 1)
  26.         {
  27.                 textbox.Text = textbox.Text + lettera.Substr(i, 1);
  28.                 Sleep(50);
  29.         }
  30.                
  31.         var letterb = new String(note1);
  32.         for (var j = 0; j < letterb.Length; j = j + 1)
  33.         {
  34.                 notebox.Text = notebox.Text + letterb.Substr(j, 1);
  35.                 Sleep(50);
  36.         }
  37. }

Alright, changed it, thank you, metamorphium. :>

- R.

12
Alright, the event starts now, but the method parameters are not defined.
(Guess that's the dlgWindow.ParameterHere thingy?)
We are nearly there, thank you for the help. :>

- R.

13
Ah, this makes sense!
Thanks. :>

Code: [Select]
// fill in the required dialog properties
dlgWindow.Inhalt = "whatever";
But I don't quite understand that part - is "whatever" the name of the static, or something else? =o [Variables?]
<= Well, probably it's something else as I couldn't get it to work? The window doesn't seem to understand that the event occured.
And the first piece of code is still in a "methode Talk(parameter)"-thingy, or isn't it?

- R.

14
Alrighty, some things worked. <3
The speechbubble works nearly perfectly now, only problem is still the auto-close.
(I thought that it might would work with the on LeftClick thingy, but this wasn't the case.)
Anyone got an idea how to make it work?
Code: WME Script
  1. #include "scripts\base.inc"
  2.  
  3. method Talk(Inhalt,Notiz,Stimmung)
  4. {
  5.                 var text1 = Inhalt;
  6.                 var note1 = Notiz;
  7.                 var laune;
  8.         if (Stimmung == null) laune = "norm1"; // basic window, right side
  9.         else
  10.         laune = Stimmung; // andere
  11.  
  12.         var dlgWin = Game.LoadWindow("interface/talk/norm1.window"); // load the dialogue window
  13.         dlgWin.SetImage("ui_elements/talk/"+laune+".png");
  14.         dlgWin.Y = 250;
  15.         var textbox = dlgWin.GetControl("text");
  16.         var notebox = dlgWin.GetControl("note");
  17.                
  18.         notebox.Text = "";
  19.         textbox.Text = "";
  20.         var lettera = new String(text1);
  21.         for (var i = 0; i < lettera.Length; i = i + 1)
  22.                 {textbox.Text = textbox.Text + lettera.Substr(i, 1);
  23.                 Sleep(50);}
  24.                        
  25.         var letterb = new String(note1);
  26.         for (var j = 0; j < letterb.Length; j = j + 1)
  27.                 {notebox.Text = notebox.Text + letterb.Substr(j, 1);
  28.                 Sleep(50);}                                                  
  29.                
  30.         Game.UnloadObject(dlgWin)// dispose of the window   
  31. }
Also, for the ones that might want to use it:
"Inhalt" (engl.: "content") is a static in the window named "text" and also the maintext in the box.
"Notiz" (engl.: "note") is a static named "note" and is below the speechbubble to make it seem like it was whispered.
"Stimmung" (engl.: "mood") is the background image of the window.

So, once the auto-close is gone it's perfect. x3
Thank you all for the help so far. :>

- R.

15
I looked at your code again, Mnemonic, and I got the letter-by-letter to work. <3
Thank you. :>
Now I just need to correct the auto-close~
This just... suddenly worked?
Oh, it just died again.

Also, the text (first parameter, "Inhalt") is not only displayed in the static/the speechbubble, but also at the top left corner of the screen.
Guess this happened since I overwrote the talk methode?
I there a way to fix that?

- R.

PS. This is by far the most supportive board I've ever been in - thank you. x3

Pages: [1] 2

Page created in 0.188 seconds with 21 queries.