why my game freeze

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Lgdn

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

how to fiw it pls ?

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.

timothybrentwood | 2021-07-07 19:23

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

Snail0259 | 2021-07-10 12:18

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

title screen :

`extends Button

func _on_Button_pressed():

cutscene :

`extends VideoPlayer

func _on_VideoPlayer_finished():
pass `

the game :
`extends KinematicBody

const MOVE_SPEED = 110
const JUMP_FORCE = 30
const GRAVITY = 0.98
const MAX_FALL_SPEED = -30

const H_LOOK_SENS = 1.0
const V_LOOK_SENS = 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 * V_LOOK_SENS
cam.rotation_degrees.x = clamp(cam.rotation_degrees.x,-90,90)
rotation_degrees.y -= event.relative.x * H_LOOK_SENS

func _physics_process(delta):
var move_vec = Vector3()
move_vec.y += 10
if Input.is_action_pressed(“move_right”):
move_vec.x += 1
if Input.is_action_pressed(“move_left”):
move_vec.x -= 1
if Input.is_action_pressed(“move_back”):
move_vec.z += 1
if Input.is_action_pressed(“move_forward”):
move_vec.z -= 1
move_vec = move_vec.normalized()
move_vec = move_vec.rotated(Vector3(0,1,0),rotation.y)
move_vec *= MOVE_SPEED
move_vec.y = y_velo

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"):
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`

Lgdn | 2021-07-22 21:22

hi there is the code

Lgdn | 2021-07-23 16:27

:bust_in_silhouette: Reply From: Montasir Raihan

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…

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.

thank you so much that work correctly

Lgdn | 2021-07-25 12:54

don’t woory for me, i copy/paste

Lgdn | 2021-07-25 12:55