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

Pages: 1 [2] 3 4 5
16
Hi Indra Anagram  :)

Quote
1. Where do I specify SubtitlesPosXetc.? What file should it be in?
Let me show you an example. Open your speaker.script and write something like this:

Code: WME Script
  1. #include "scripts\base.inc"
  2. this.SubtitlesPosRelative = false;
  3. this.SubtitlesPosX = 250;
  4. this.SubtitlesPosY = 500;
  5. this.SubtitlesWidth = Game.Width - 100;
  6. this.SubtitlesPosXCenter = center.

Quote
2. How do I play the voice file at the same time with the text being on screen?

You should use Talk method. See what does documentation say:

Talk(Text, SoundFilename, Duration, TalkStances, TextAlignment)
TalkAsync(Text, SoundFilename, Duration, TalkStances, TextAlignment)

Makes the object talk.
Parameters :

Text

A text to be used as a talk subtitle

SoundFilename
A filename of a sound file to be used (oprtional, default is no sound)


Duration
A subtitle duration in milliseconds (optional, default is 0)

TalkStances
A comma separated list of talk "stances" to be used for the talking (optional, default is random stances)

TextAlignment

A text alignment for the subtitle (0-left, 1-right, 2-center) (optional, default=2) 

Remarks
Talk method blocks the script execution until the animation is over, while the TalkAsync method returns immediately. If the duration is set to zero, it's calculated automatically either from the sound file or from the length of the subtitle.

17
Hi guys  :)

Quote
1. What is the easiest and smoothest way to create a scene with just text on screen and voice behind, maybe with some background image or just against black screen? I found an advice about making a text window and then unloading it, but what about text AND voice (talk)?

As anarchist wrote you can do it with window. But be sure there is also other way how to achieve this.
1. Add new entity to your project, for example entities\speaker\speaker.entity
You can set subtitles possition as you wish.
If you want to have an invisible entity you can use only one bitmap with pink color. This makes the sprite invisible.

SubtitlesPosRelativeSpecifies whether the SubtitlesPosX and SubtitlesPosY attributes are relative to default position, or absolute screen coordinates
SubtitlesPosXThe X position of speech subtitles (either relative to speaker's position or absolute screen coordinates)
SubtitlesPosYThe Y position of speech subtitles (either relative to speaker's position or absolute screen coordinates)
SubtitlesWidthWidth of speech subtitles. Set to zero to restore the default behavior.
SubtitlesPosXCenterSpecifies if the SubtitlesPosX attribute affects the center of the subtitle or its left side.
For futher information see WME Documentation, section Scripting in WME, Script language reference and at last Entity object.

Now open your scene_init.script and load your entity to your current scene. Note: you don´t need to unload entity from memory because when you leave current scene the game will unload your entity automatically.

Code: WME Script
  1. // we want an invisible speaker
  2. var entSpeaker = Scene.LoadEntity("entities\speaker\speaker.entity");
  3. entSpeaker.Talk("Hi Indra Anagram, how are you today?");

18
Technical forum / Re: Change description text location
« on: November 21, 2017, 01:11:58 PM »
Hello  :)

Quote
I was wondering if there's a way to change the Y cordinate and make this text appear much lower on the screen

Of course, there is a way how to manipulate with text possition when you want to use one item with another. Please, open game_loop.script.

Code: WME Script
  1. #include "scripts\base.inc"
  2.  
  3. global WinCaption;
  4. global WinMenu;
  5.  
  6. // infinite loop
  7. while(true){
  8.  
  9.   // save the active object for later
  10.   var ActObj = Game.ActiveObject;
  11.  
  12.   // handle the standard foating caption
  13.   if(Game.Interactive && ActObj!=null)
  14.   {
  15.     if (Game.SelectedItem==null)
  16.     {
  17.       WinCaption.X = Game.MouseX;
  18.       WinCaption.Y = Game.MouseY + 20;
  19.       WinCaption.TextAlign = TAL_LEFT;
  20.       WinCaption.Text = ActObj.Caption;
  21.  
  22.       // keep the caption on screen
  23.       WinCaption.SizeToFit();
  24.       if(WinCaption.X + WinCaption.Width > Game.ScreenWidth) WinCaption.X = Game.ScreenWidth - WinCaption.Width;
  25.       if(WinCaption.Y + WinCaption.Height > Game.ScreenHeight) WinCaption.Y = Game.ScreenHeight - WinCaption.Height;
  26.     }
  27.     // handle the caption when you want to use an object with another
  28.     // this is what you need so you can try changing X or Y coordinates by  yourself
  29.     else {
  30.       var Item = Game.SelectedItem;
  31.  
  32.       WinCaption.X = 0;
  33.       WinCaption.Y = 580;
  34.       WinCaption.Width = Game.ScreenWidth;
  35.       WinCaption.TextAlign = TAL_CENTER;
  36.       WinCaption.Text = "Use " + Item.Caption + " with " + ActObj.Caption;
  37.     }
  38.     WinCaption.Visible = true;
  39.     WinCaption.Focus();
  40.   }
  41.   else WinCaption.Visible = false;
  42.  
  43.   // go to sleep for 20 miliseconds to allow the engine to perform other tasks
  44.   Sleep(20);
  45. }
  46.  

Let´s have a closer look on this piece of code:
Code: WME Script
  1. // handle the caption when you want to use an object with another
  2.     // this is what you need so you can try changing X or Y coordinates by  yourself
  3.     else {
  4.       var Item = Game.SelectedItem;
  5.  
  6.       WinCaption.X = 0;
  7.       // change this value
  8.       WinCaption.Y = 580;
  9.       WinCaption.Width = Game.ScreenWidth;
  10.       WinCaption.TextAlign = TAL_CENTER;
  11.       WinCaption.Text = "Use " + Item.Caption + " with " + ActObj.Caption;
  12.     }
  13.     WinCaption.Visible = true;
  14.     WinCaption.Focus();
  15.   }

