Making of polygon game | GODOT + Blender3D + itch.io | Part 3 ~ Adding sound effects
HTML-код
- Опубликовано: 11 сен 2024
- I started building a simple vehicle simulation game on Godot. These models are downloaded from Itch.io For other modeling, I use blender 3D. Here, I build a simple landscape and a vehicle body to move around.
Part 1 - building the basic game environment
Part 2 - vehicle simulation
Part 3 - Adding sound effects - These audio files are played in separate spatial nodes. Does anyone know a better way to do this? Like using a animation tree?
Code is commented below
extends Spatial
var Audio = AudioStreamPlayer.new()
func _ready():
self.add_child(Audio)
Audio.stream = load("res://Assets/Audio/Truck_idle.ogg")
Audio.play()
func _physics_process(delta):
if Input.is_action_pressed("ui_up"):
Audio.pitch_scale = 1.5
if Input.is_action_just_released("ui_up"):
Audio.pitch_scale = 1.0
When you finish this game, can you share a link to find it and be able to play it? I liked it
here you can download it. I still didn't make goals for the game. but you can play judemews.itch.io/ww-ii-truck-game