Simple Array based Dialog System

Get help using Construct 2

Post » Wed Jan 04, 2012 10:09 pm

I used many of the ideas seen in the original dialog thread but trimmed it down for this file to make it easy to see my mistake. I want to have it so when the player walks over the trigger location it sets into action the dialog. Once done I want to allow the player to make choices and the choices will add to a meter that will determine the ending. The problem I am having now is i can not get the dialog to display let alone allow for choice.

I welcome input in what area of the code i need to look towards to get the dialog displaying and allow the player to choose. I was thinking a if group is activated and key "a" is pressed go to group 3 or something along that lines

I welcome all input

http://dl.dropbox.com/u/29115102/project3.capx
B
4
G
2
Posts: 20
Reputation: 1,357

Post » Wed Jan 04, 2012 10:32 pm

didn't read this seriously but I noticed the 'dialogset' group is empty :D

... Oh, all your groups are empty... you have to nest things inside

Also... you have different event sheet but you do not include them in the main one (the one the layout is linked to)Yann2012-01-04 22:34:15
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Wed Jan 04, 2012 11:30 pm

There's what Yann said, and also it happens arrDialog isn't usable.
I'm wondering in what layout you created it, it doesn't seem accessible.
Indeed, if I create a new array object, it appears as a layout object.

So create a new array object in layout 1, and tweak your code so it points this array instead of arrDialog.

Also, I'm not sure it is wise to use so many 0 opacity tiledbackground. Sprites should do the trick and be easier on the vram/CPU.

Finaly, for your own choice, you'd have to set it in the "next phase".
Atm, Phase1 displays "Press 'A' to agree press 'D' to disagree".
In phase 2 then, instead of "Space is pressed" you should have "A is pressed" and another subevent "D is pressed" and set the dialogs accordingly.

Fixed capx

Edit: also I recommand the reading of this tutorial about framerate independence that will come in handy Kyatric2012-01-04 23:55:18
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Wed Jan 04, 2012 11:59 pm

Amazing, wow I can not imagine how I left the include section that cod explain a fair amount. The transparent part is to test rather the the final style but many thanks on the suggestion. That explains the slow down.
B
4
G
2
Posts: 20
Reputation: 1,357


Return to How do I....?

Who is online

Users browsing this forum: makkancs, Matthew de and 37 guests