StoryQuest DialogueDiálogo de StoryQuest
Add Dialogue to Your WorldAñade diálogo a tu mundo
A conversation with a character, a strange object with a hint, or a spot on the map that reveals a clue can all add a little more story to your playable area.Una conversación con un personaje, un objeto extraño con una pista o un punto del mapa que revela una pista pueden añadir un poco más de historia a tu área jugable.
In this guide, you’ll start by making a character or creature talk, then see how the same setup can work with other objects or even a specific place in the world.En esta guía empezarás haciendo hablar a un personaje o criatura, y luego verás cómo el mismo montaje puede funcionar con otros objetos o incluso con un lugar concreto del mundo.
Words with an orange underline open a small explainer. Click any of them.Las palabras con subrayado naranja abren una pequeña explicación. Haz clic en cualquiera.
Set up a small practice scenePrepara una pequeña escena de práctica
Start with a small practice scene where you can try the dialogue setup without a lot of other things getting in the way. It only needs enough space for your Player to move around and interact with a character or creature.Empieza con una pequeña escena de práctica donde puedas probar el montaje de diálogo sin que muchas otras cosas estorben. Solo necesita espacio suficiente para que tu Player se mueva e interactúe con un personaje o criatura.
You needNecesitas
- Create a new scene and use a basic as the root node.Crea una escena nueva y usa un básico como nodo raíz.
- Add or borrow a little content so you have a small playable area to move around in.Añade o toma prestado un poco de contenido de para tener una pequeña área jugable por la que moverte.
- Add a .Añade un .
- Add a character or creature for the Player to interact with.Añade un personaje o criatura con el que el Player pueda interactuar.
Companion guideGuía complementaria
Need help making the practice scene? Use Setting Up a New Scene from Scratch to create a simple playable area with a root node, TileMapLayers, and a Player.¿Necesitas ayuda para crear la escena de práctica? Usa Crear una escena nueva desde cero para hacer un área jugable sencilla con un nodo raíz, TileMapLayers y un Player.
Add an InteractAreaAñade un InteractAreaCreateCrear
Give your character or creature an area the Player can interact with.Dale a tu personaje o criatura un área con la que el Player pueda interactuar.
Start by giving your character or creature an area the Player can interact with. An handles the interaction, while a defines where that interaction can happen.Empieza dándole a tu personaje o criatura un área con la que el Player pueda interactuar. Un se encarga de la interacción, mientras que un define dónde puede ocurrir esa interacción.
Steps 1–2Pasos 1–2
click a number when a step is donehaz clic en un número al terminar un paso
Add an Añade un
- In the Scene Tree, select the character or creature you want the Player to interact with.En el árbol de escena, selecciona el personaje o criatura con el que quieres que el Player interactúe.
- Click the + button above the Scene Tree, or press Ctrl+A on Windows or Command+A on Mac.Haz clic en el botón + encima del árbol de escena, o pulsa Ctrl+A en Windows o Command+A en Mac.
- Search for InteractArea and add it as a child of the character or creature.Busca InteractArea y añádelo como hijo del personaje o criatura.
Add a Añade un
- Select the InteractArea, add another child node, and choose CollisionShape2D. This gives the InteractArea a space where it can detect the Player.Selecciona el InteractArea, añade otro nodo hijo y elige CollisionShape2D. Esto le da al InteractArea un espacio donde puede detectar al Player.
- With CollisionShape2D selected, find Shape in the Inspector and create a simple shape such as a .Con el CollisionShape2D seleccionado, busca Shape en el Inspector y crea una forma sencilla, como un .
- In the viewport, resize and position the shape so the Player can comfortably reach the interaction. It does not need to match the character or creature's artwork exactly.En el viewport, ajusta el tamaño y la posición de la forma para que el Player pueda alcanzar la interacción con comodidad. No hace falta que coincida exactamente con el aspecto del personaje o criatura.
Add a TalkBehavior nodeAñade un nodo TalkBehaviorCreateCrear
Connect the interaction you just made to dialogue.Conecta la interacción que acabas de crear con un diálogo.
Your InteractArea gives the Player something they can interact with, but it does not decide what happens yet. Add a node to connect that interaction to dialogue.Tu InteractArea le da al Player algo con lo que interactuar, pero todavía no decide qué ocurre. Añade un nodo para conectar esa interacción con un diálogo.
TalkBehavior is a sibling of InteractArea — not its child.TalkBehavior es hermano de InteractArea — no su hijo.
Steps 3–4Pasos 3–4
click a number when a step is donehaz clic en un número al terminar un paso
Add a nodeAñade un nodo
Select the character or creature, click the + button above the Scene Tree, and search for TalkBehavior. Add it as another child of the character or creature.Selecciona el personaje o criatura, haz clic en el botón + encima del árbol de escena y busca TalkBehavior. Añádelo como otro hijo del personaje o criatura.
Connect TalkBehavior to the InteractAreaConecta TalkBehavior al InteractArea
- Select TalkBehavior in the Scene Tree. Its settings appear in the Inspector.Selecciona TalkBehavior en el árbol de escena. Sus ajustes aparecen en el Inspector.
- Find the Interact Area property in the Inspector. It tells TalkBehavior which InteractArea to connect to.Localiza la propiedad Interact Area en el Inspector. Le dice a TalkBehavior con qué InteractArea conectarse.
TalkBehavior InspectorInspector de TalkBehavior - In the Interact Area property, click Assign.En la propiedad Interact Area, haz clic en Assign.
- Choose the InteractArea you added earlier, then confirm your choice.Elige el InteractArea que añadiste antes y confirma tu elección.
The “Select a Node” windowLa ventana “Select a Node”
Add a short conversationAñade una conversación cortaCreateCrear
TalkBehavior starts with a Default Dialogue already assigned. Before you change the writing, make a new resource for this interaction so it has its own conversation.TalkBehavior empieza con un Default Dialogue ya asignado. Antes de cambiar el texto, crea un recurso nuevo para esta interacción, para que tenga su propia conversación.
Steps 5–7Pasos 5–7
click a number when a step is donehaz clic en un número al terminar un paso
Create your own Dialogue resourceCrea tu propio recurso Dialogue
- Select TalkBehavior. In the Dialogue property, click the drop-down arrow next to Default Dialogue and choose New Dialogue.Selecciona TalkBehavior. En la propiedad Dialogue, haz clic en la flecha desplegable junto a Default Dialogue y elige New Dialogue.
The New Dialogue optionLa opción New Dialogue - Give the new Dialogue a name that helps you recognize what it belongs to, then save it with the files for that character, object, or playable area. Keeping related files together makes them easier to find later.Dale al nuevo Dialogue un nombre que te ayude a reconocer a qué pertenece y guárdalo junto con los archivos de ese personaje, objeto o área jugable. Tener juntos los archivos relacionados hace que sean más fáciles de encontrar después.
- Click the Dialogue resource to open it. It starts with some example dialogue that you can replace with your own.Haz clic en el recurso Dialogue para abrirlo. Empieza con un diálogo de ejemplo que puedes sustituir por el tuyo.
Add a short conversationAñade una conversación corta
Put the speaker's name followed by a colon at the start of each line, then write what they say. The name before the colon appears in the banner above that line of dialogue.Pon el nombre del hablante seguido de dos puntos al inicio de cada línea, y luego escribe lo que dice. El nombre antes de los dos puntos aparece en el cartel encima de esa línea de diálogo.
Talking Bunny: Hi, {{player_name}}. Justin: Hi!Talking Bunny: Hola, {{player_name}}. Justin: ¡Hola!
The bunny is only an example.El conejo es solo un ejemplo.
Set the Player NameDefine el Player Name
Select the Player and set its Player Name property. The Dialogue can use that name anywhere you see {{player_name}}.Selecciona el Player y define su propiedad Player Name. El Dialogue puede usar ese nombre en cualquier sitio donde veas {{player_name}}.
pulls the Player Name already set for the Player. toma el Player Name ya definido para el Player.
Test the conversationPrueba la conversaciónPlayJugar
Now run the scene and make sure your new interaction works the way you expect.Ahora ejecuta la escena y asegúrate de que tu nueva interacción funciona como esperas.
- Run your practice scene.Ejecuta tu escena de práctica.
- Walk up to the character or creature. When the Player enters the InteractArea, the interaction indicator should appear.Acércate al personaje o criatura. Cuando el Player entra en el InteractArea, debería aparecer el indicador de interacción.
- Press Spacebar, the default interaction button. Your Dialogue should appear.Pulsa la barra espaciadora, el botón de interacción por defecto. Debería aparecer tu Dialogue.
- Check that the speaker names and dialogue appear the way you intended.Revisa que los nombres de los hablantes y el diálogo aparecen como querías.
You should now be able to…Ahora deberías poder…
add a short conversation to an object or character in your StoryQuest.añadir una conversación corta a un objeto o personaje de tu StoryQuest.
More than just character conversationsMás que conversaciones con personajesCreateCrear
See how the same setup can work without a character at all.Descubre cómo el mismo montaje puede funcionar sin ningún personaje.
This setup is more flexible than it might seem. The Player can interact with a character or creature, an object or prop, or even a specific place in the world.Este montaje es más flexible de lo que parece. El Player puede interactuar con un personaje o criatura, un objeto o accesorio, o incluso un lugar concreto del mundo.
Steps 8–10Pasos 8–10
click a number when a step is donehaz clic en un número al terminar un paso
Move the interaction nodes out of the characterSaca los nodos de interacción del personaje
In the Scene Tree, drag InteractArea and TalkBehavior onto the root node of your practice scene. Keep CollisionShape2D as a child of InteractArea.En el árbol de escena, arrastra InteractArea y TalkBehavior al nodo raíz de tu escena de práctica. Deja CollisionShape2D como hijo de InteractArea.
Turn it into a location interactionConviértelo en una interacción de ubicación
- Delete the character or creature. Now there is nothing visible attached to the interaction.Elimina el personaje o criatura. Ahora no hay nada visible unido a la interacción.
- Select InteractArea in the Scene Tree, choose the Move tool above the viewport, and move it to a new spot in the playable area. Because CollisionShape2D is still its child, it moves with the InteractArea.Selecciona InteractArea en el árbol de escena, elige la herramienta Move encima del viewport y muévelo a un nuevo punto del área jugable. Como CollisionShape2D sigue siendo su hijo, se mueve junto con el InteractArea.
- Change the dialogue if you want. Since there is no character speaking now, you could use a short line without a speaker name, such as a thought, clue, memory, or bit of information about the place.Cambia el diálogo si quieres. Como ahora no habla ningún personaje, podrías usar una línea corta sin nombre de hablante, como un pensamiento, una pista, un recuerdo o algún dato sobre el lugar.
Run the scene and try it againEjecuta la escena y pruébalo otra vez
Walk into the InteractArea and press Spacebar. The interaction still works, even though there is no character there.Entra en el InteractArea y pulsa la barra espaciadora. La interacción sigue funcionando, aunque no haya ningún personaje ahí.
The interaction belongs to the InteractArea, not to a character.La interacción pertenece al InteractArea, no a un personaje.
ExamplesEjemplos
The same setup can work withEl mismo montaje puede funcionar con
- a character or creatureun personaje o criatura
- an object or propun objeto o accesorio
- a specific place in the worldun lugar concreto del mundo
You should now be able to…Ahora deberías poder…
use the same interaction setup on an object that isn't a character.usar el mismo montaje de interacción en un objeto que no sea un personaje.
Optional: Move the interaction indicatorOpcional: Mueve el indicador de interacciónCreateCrear
The interaction indicator appears automatically, but its default position may not always fit what the Player is interacting with. If it looks too high, too low, or just out of place, you can choose exactly where it appears.El indicador de interacción aparece automáticamente, pero su posición por defecto no siempre encaja con aquello con lo que interactúa el Player. Si se ve demasiado alto, demasiado bajo o fuera de sitio, puedes elegir exactamente dónde aparece.
Steps 11–12Pasos 11–12
click a number when a step is donehaz clic en un número al terminar un paso
Add and position a Añade y coloca un
- Add a Marker2D to the same part of the scene as your interaction.Añade un Marker2D a la misma parte de la escena que tu interacción.
- Select the Marker2D and use the Move tool to place it exactly where you want the interaction indicator to appear.Selecciona el Marker2D y usa la herramienta Move para colocarlo exactamente donde quieres que aparezca el indicador de interacción.
Connect it to the InteractAreaConéctalo al InteractArea
Select the InteractArea and use its Marker property in the Inspector to assign the Marker2D.Selecciona el InteractArea y usa su propiedad Marker en el Inspector para asignar el Marker2D.
- Run the scene and approach the interaction. The indicator should now appear at the Marker2D.Ejecuta la escena y acércate a la interacción. El indicador debería aparecer ahora en el Marker2D.
You should now be able to…Ahora deberías poder…
reposition the interaction indicator so it appears where you want it.reubicar el indicador de interacción para que aparezca donde quieras.
Try it in your StoryQuestPruébalo en tu StoryQuestReflectReflexionar
A little dialogue can help give the Player a clue, reveal something about the world, or add meaning to a moment.Un poco de diálogo puede ayudar a darle una pista al Player, revelar algo del mundo o darle sentido a un momento.
A few ideasAlgunas ideas
- A character or creature gives a short clue about where to go or what is happening.Un personaje o criatura da una pista corta sobre adónde ir o qué está pasando.
- An object or prop reveals a thought or memory when the Player interacts with it.Un objeto o accesorio revela un pensamiento o recuerdo cuando el Player interactúa con él.
- A specific place in the world adds a little context to something the Player sees or discovers there.Un lugar concreto del mundo aporta un poco de contexto a algo que el Player ve o descubre ahí.
Dialogue is only one way to tell your story. Let the environment, gameplay, characters, animation, and sound do some of the storytelling too, and use dialogue where a few words can add something useful.El diálogo es solo una forma de contar tu historia. Deja que el entorno, la jugabilidad, los personajes, la animación y el sonido cuenten también parte de la historia, y usa el diálogo donde unas pocas palabras puedan aportar algo útil.