Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Writing into the response box?  (Read 4214 times)

0 Members and 1 Guest are viewing this topic.

Kapryagos

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 11
    • View Profile
    • casummer.eu
Writing into the response box?
« on: September 29, 2010, 01:45:50 PM »

Hello, I'm new here. :)

I just started having a look at WME and I wonder: Is it possible to write text into the response box (no response, merely some text introducing the responses)?
What I would like to do would be an RP-style dialogue system like in the the old Black Isle games, rather like a "log" of dialogues.

Thanks for helping me out. :)
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Writing into the response box?
« Reply #1 on: September 29, 2010, 01:50:38 PM »

Yes, absolutely. The response box is a window, so you can edit it in WindowEdit and add any new controls to it. And those are then accessible from scripts.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Kapryagos

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 11
    • View Profile
    • casummer.eu
Re: Writing into the response box?
« Reply #2 on: September 29, 2010, 02:00:49 PM »

Thanks! :)
I'll have to learn understanding how to access it then. The "GetResponsesWindow" command is a bit unclear to me since I don't see how access the actual response box with it. Trying to define a "var dlg = Game.GetResponsesWindow;" within the dialogue function did not work, so I guess with that command I merely pointed to the window itself instead of its response box?  ???
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Writing into the response box?
« Reply #3 on: September 29, 2010, 02:07:02 PM »

You actually want to reference the window. But GetResponsesWindow is a function so the proper syntax would be:

var dlg = Game.GetResponsesWindow();

Once you have the reference to the window, you can access its controls. (var someControl = dlg.GetControl("control name"); )
« Last Edit: September 29, 2010, 05:47:58 PM by Mnemonic »
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Kapryagos

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 11
    • View Profile
    • casummer.eu
Re: Writing into the response box?
« Reply #4 on: September 29, 2010, 02:10:46 PM »

Thank you very much! : D
Logged

Kapryagos

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 11
    • View Profile
    • casummer.eu
Re: Writing into the response box?
« Reply #5 on: October 01, 2010, 10:47:55 PM »

Is it possible that the response box itself is blocked from being manipulated by script?? Because although I manage to manipulate the window itself and all its controls, it seems that it doesn't work to write:

var dlgr = dlgw.GetControl("Response box");

Adding a script to the response box in WindowEdit and either trying the same thing there or using a "this."-pointer didn't work either to maipulate the response box itself.
(All I want to do is changing the Y position of the response box to after my custom text-box above...)

Can you help me?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Writing into the response box?
« Reply #6 on: October 02, 2010, 08:35:40 AM »

No, you can't manipulate the response area itself from scripts.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.044 seconds with 18 queries.