19
Technical forum / Re: Inventory and response area always on top
« on: November 17, 2017, 09:50:22 PM »
How nice to see that I could help you  :)

20
Technical forum / Re: Inventory and response area always on top
« on: November 17, 2017, 09:42:11 PM »
So now it works like your want?

21
Technical forum / Re: Inventory and response area always on top
« on: November 17, 2017, 09:15:50 PM »
You're welcome  :) It is really great to see new active WME user  :)

22
Technical forum / Re: Inventory and response area always on top
« on: November 17, 2017, 09:03:52 PM »
Hello,
I am away by my notebook where I have demo prepared for you. I am going to upload it on Dropbox tomorrow and share it with you  :)

23
Technical forum / Re: Inventory and response area always on top
« on: November 17, 2017, 08:32:38 PM »
Hello,
I am sorry I made a mistake. I tested my game and it worked well. Inventory window is always visible but when game is set to Game.Interactive = false; inventory window is covered with inventory dark. When I try to talk with oldguy in WME demo inventory window is invisible and I can see only responses window. When responses window is no visible I see inventory dark window. When dialog is gone inventory normal window is visible.
I am so sorry for my bed English  ::)

24
Technical forum / Re: Inventory and response area always on top
« on: November 17, 2017, 05:45:28 PM »
Quote
Because I want the inventory become darkened (change background) during scripted things, I guess InventoryWindow.SetImage should be used with

You can get the reference to inventory window by this way:
Code: [Select]
global WinInventoryWindow = Game.GetInventoryWindow();
But how to solve your problem? See my solution:

game.script
Code: WME Script
  1. // we need to store reference to window in global variable because we will use it in other script
  2. // inventory dark window does exist, but it is not visible
  3. global InventoryWinDark = Game.CreateWindow();
  4. InventoryWinDark.SetImage("interface\inventory_dark.sprite");
  5. InventoryWinDark.X = 0;
  6. InventoryWinDark.Y = 510;

