Advertisement
metalx1000

Godot Intro Messages/Copyright Fade

Feb 19th, 2024
1,196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. extends Control
  2.  
  3. var count = 0
  4. var msgs = [
  5.     "My Game",
  6.     "FBK Game Studios",
  7.     "This file is part of the My Game Projecy.
  8. Copyright (c) 2024 Kris Occhpinti.
  9. https://filmsbykris.com
  10.  
  11. This program is free software: you can redistribute it and/or modify  
  12. it under the terms of the GNU General Public License as published by  
  13. the Free Software Foundation, version 3.",
  14.  
  15.  "This program is distributed in the hope that it will be useful, but
  16. WITHOUT ANY WARRANTY; without even the implied warranty of
  17. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. General Public License for more details.
  19.  
  20. You should have received a copy of the GNU General Public License
  21. along with this program. If not, see <http://www.gnu.org/licenses/>."
  22.    
  23. ]
  24. # Called when the node enters the scene tree for the first time.
  25. func _ready():
  26.     $Label.text = msgs[count]
  27.  
  28.  
  29. # Called every frame. 'delta' is the elapsed time since the previous frame.
  30. func _process(delta):
  31.     if Input.is_action_just_pressed("ui_accept"):
  32.         $AnimationPlayer.seek(0)
  33.         next_msg()
  34.     pass
  35.  
  36.  
  37. func next_msg():
  38.     count += 1
  39.    
  40.     if count >= msgs.size():
  41.         next_scene()
  42.     else:
  43.         $Label.text = msgs[count]
  44.        
  45. func next_scene():
  46.     get_tree().change_scene_to_file("res://titles screen.tscn")
  47.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement