Tutorial scene making

Godot Version

4.4.1 stable Mac OS

Question

I haven’t seen used yet the element

  1. How to make on Tutor/Mentor bubble with text will be like typing
  2. Should I just use pause during him explaining task with tutor or is there some better way to stop player from make unwanted moves ?
  3. How can be made a “animation” from object area2d to label, sprite, progress bar to looks like refill of health , lives , count change ( count change like number be increased by 10 by want to do it 1 by 1 )
  4. Does Godot have built in reader or need to use audio track for speech ?

1.How to make on Tutor/Mentor bubble with text will be like typing

If you don’t want to use addons such as Dialogic or Dialogue Manager, you can create such a component with a combination of a Label (or RichTextLabel), a background (e.g. Panel or TextureRect) and a Tween that fades in the text. The tween could look something like this:

@export var label_to_fade_in: Label

func tween_dialogue(text_to_show: String) -> void:
   var length: int = text_to_show.length()
   var display_duration: float = 3.0
   
   var tween: Tween = create_tween()
   tween.tween_method(display_partial.bind(text_to_show), 0, length, display_duration)

func display_partial(num_characters: int, text_to_show: String) -> void:
     label_to_fade_in.text = text_to_show.substr(0, num_characters)
  1. Should I just use pause during him explaining task with tutor or is there some better way to stop player from make unwanted moves ?

This is up to how you want the game to feel. Usually, at least player input is blocked to avoid handling undesired behavior. On the other hand, I’ve also heard people complaining about long, non-interactive cutscene that aren’t skippable.

  1. How can be made a “animation” from object area2d to label, sprite, progress bar to looks like refill of health , lives , count change ( count change like number be increased by 10 by want to do it 1 by 1 )

Animations are usually either made with AnimationPlayer Nodes or with Tweens. Both have their use cases:

  • AnimationPlayers are more intuitive, can be more detailed and are good for more custom animations
  • Tweens are usually better for animations where you don’t know all values beforehand, and can be created directly via code

In most of your cases, I think tweens are the better choice. A simple example for animating the value of a progress bar would be:

var tween: Tween = create_tween()
var tween_duration: float = 0.25
tween.tween_property(some_progress_bar, "value", target_value, tween_duration)

Theres a lot more to do with tweens, just have a look at the docs:

  1. Does Godot have built in reader or need to use audio track for speech ?

I didn’t know this either, but just using a search engine reveals that Godot indeed has support for text-to-speech (TTS). Check out the Godot Docs, they’re usually very good:

1 Like

[quote=“substain, post:2, topic:120314, full:true”]

1.How to make on Tutor/Mentor bubble with text will be like typing

If you don’t want to use addons such as Dialogic or Dialogue Manager, you can create such a component with a combination of a Label (or RichTextLabel), a background (e.g. Panel or TextureRect) and a Tween that fades in the text. The tween could look something like this:

@export var label_to_fade_in: Label

func tween_dialogue(text_to_show: String) -> void:
   var length: int = text_to_show.length()
   var display_duration: float = 3.0
   
   var tween: Tween = create_tween()
   tween.tween_method(display_partial.bind(text_to_show), 0, length, display_duration)

func display_partial(num_characters: int, text_to_show: String) -> void:
     label_to_fade_in.text = text_to_show.substr(0, num_characters)

So I have decided to go for dialogic as it seem to be very powerful and can be customised easily .

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.