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.

Author Topic: Dialogue Window - Solved  (Read 7422 times)

0 Members and 1 Guest are viewing this topic.

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Dialogue Window - Solved
« on: April 25, 2010, 04:20:10 PM »

I have created a dialogue window which in many ways works very well, essentially what happens is that pictures of the main character and the npc are loaded in to picture controls, and the text was loaded into a text control.  Unfortuanately by loading the text into a text box I lost the hard coded functionality in the standard talk statement.  I have managed to code something up to give me a reasonable delay but I cannot work out a way of using the leftclick to speed through the dialogue.

So I then decided to create an object, a talk robot which would use a talkrobot.Talk command to speak, and in order to ensure the correct screen position of the text I was using the subtitlesPosX derived from a window control posX.  Unfortunately  the control posX seems to be a position relative to the window and not the screen.

In my revised talk function I have allowed for the possibility of sending a x value through, but this does not work when I have screens which scroll and actors who may have different positions in which to speak from.

Working on the dangerous assumption that someone can understand the scenario, do any of you have an suggestions, my own thoughts are something along the tracking the screen width, the relative position of the object being spoken to and the position of the actor when he is speaking.

thanks
« Last Edit: May 06, 2010, 02:37:02 PM by eborr »
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Dialogue Window
« Reply #1 on: April 25, 2010, 08:14:01 PM »

have yout tried setting SubtitlesPosRelative to false?
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Re: Dialogue Window
« Reply #2 on: April 25, 2010, 11:59:14 PM »

yes they are set to false
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Dialogue Window
« Reply #3 on: April 26, 2010, 08:51:29 AM »

this is weird. I use similar approach all the time and never got this behavior. Unless we get more info about the actual implementation it's hard to tell...
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Re: Dialogue Window
« Reply #4 on: April 26, 2010, 09:37:07 AM »

OK how about this approach, is the X coordinate of a window control relative to the window, or is relative to the screen ?

When I do a Game.Msg check it always gives the position as it is coded in the window definition irrespective of where the "scene" is behind it.

As I said before the images are positioned nicely, maybe I will do a couple of screen clippings to illustrate the point
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Dialogue Window
« Reply #5 on: April 26, 2010, 10:40:15 AM »

well, nothing stops you from having the window width same as your screen resolution. Would this solve your issue?
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Re: Dialogue Window
« Reply #6 on: April 26, 2010, 01:04:39 PM »

There you have got to the nub of the problem, if I restricted all my scenes to 800x 600 then I would have no problem, but I like the idea of scrolling scenes, ie the problem only really manifests itself when  the actor walks off to the right hand side and comes back
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Dialogue Window
« Reply #7 on: April 26, 2010, 04:17:41 PM »

windows are not affected by scene scrolling. Do you have set InGame attribute as false?
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Re: Dialogue Window
« Reply #8 on: April 26, 2010, 08:48:20 PM »

the non scrolling of the window is what I want, the InGame attribute is set to false.

Can I use the talk method with an entity container ?

that didn't work the method was undefined and I guess defining a method in the entitys script wouldn't work either.

Maybe if I put an entity in the container then that would work - I guess I need to read the documentation on that .
« Last Edit: April 26, 2010, 09:00:47 PM by eborr »
Logged

mylesblasonato

  • Developer
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 265
  • "Give up is to fail as sacrifice is to succeed"
    • View Profile
    • Royal Wins
Re: Dialogue Window
« Reply #9 on: April 29, 2010, 08:33:43 AM »

Hi there eborr :)
I had to code something exactly the same for Shades of Violet. Pretty much I integrated the actor.Talk inside of my own Dialogue.Talk function and I pass nothing into the actor.Talk function and only used it to have the skip text functionality.

I created a class that creates a dialogue window that can position the character portraits to the left, right or center of the screen and all of it is contained in a window which if centered shouldn't give you a problem when scrolling.

That's kind of the jist of it, I would post similiar code but I'm out right now. I could possibly do it tomorrow when I get some time.

Hope that helped a bit :)
Cheers  ::beer
Myles Blasonato.
Logged
Lead Game Designer, Royal Wins.
@mylesblasonato
@royalwins
http://au.linkedin.com/pub/myles-blasonato/26/600/a38

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Re: Dialogue Window
« Reply #10 on: April 29, 2010, 03:03:25 PM »

Myles if you could post your script that would be really handy, this little problem is driving me bonkers
Logged

mylesblasonato

  • Developer
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 265
  • "Give up is to fail as sacrifice is to succeed"
    • View Profile
    • Royal Wins
Re: Dialogue Window
« Reply #11 on: May 02, 2010, 05:31:21 AM »

Hi eborr,
Sorry about the delay but I couldn't find where I put the script file. I haven't used it in a while. It's quite easy to code up again but it's about a days work.
Sorry about that.

Cheers  ::beer
Myles Blasonato.
Logged
Lead Game Designer, Royal Wins.
@mylesblasonato
@royalwins
http://au.linkedin.com/pub/myles-blasonato/26/600/a38

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Re: Dialogue Window - Solved
« Reply #12 on: May 06, 2010, 02:37:49 PM »

Problem has been solved by using an entity container, thanks to those woh offered help
Logged
 

Page created in 0.04 seconds with 21 queries.