PlayMaker Help & Tips > PlayMaker Help

Help with Playmaker Actions: Newbie[SOLVED]

<< < (2/3) > >>

FunD:
Hi,
I tried using global transitions, but then the dialogues don't play at all anymore. I really am not sure why.

This is basically what I need:
On trigger -> plays Dialogue 1 (this works) -> on second trigger plays Dialogue 2 -> on third trigger and so on -> plays Dialogue 2 repeatedly

I also need to add a function where the player freezes his position while having a dialogue with a NPC and is only able to move once the dialogue is over.

Should I maybe message someone from Playmaker support directly and send that scene of my Unity project at this point?
I am using 'Pixel Crushers' Dialogue System Asset, and followed an online tutorial on how to call dialogues and play them with Playmaker. However, I could not find a tutorial on how to add conditions, such as replaying a conversation or playing the next one, so I'm still kind of stuck on this.
thank you very much for your help so far




--- Quote from: djaydino on February 15, 2019, 03:24:57 PM ---Hi.
maybe this tutorial can help :

//www.youtube.com/watch?v=eNl7ZEljcdg
--- End quote ---

djaydino:
Hi,
Can you show an image of the fsm?

FunD:
Hi,
This is the tutorial about using pixel crusher with playmaker, btw:
//www.youtube.com/watch?v=41UkBz2Wdbc
The dialogues are released on trigger through collision with NPCs.

So if I make a State that has a transition 'Trigger Enter', this state leading to a second State that has an action 'Start Conversation', it plays the conversation of Pixel Crusher Dialogue System.

I noticed that I can't add a 'TRIGGER ENTER' transition on a state more than once, so I created a second event called 'TRIGGER ENTER: Second Convo'
The first transition plays Conversation 1, and the second one should play Conversation 2, once Conversation 1 played (so after colliding with NPC a second time). But it does not.
State 4 is linked back to State 1, because I want the second convo to play again repeatedly.
You can set variables with the Pixel Crusher dialogue system actions, so I tried with a Bool, but can't get it work.
If you want a second action to be released through 'trigger enter' with Playmaker, once action 1 is finished executing, would you use a bool, or how would you do it?
Also, how would I freeze the player's position during conversations, while still allowing him to look around? Is there an action for this?
Thank you for your help.
Screenshots:

https://ibb.co/B2CV201
https://ibb.co/7vft960
https://ibb.co/tzHQjBC
https://ibb.co/wMfsLDj
https://ibb.co/Hhvf57f
https://ibb.co/2WjsqqT
https://ibb.co/pwK7Nsj


--- Quote from: djaydino on February 20, 2019, 12:37:21 AM ---Hi,
Can you show an image of the fsm?

--- End quote ---

djaydino:
Hi.
Yes you can not use The same Transition name more than once on a state.

The 'TRIGGER ENTER' is a pre made event, whick works similar to the 'Trigger Event' action.

You might want to use that instead to understand better the usage of this.

If only 2 conversations you could set up like this :

State 1 :
Have TRIGGER ENTER Transition or use the trigger event action and make an event name (call it 'Start Dialogue' for example) and use that to go to the next state.

State 2 :
Do the dialogue in there.
You could also send an event to the fsm which handles the movement. in there have a state "Disabled' and have a global transition event (call it "Disable Move" for example) connected to that state.
Then also have global transition event to the state where you handle the movement. (call it "Enable Move" for example)

I don't know If the "start conversation" Finish when conversations is ended or immediately as i do not have the asset. (you might need another action for it)

State 3 :
Send event (Enable Move) to you movement fsm.

Then have another trigger event action or TRIGGER ENTER transition.

state 4 :
Do 2nd dialogue.


if you would have several dialogues then you could do this :

State 1 :
Have a trigger event.

State 2 :
Have a "int Add" and add 1 to a variable (name it "Current Conversation" for example")

State 3 have a "int Switch" and place the variable in it.
Then in 'Int Switches' set the amount of conversations you have (4 for example)

Then make 4 states (one for each conversation) and make 4 events (one for each conversation) and use them in the "int Switch"  action.
On compare int, set 1,2,3,4

From each conversation state loop back to the 1st state.

In the last Conversation you could add a "Set Int Value" and set the the value "Current Conversation" to 0
This would start the conversation sequence from the beginning again

FunD:
Hello,

Thanks for your message. I tried both options, it still hasn't worked, unfortunately.

What I noticed so far with all options I tried, is that there is no second conversation playing 'on trigger enter', using this asset as an action in playmaker (unless I'm doing it wrong).

So you are right, the problem is probably, that another action is needed to start a new conversation. (Quote: I don't know If the "start conversation" Finish when conversations is ended or immediately as i do not have the asset. (you might need another action for it)

I've looked in the actions provided by the Pixel Crusher Dialogue System, and the one thing I could find, that I thought would apply here, is the "Stop Conversation" action. (Screenshots below)

However, it still won't play a second convo.

One more question I have as well is, which Playmaker action can I use to freeze the player's position?

Thank you.
Screenshots:
https://ibb.co/TH1FzbF
https://ibb.co/RP7BGb9
https://ibb.co/RDkp0JW


--- Quote from: djaydino on February 21, 2019, 09:47:15 AM ---Hi.
Yes you can not use The same Transition name more than once on a state.

The 'TRIGGER ENTER' is a pre made event, whick works similar to the 'Trigger Event' action.

You might want to use that instead to understand better the usage of this.

If only 2 conversations you could set up like this :

State 1 :
Have TRIGGER ENTER Transition or use the trigger event action and make an event name (call it 'Start Dialogue' for example) and use that to go to the next state.

State 2 :
Do the dialogue in there.
You could also send an event to the fsm which handles the movement. in there have a state "Disabled' and have a global transition event (call it "Disable Move" for example) connected to that state.
Then also have global transition event to the state where you handle the movement. (call it "Enable Move" for example)

I don't know If the "start conversation" Finish when conversations is ended or immediately as i do not have the asset. (you might need another action for it)

State 3 :
Send event (Enable Move) to you movement fsm.

Then have another trigger event action or TRIGGER ENTER transition.

state 4 :
Do 2nd dialogue.


if you would have several dialogues then you could do this :

State 1 :
Have a trigger event.

State 2 :
Have a "int Add" and add 1 to a variable (name it "Current Conversation" for example")

State 3 have a "int Switch" and place the variable in it.
Then in 'Int Switches' set the amount of conversations you have (4 for example)

Then make 4 states (one for each conversation) and make 4 events (one for each conversation) and use them in the "int Switch"  action.
On compare int, set 1,2,3,4

From each conversation state loop back to the 1st state.

In the last Conversation you could add a "Set Int Value" and set the the value "Current Conversation" to 0
This would start the conversation sequence from the beginning again

--- End quote ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version