Hi,
I appreciate the SC Post Effect asset is not related here, but how would I hook into the speech of a specific character? Basically I would like an SC Post Effect to happen when a specific NPC character speaks. Are you able to offer some code / assistance as to how to do this? Thanks!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
You can hook into the OnStartSpeech / OnStopSpeech custom events to get callbacks when a specific character starts and stop speaking:
speakingCharacter will be 'null' in the case of narration.
Morning Chris,
Can you check the below, it is not quite working, I drag the player in from the scene, but the effect does not happen when my NPC speaks. It is normal npc dialogue. see screenshot here
Use Debug.Log statements underneath the ModifyEffect calls to confirm that they are being called at the correct time.
If they are, the script is working and it's not AC-related.
If they aren't, re-word your description of what exactly is happening. The screenshot shows an effect kicking in - what's the exact issue?
So the effect isn't happening when the npc speaks, the effect is there if I turn off the ModifyEffect script, but when it turns on it is waiting for the npc to speak and then turn on, but it isn't turning on
so we ran a de bug and there was no mention in the console, which would suggest that the OnStartSpeech is not getting called. So, the ModifyEffect is attached to the SC Effects and in runtime, the effect is not happening (it is visible in scene window not in play mode) and then when Narrator speaks I want the effect to be visible, and then when the narrator stops speaking, the effect stops
Scrap that, my bad, it is working, but not having any effect in game, anything you can see from this error that needs doing to the script? Here is the console message:
The log - not an error - shows that the ModifyEffectStart is being called with the correct NPC assigned. That the effect is not working is down to the ModifyEffect side of things.