Dialog system

Get help using Construct 2

Post » Mon Aug 06, 2012 11:04 am

Hello, I try to transfer my C# text-based game on Construct-2 and have one question. Main part of my hame is dialogs with choices.
Of course I can place all my (5000+) dialogs in array and every time create dialog box sprite for each new speach, but may be someone know useful plugin or method how I can do the same thing more simple and elegant?
(like call "dialog" method from plugin with arguments like "text", backgroud color, position on screen or link to another object, etc)
Thanks!DeusEx2012-08-06 11:45:15
B
12
S
3
G
1
Posts: 33
Reputation: 1,786

Post » Mon Aug 06, 2012 4:14 pm

create a disabled group and put all the display events for your dialog box there and then set the text to be displayed to a var you can reuse each time then set that var to what you want displayed and enable the group.

Make the group disable itself at the end of the dialog and its done. All you have to do is set the msg to display and enable the event when you need it
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Thu Aug 09, 2012 2:50 pm

aridale thanks for help, but even for 100+ dialogs it's huge ammount of events (or am I wrong?).
May be it's possible to implement standart dialog system in Construct-2 (I don't see TO DO theme anymore on forum, sorry), or may be someone can make such type of plugin? If it matter of money and someone ready to do it (include Scirra Developers) - please calculate needed sum and I will try to collect it (or tell it's doen't possible in a few days)
Dialogs it's vital part of many games, it's not a question "does it possible to make by using events...", yes, it's possible, but "It will be much more simple if..."

As I see it, we need something like DialogBox class (behaviour)
with properties like:
- start/end (x1,y1, x2, y2) dialog window coordinates
- background/borders color (or png) as variables
- link to PNG with character logo/portrait (who's talk this) in properties

As result we can easily do something like:
On collision with > Player > Spawn DialogBox with Coordinates(...), TextMessage("...")

Additionally we can add ability to place text to DialogBox from Arrays (2d and 3d). It will be also useful if someone can implement additional type of dialog box: there we can choose answer.

Does it possible? If "yes" how much it can cost?

p.s. Sorry for my poor English, it's not my native language, but I try to explaine as best as I can.DeusEx2012-08-09 14:53:53
B
12
S
3
G
1
Posts: 33
Reputation: 1,786

Post » Thu Aug 09, 2012 5:46 pm

yeah I think youve missed the point of the system I explained. The group I explained handles all the details in general for any dialog. You then just assign the values you currently need for the dialog to variables and enable the group.

If properly designed the group will then handle whatever dialog is setup by the variables
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Thu Aug 09, 2012 6:10 pm

You could use events to build up a system, to call dialogs depending on the variables the NPC is assigned with.

So maybe the NPC uses a variable called Dialogue with a value like 100 and another variable called DialogueEnd which ends with 105.

So in the end just call an hash table at 100, continue to loop till 105-100 times are over and so it displays only what is needed from a big hash table.

I saw a hash table plugin on the board somewhere.
This cuts down most dialogues into 1 or 2 simple events..
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Thu Aug 09, 2012 6:35 pm

[QUOTE=aridale] yeah I think youve missed the point of the system I explained. [/QUOTE]
Yes, my apologies, look like I don't understund your explanation.
May I ask you give me an example? (by text or in capx)
B
12
S
3
G
1
Posts: 33
Reputation: 1,786


Return to How do I....?

Who is online

Users browsing this forum: linkman2004, supreme676, Yahoo [Bot] and 18 guests