–1 vote

in the end of the cutscene of my game the game freeze and close

how to fiw it pls ?

Godot version 3.3.2
in Engine by (25 points)

We're going to need to see code or error messages or something of substance if you want any help. There is absolutely nothing we can do to help you with the information you provided.

It might help if you give us the node structure, the error message, and the code!

hello, sorry for not having answered you, I have several scripts here they are:

title screen :

`extends Button

func onButtonpressed():
get
tree().change_scene("res://Cutscene1.tscn")`

cutscene :

`extends VideoPlayer

func onVideoPlayerfinished():
get
tree().change_scene("res://Play.tscn")
pass `

the game :
`extends KinematicBody

const MOVESPEED = 110
const JUMP
FORCE = 30
const GRAVITY = 0.98
const MAXFALLSPEED = -30

const HLOOKSENS = 1.0
const VLOOKSENS = 1.0

onready var cam = $CamBase
onready var a1 = $CamBase
onready var mus = $OST/Music

var y_velo = 0

func input(event):
if event is InputEventMouseMotion:
cam.rotation
degrees.x -= event.relative.y * VLOOKSENS
cam.rotationdegrees.x = clamp(cam.rotationdegrees.x,-90,90)
rotationdegrees.y -= event.relative.x * HLOOK_SENS

func physicsprocess(delta):
var movevec = Vector3()
move
vec.y += 10
if Input.isactionpressed("moveright"):
move
vec.x += 1
if Input.isactionpressed("moveleft"):
move
vec.x -= 1
if Input.isactionpressed("moveback"):
move
vec.z += 1
if Input.isactionpressed("moveforward"):
move
vec.z -= 1
movevec = movevec.normalized()
movevec = movevec.rotated(Vector3(0,1,0),rotation.y)
movevec *= MOVESPEED
movevec.y = yvelo
moveandslide(move_vec,Vector3(0,1,0))

var grounded = is_on_floor()
y_velo -= GRAVITY
var just_jumped = false
if grounded and Input.is_action_pressed("jump"):
    just_jumped = true
    y_velo = JUMP_FORCE
if grounded and y_velo <= 0:
    y_velo = -.1
if y_velo < MAX_FALL_SPEED:
    y_velo = MAX_FALL_SPEED

if Input.is_action_pressed("Reset"):
    get_tree().reload_current_scene()

if Input.is_action_pressed("slowmo"):
    Engine.time_scale = 0.1
    mus.pitch_scale = 0.5
else :
    Engine.time_scale = 1
    mus.pitch_scale = 1`

hi there is the code

1 Answer

0 votes
Best answer

Bro, I feel sorry for you. You didn't need to write all these code. There is nothing wrong in your code.

The problem is Windows doesn't support VP9 coded videos. But can play VP8 coded videos. That's why the game crashes. I've also faced the same problem. You just have to convert your videos into VP8 coded videos. Then upload the video on your video player node. It works for me.

And trust me, you don't need any kind of third party software to convert your videos for your game project. Use this link over here...

https://video.online-convert.com/convert-to-webm

All you have to do is just upload the video you want to convert and click on Start Conversion. Wait until the conversion is done. Then all you need to do is just download the video you've just converted and use it anywhere you like on your project.

I hope this helps. If you still find any kind of error, check your code over and over again. Try it. If it works for me then it'll work for you too.

by (123 points)
selected by

thank you so much that work correctly

don't woory for me, i copy/paste

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.