game_loop.script
Code: WME Script
  1. #include "scripts\base.inc"
  2.  
  3. global InventoryWinDark;
  4. global WinCaption;
  5. global WinMenu;
  6.  
  7. // infinite loop
  8. while(true){
  9.  
  10.   // save the active object for later
  11.   var ActObj = Game.ActiveObject;
  12.  
  13.   // handle the standard foating caption
  14.   if(Game.Interactive && ActObj!=null)
  15.   {
  16.     if (Game.SelectedItem==null)
  17.     {
  18.       WinCaption.X = Game.MouseX;
  19.       WinCaption.Y = Game.MouseY + 20;
  20.       WinCaption.TextAlign = TAL_LEFT;
  21.       WinCaption.Text = ActObj.Caption;
  22.  
  23.       // keep the caption on screen
  24.       WinCaption.SizeToFit();
  25.       if(WinCaption.X + WinCaption.Width > Game.ScreenWidth) WinCaption.X = Game.ScreenWidth - WinCaption.Width;
  26.       if(WinCaption.Y + WinCaption.Height > Game.ScreenHeight) WinCaption.Y = Game.ScreenHeight - WinCaption.Height;
  27.       }
  28.     // handle the caption when you want to use an object with another
  29.     else {
  30.       var Item = Game.SelectedItem;
  31.  
  32.       WinCaption.X = 0;
  33.       WinCaption.Y = 580;
  34.       WinCaption.Width = Game.ScreenWidth;
  35.       WinCaption.TextAlign = TAL_CENTER;
  36.       WinCaption.Text = "Use " + Item.Caption + " with " + ActObj.Caption;
  37.     }
  38.     WinCaption.Visible = true;
  39.     WinCaption.Focus();
  40.   }
  41.   else WinCaption.Visible = false;
  42.  
  43.   // this is what we need
  44.   if(Game.Interactive==false && Game.ResponsesVisible == false)
  45.   {
  46.     WinInventoryWinDark.Visible = true;
  47.   }
  48.   else
  49.     WinInventoryWinDark.Visible = false;
  50.  
  51.   // go to sleep for 20 miliseconds to allow the engine to perform other tasks
  52.   // it is important for the "endless" scripts to call the Sleep command, otherwise the game will get stuck
  53.   Sleep(20);
  54. }

 :)

25
Technical forum / Re: Inventory and response area always on top
« on: November 17, 2017, 10:00:37 AM »
Hi Indra Anagram,
here you are: https://www.dropbox.com/s/636g98o4ktdal48/IndraAnagram.zip?dl=0

I hope it will help to solve your problems.

26
Technical forum / Re: Inventory and response area always on top
« on: November 17, 2017, 01:04:47 AM »
Hi muties,
please, download this file: https://www.dropbox.com/s/6mz8frfvo1bzs6t/IndraAnagram.rar?dl=0

I hope it will help  :)

27
Technical forum / Re: Pause during actions
« on: October 22, 2017, 07:53:47 AM »
Hi,
your script should work but be sure you have to call Sleep() - first letter is upper case - function instead of sleep() because this function od not defined in Wintermute Engine.

28
Obecné fórum / Face Noir - Preklad hry [HOTOVO]
« on: August 22, 2017, 12:51:08 PM »
Ahoj,
rozhodol som sa pripraviť pre záujemcov slovenský preklad do hry Face Noir.
Aktuálne informácie a taktiež stav prekladu môžete sledovať na tejto stránke: https://prekladyher.eu/preklady/face-noir.397/



29
Všetky relevantné informácie o preklade hry Art of Murder: FBI Confidential a taktiež patchi, ktorý zlepšuje plynulosť hry, si môžete prečítať na tento stránke: https://prekladyher.eu/preklady/art-of-murder-fbi-confidential.415/

30
Game announcements / Re: Five magical amulets for iPhone/iPad
« on: May 17, 2017, 10:18:38 PM »
Quote
Translating the hints is not trivial, it took me quite a while for the german version. I've asked Mnemonic for help on the czech version, because I could not do the translation by myself. Although I thought about releasing the czech version with english hints, I don't really want to.
I understand you very well. I believe Mnemonic will help you because he is wonderful  :) 


Quote
Once I have something, would you be willing to test the czech version before release?
Thank you very much for your offer. I have never played this game to end. Maybe somebody else can help you  :)

Pages: 1 [2] 3 4 5

Page created in 0.049 seconds with 24 queries.