Page 3 of 6

Re: Dialogue System for Unity with plyGame

Posted: Tue May 09, 2017 9:48 pm
by Tony Li
Alright! :-) That's what game development is like -- sometimes we get stuck on a problem for a while, but then it's so rewarding when we finally get it working. (At least until the next problem! ;) )

Re: Dialogue System for Unity with plyGame

Posted: Tue May 09, 2017 9:55 pm
by davidsibya08
Sir Tony,

Sir, how do I play sequence using blocks? What are the proper way of declaring variables there?
I wanted something like this:

At the start, if "First Quest" is unassigned then play this sequence, fade in, zoom in, move camera (I already declared positions here), end.

Initially I made it with the Dialogue System style such as adding the sequence trigger component to a certain object then I played the sequence.
But now, I wanted it to happen using plyGame blox.

Thanks sir Tony! :)

Re: Dialogue System for Unity with plyGame

Posted: Tue May 09, 2017 10:17 pm
by Tony Li
There's a block for that: Dialogue System > Cutscene Sequences > Start.

To see an example, open the Dialogue System's plyGame Example scene and edit the plyBlox on the Feature Demo GameObject. It runs this sequence: Fade(in,1).

To get and set variables, I suggest using the Dialogue System > Lua > Get Lua Variable and Set Lua Variable blocks.

To get and set quest states, use the Dialogue System > Quests blocks.

Use plyGame's regular Flow blocks to check if the First Quest is unassigned. If so, run the Dialogue System blocks.

Re: Dialogue System for Unity with plyGame

Posted: Tue May 09, 2017 10:38 pm
by davidsibya08
Is this Is this correct?

Re: Dialogue System for Unity with plyGame

Posted: Wed May 10, 2017 9:23 am
by Tony Li
Hi David,

It looks pretty good. If it works, that's what counts, right?

Here are some minor thoughts:

If you want to get the main state of the quest, use the Quests > Get State block instead of the Get Entry State block. The Get Entry State block for getting the states of entries (sub-tasks).

If you want, you can use separate blocks to activate GameObjects instead of using the SetActive() sequencer command.

Re: Dialogue System for Unity with plyGame

Posted: Thu May 11, 2017 10:53 am
by davidsibya08
Sir Tony,

How do I hide my UIs when triggering a conversation using plyBlox? I tried to SetActie(UIName,false) in the sequence field of the conversations
and it worked but the MobileSingleStickControl doesn't hide or set to false. Why is that?

Re: Dialogue System for Unity with plyGame

Posted: Thu May 11, 2017 10:59 am
by Tony Li
Hi David,

Try adding a Set Active On Dialogue Event component to your player or to the Dialogue Manager. Add OnStart and OnEnd elements. Assign the GameObject that has the MobileSingleStickControl component to OnStart and OnEnd. In OnStart, set the State to False.

If the GameObject has other components that you do not want to disable, use Set Component Enabled On Dialogue Event instead.

Re: Dialogue System for Unity with plyGame

Posted: Thu May 11, 2017 11:12 am
by davidsibya08
Thank you Sir Tony. :) I will try it now. :) I'll update you later. Thanks again! :D

Re: Dialogue System for Unity with plyGame

Posted: Thu May 11, 2017 11:23 am
by davidsibya08
It was set inactive but when it was already active it is not functioning anymore. My character is not moving with the joystick
but the joystick is moving,

Re: Dialogue System for Unity with plyGame

Posted: Thu May 11, 2017 11:25 am
by Tony Li
I'll have to take a look later today. I'll reply back here after I've had a chance to investigate the issue.