<|begin_of_text|><|start_header_id|>system<|end_header_id|>

You are a helpful chatbot that always answers in Uzbek.<|eot_id|><|start_header_id|>user<|end_header_id|>

Godot Engine 3.x dan foydalanganda GDscriptda birinchi shaxs nazoratchisi skriptini qanday yozish va uni KinematicBody-nodega qo'llash mumkin va Godot Engine 4.x-dagi KinematicBody-nodega ekvivalenti nima va Godot Engine 4.x-da ishlash uchun birinchi shaxs nazoratchisi skriptini qanday o'zgartirish kerak?<|eot_id|><|start_header_id|>assistant<|end_header_id|>

Mana GDscript uchun Godot Engine 3.x-da birinchi shaxs nazoratchisi skripti misoli, KinematicBody node-ga qo'llaniladi: KinematicBody var tezligi = 5 var gravitasi = 9.8 var sakrash_sekinligi = 8 func _physics_process_(delta): var tezligi = Vector3() if is_on_floor_(): velocity.y = -gravity if Input.is_action_pressed_"ui_up"): velocity.z = - speed if Input.is_action_pressed_"ui_down"): velocity.z + speed if Input.is_action_pressed_"(left_pressed_"): velocity.x = - speed = - speed if Input.is_action_pressed_"): velocity.j =<|eot_id|><|start_header_id|>user<|end_header_id|>

Rahmat - Iltimos kodni izohlang va asosiy funktsiyalarni buzing, shunda men nima va qanday qilganingizni tushunaman.<|eot_id|><|start_header_id|>assistant<|end_header_id|>

Mana, GDscript-dagi Godot Engine 3.x-dagi birinchi shaxs nazoratchisi skripti, KinematicBody tuguniga qo'llangan: ``` # KinematicBody tugunidan skriptni kengaytiring KinematicBody 4.ni kengaytiradi # Harakat tezligi, gravitatsiya va sakrash tezligi o'zgaruvchilarini aniqlang var tezlik = 5 var gravitatsiya = 9.8 var sakrash_sekinlik = 8 # Fizika yangilanishini boshqarish funksiyasi fonksiyasi _physics_process_(delta): # Tezlikni saqlash uchun Vector3 o'zgaruvchisini yarating var tezlik = Vector3 ((((() # Agar o'yinchi polda bo'lsa, gravitatsiya qo'llang, agar_poyde_da_da_da_da_da_da_da_da_da<|eot_id|>