"Stop Conversation if too far" problem with cross-scene transformations passed with FSM PlayMaker
Posted: Tue Aug 04, 2020 3:26 pm
Hi,
I bumped into interesting but troublesome issue. My setup:
1) I have a scene called "Logic" where I hold the Player (named as "Pilot")
2) I have a scene called "Enemies" where I hold the NPC (named as "Geologist")
3) I have a Player in the Logic scene, having a Proximity Selector and Dialogue Actor components
4) I have an NPC in the Enemies scene, having a Dialogue Actor, Dialogue Trigger and Usable components
5) I am passing the Player Transformation via FSM Playmaker script, using "Set Property" and passing the Player's Transform as the "Conversation Conversant" to the NPC's Dialogue Trigger. I am getting this Transform to show up nicely in the inspector (see screenshot)
So, the problem. When I trigger the NPC dialogue with the Use-button, the dialogue starts correctly, but here comes the weird issue: I have the "Conversation Actor" set to be the NPC/Geologist's Dialogue Actor's Transform, and "Conversation Conversant" set to Player Actor's Transform, which I get from another scene with PlayMaker. All looks good, the NPC's Dialogue Actor gets both transforms correctly as the photo shows.
Then, I have set the "Stop Conversation if too far", with value 5 (meters, tried with other numbers too). But what ever I do, the conversation doesn't stop if I walk away from it, much further than 5 meters. The ONLY way so far I have figured out to get it working, is to swap the "Conversation Conversant" and "Conversation Actor" in the NPC's Dialogue Actor. I mean, literally just swap their places: put the Player as the Actor and NPC as the Conversant. Then the "Stop Conversation if too far" starts working. But this is a new issue, because then the dialogue comes from wrong Dialogue Actors, i.e. the Player starts to talk NPC's dialogue and vice versa. All the dialogue is automated/imported from CSV so I wouldn't want to start rearranging anything / make a quick fix; I would need to get it working as in the screenshot. NPC being the Actor and Player being the conversant, but the "Stop if too far" still working. I didn't really find good information how that function should work...Am I doing something incorrectly?
I can repeat this issue. Somehow I'm suspecting, that the Transform I get from cross-scene has to be placed in the ACTOR transform, and not to the CONVERSANT transform. I just don't know why it would matter. Could you help?
Cheers!
Lauri
I bumped into interesting but troublesome issue. My setup:
1) I have a scene called "Logic" where I hold the Player (named as "Pilot")
2) I have a scene called "Enemies" where I hold the NPC (named as "Geologist")
3) I have a Player in the Logic scene, having a Proximity Selector and Dialogue Actor components
4) I have an NPC in the Enemies scene, having a Dialogue Actor, Dialogue Trigger and Usable components
5) I am passing the Player Transformation via FSM Playmaker script, using "Set Property" and passing the Player's Transform as the "Conversation Conversant" to the NPC's Dialogue Trigger. I am getting this Transform to show up nicely in the inspector (see screenshot)
So, the problem. When I trigger the NPC dialogue with the Use-button, the dialogue starts correctly, but here comes the weird issue: I have the "Conversation Actor" set to be the NPC/Geologist's Dialogue Actor's Transform, and "Conversation Conversant" set to Player Actor's Transform, which I get from another scene with PlayMaker. All looks good, the NPC's Dialogue Actor gets both transforms correctly as the photo shows.
Then, I have set the "Stop Conversation if too far", with value 5 (meters, tried with other numbers too). But what ever I do, the conversation doesn't stop if I walk away from it, much further than 5 meters. The ONLY way so far I have figured out to get it working, is to swap the "Conversation Conversant" and "Conversation Actor" in the NPC's Dialogue Actor. I mean, literally just swap their places: put the Player as the Actor and NPC as the Conversant. Then the "Stop Conversation if too far" starts working. But this is a new issue, because then the dialogue comes from wrong Dialogue Actors, i.e. the Player starts to talk NPC's dialogue and vice versa. All the dialogue is automated/imported from CSV so I wouldn't want to start rearranging anything / make a quick fix; I would need to get it working as in the screenshot. NPC being the Actor and Player being the conversant, but the "Stop if too far" still working. I didn't really find good information how that function should work...Am I doing something incorrectly?
I can repeat this issue. Somehow I'm suspecting, that the Transform I get from cross-scene has to be placed in the ACTOR transform, and not to the CONVERSANT transform. I just don't know why it would matter. Could you help?
Cheers!
Lauri