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: Icon based dialogues  (Read 12705 times)

0 Members and 1 Guest are viewing this topic.

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Icon based dialogues
« on: September 16, 2006, 08:21:20 PM »

Hi,

I quickly threw together an universal object for icon based dialogues. Feel free to use it, misuse it, change it or throw it out and away.

http://wiki.dead-code.org/wakka.php?wakka=IconBased
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

The Man

  • Occasional poster
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 67
    • View Profile
Re: Icon based dialogues
« Reply #1 on: April 15, 2008, 07:21:41 PM »

Damn...I don't know what I'm doing...I tried to use this method,but it didn't work...It gives me a lot of errors like:

20:09: CUIWindow::LoadFile failed for file 'windows\dialogueWindow.window'
20:09: Runtime error. Script 'scripts\dialogueObject.script', line 21
20:09:   Call to undefined method 'AttachScript'. Ignored.
20:09: Runtime error. Script 'scripts\dialogueObject.script', line 42
20:09:   Call to undefined method 'CreateButton'. Ignored.
20:09: Runtime error. Script 'scripts\dialogueObject.script', line 46
20:09:   Call to undefined method 'SetImage'. Ignored.
20:09: Runtime error. Script 'scripts\dialogueObject.script', line 47
20:09:   Call to undefined method 'SetHoverImage'. Ignored.
20:09: Runtime error. Script 'scripts\dialogueObject.script', line 42
20:09:   Call to undefined method 'CreateButton'. Ignored.
20:09: Runtime error. Script 'scripts\dialogueObject.script', line 46
20:09:   Call to undefined method 'SetImage'. Ignored.
20:09: Runtime error. Script 'scripts\dialogueObject.script', line 47
20:09:   Call to undefined method 'SetHoverImage'. Ignored.
20:09: Runtime error. Script 'scripts\dialogueObject.script', line 42
20:09:   Call to undefined method 'CreateButton'. Ignored.
20:09: Runtime error. Script 'scripts\dialogueObject.script', line 46
20:09:   Call to undefined method 'SetImage'. Ignored.
20:09: Runtime error. Script 'scripts\dialogueObject.script', line 47
20:09:   Call to undefined method 'SetHoverImage'. Ignored.

And how my entity script should look like?
I could give up and use the standard dialogues method...but I want it!I want the icons!
Help me out...
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: Icon based dialogues
« Reply #2 on: April 15, 2008, 07:31:45 PM »

seems you don't have any dialogue window file? You need just a simple window which will be used as a container for icons.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

The Man

  • Occasional poster
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 67
    • View Profile
Re: Icon based dialogues
« Reply #3 on: April 15, 2008, 08:17:26 PM »

Yes,I didn't have it! I solved it,but I still don't know how my entity script should look like...
Can you give me a short example?
Logged

The Man

  • Occasional poster
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 67
    • View Profile
Re: Icon based dialogues
« Reply #4 on: April 16, 2008, 10:59:09 AM »

Ehm...no one can give me a help?
Please?
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: Icon based dialogues
« Reply #5 on: April 16, 2008, 11:22:04 AM »

sorry, I have no clue what do you mean by Entity script?
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

The Man

  • Occasional poster
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 67
    • View Profile
Re: Icon based dialogues
« Reply #6 on: April 16, 2008, 11:31:20 AM »

I've got this entity called "venditore",and when I Leftclick on him I want the dialogue to start...I've got no problem with the traditional method,but i dont' know how to implement the icon method...what do I have to write inside "venditore.script"?
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: Icon based dialogues
« Reply #7 on: April 16, 2008, 01:02:45 PM »

Code: [Select]
[code script]
on "LeftClick"
{

  var your_object  = new Object("scripts\dialogueObject.script");

  your_object.InsertIcon(...);  // supply correct parameters.
  your_object.InsertIcon(...);
  your_object.InsertIcon(...);
  your_object.InsertIcon(...);

  your_object.initializeDialogue(path_to_your_responses_script);


}
« Last Edit: April 16, 2008, 01:04:17 PM by metamorphium »
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

The Man

  • Occasional poster
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 67
    • View Profile
Re: Icon based dialogues
« Reply #8 on: April 16, 2008, 01:58:23 PM »

Ok,it worked...the only problem is that the actor can walk during the dialogue!How can I solve this?
I tried to set Game.Interactive = false; but in this way the player can't choose the dialogue icon!
Sorry for all this problems,but I'm dreaming of creating a Broken Sword Style adventure,and I need this kind of dialogue...
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: Icon based dialogues
« Reply #9 on: April 16, 2008, 03:04:23 PM »

try modifying the initializeDialogue method in the dialogue object to read:

tmpwin.Visible = true;
tmpwin.GoExclusive();
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

The Man

  • Occasional poster
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 67
    • View Profile
Re: Icon based dialogues
« Reply #10 on: April 16, 2008, 04:03:09 PM »

It doesn't seem to work and I really don't know why...I'm starting to give up...
What about a complete step-by-step tutorial for people who doesn't know a thing about scripting in WME like me?
Believe me,for a person who's not so familiar with programming,this procedure is quite difficult...and I'm sure a lot of people would like to use icon based dialogues...Anyway,thanks for your help!
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: Icon based dialogues
« Reply #11 on: April 16, 2008, 05:34:04 PM »

For people who don't know a thing about scripting is here my online book.

http://res.dead-code.org/doku.php/wmebook:start

Icon based dialogue is not a trivial matter and if you find the code complex, it's time to go "back to the roots" and learn how WME works. ;)

Ps. Optionally if you upload somewhere some minimalistic version of your dialogue project, I'll look what's wrong with it.
« Last Edit: April 16, 2008, 05:38:13 PM by metamorphium »
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

cremen

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 26
    • View Profile
    • Pink Town
Re: Icon based dialogues
« Reply #12 on: June 21, 2008, 01:06:33 PM »

a little improove for other users:

in the initializeDialogue method at the end
add little command:

Code: [Select]
tmpwin.ApplyEvent("Init");
and in the reactions.script

add "Init" event like this:

Code: [Select]
on "Init"{
dlgObject.insertIcon("first","icon.png","icon.png"); // insert some real image file instead of icon.png
dlgObject.insertIcon("second","icon.png","icon.png"); // insert some real image file instead of icon.png
dlgObject.insertIcon("third","icon.png","icon.png"); // insert some real image file instead of icon.png
}

and then you need to show your dialog, use command like this:
Code: [Select]
dlgObject.initializeDialogue("scripts\reactions.script");
it will be automaticly started.

this method is more usefull, becouse all icon based dialogs by one per file, you may just call
Code: [Select]
dlgObject.initializeDialogue("scripts\dialog1.script");
or
Code: [Select]
dlgObject.initializeDialogue("scripts\dialog3.script");
and all logic in the one file.

thanx for your engine.

P.S. in my project i renamed initializeDialogue to showdialog
Logged
 

Page created in 0.039 seconds with 24 queries.