Hello!
I'm trying to figure out how I can have an object be revealed during a piece of dialogue. Essentially, the NPC asks the player what they see, and when they pick a response, I want the object to appear in the scene.
I tried setting an animation that would change the Z position of the object from 1 to 0 so it's popping into view (it's a 2-D game). However, this just flashes the object on the screen and then removes it again.
I know there's some kind of code to put in a script that would permanently change the Z position, but can you call forth a script action with the sequencer?
revealing objects during dialogue
Re: revealing objects during dialogue
Hi,
You can use the MoveTo() sequencer command. Create an empty GameObject in the position where you want the object to appear. For example, say the object is a Grimoire, the location where you want it to appear is a Tabletop, and you want it to move there over 2 seconds. Then use:
If you want the Grimoire to teleport immediately to the position of Tabletop, omit the last parameter:
You can use the MoveTo() sequencer command. Create an empty GameObject in the position where you want the object to appear. For example, say the object is a Grimoire, the location where you want it to appear is a Tabletop, and you want it to move there over 2 seconds. Then use:
Code: Select all
MoveTo(Tabletop, Grimoire, 2)
Code: Select all
MoveTo(Tabletop, Grimoire)
-
- Posts: 95
- Joined: Sun May 03, 2020 2:17 pm
Re: revealing objects during dialogue
Oh my gosh that is such a simple way to do it wow! Thank you so much! It's been a little tricky getting the hang of the sequences and cutscene stuff but I love them they are so useful!!!
-
- Posts: 95
- Joined: Sun May 03, 2020 2:17 pm
Re: revealing objects during dialogue
As a follow up, will that command work with the dialogue UI?
I'd like to hide the NPC portrait during these kinds of moments, but still have the conversation and dialogue run. Or should that be done through some kind of variable such as switching the profile portraits? Like, should I give each NPC a transparent image for a sprite and swap it to that?
I'd like to hide the NPC portrait during these kinds of moments, but still have the conversation and dialogue run. Or should that be done through some kind of variable such as switching the profile portraits? Like, should I give each NPC a transparent image for a sprite and swap it to that?
Re: revealing objects during dialogue
Hi,
Use the SetDialoguePanel() command for that.
Use the SetDialoguePanel() command for that.