Spawn/display an object during a conversation
Spawn/display an object during a conversation
Hello
During a conversation, when a player for instead gets handed something over from NPC, I want to trigger either image or particlefx. The camera is at default closeup, so i need to have whatever i spawn particles or or objects to be in front of camera.
More specifically when a word is being typed in the conversation I would like something to appear..
During a conversation, when a player for instead gets handed something over from NPC, I want to trigger either image or particlefx. The camera is at default closeup, so i need to have whatever i spawn particles or or objects to be in front of camera.
More specifically when a word is being typed in the conversation I would like something to appear..
Re: Spawn/display an object during a conversation
Hi,
You could set up a particle effect in front of the NPC and set its GameObject inactive. On the dialogue entry node where the NPCs gives the item to the player, use the SetActive() sequencer command to activate the GameObject. Example:
It's complicated to make it appear at a certain word in the text. But it's easier to make it appear at a certain time -- for example, 1.5 seconds into the subtitle:
You could set up a particle effect in front of the NPC and set its GameObject inactive. On the dialogue entry node where the NPCs gives the item to the player, use the SetActive() sequencer command to activate the GameObject. Example:
Code: Select all
{{default}}; SetActive(MyParticleFX)
Code: Select all
{{default}}; SetActive(MyParticleFX)@1.5
Re: Spawn/display an object during a conversation
Thanks Tony.
It works awesome...
SIDENOTE:
I have this camera view on my NPC conversations
Its a bit to close as the NPC animation moves his head toward camera and then it clips the view. I would like it to go slightly bit back.. Is that possible with the closeup command?
It works awesome...
SIDENOTE:
I have this camera view on my NPC conversations
Code: Select all
Camera(Closeup, speaker,1);
Re: Spawn/display an object during a conversation
If you only want to adjust it for this one NPC, add a uniquely-named GameObject as a child of the NPC, such as "Wizzard Camera Angle". Position and rotate it exactly where you want the camera to be. Then use its GameObject name:
Code: Select all
Camera(Wizzard Camera Angle, , 1)
Re: Spawn/display an object during a conversation
Thank you that helped.
BTW When i using a static object in this code it works but when i use a particle fx it freezes due to i have checked of Pause game during conversation. And it does not have an animator i can set the unscale time to.
Aby suggestions?
BTW When i using a static object in this code
Code: Select all
{{default}}; SetActive(MyParticleFX)@1.5
Aby suggestions?
Re: Spawn/display an object during a conversation
Set the Particle System's Delta Time > Unscaled.
Re: Spawn/display an object during a conversation
Wow did not see that one.
Thank you Tony
Thank you Tony
Re: Spawn/display an object during a conversation
Glad to help!