hello, sorry for not having answered you, I have several scripts here they are:
title screen :
`extends Button
func onButtonpressed():
gettree().change_scene("res://Cutscene1.tscn")`
cutscene :
`extends VideoPlayer
func onVideoPlayerfinished():
gettree().change_scene("res://Play.tscn")
pass `
the game :
`extends KinematicBody
const MOVESPEED = 110
const JUMPFORCE = 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.rotationdegrees.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()
movevec.y += 10
if Input.isactionpressed("moveright"):
movevec.x += 1
if Input.isactionpressed("moveleft"):
movevec.x -= 1
if Input.isactionpressed("moveback"):
movevec.z += 1
if Input.isactionpressed("moveforward"):
movevec.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`