-
Notifications
You must be signed in to change notification settings - Fork 23
Setting RTPC Values (23.1)
Consider this simple scene tree:
We want to set the RTPC value of a game sync named Volume (mapped to the Voice volume of the respective playlist container) to a random value between 0 and 100 every frame.
To do this, we attach a script to the root node and call Wwise.set_rtpc_value in the _process callback:
func _process(delta):
Wwise.set_rtpc_value("Volume", randf_range(0, 100), $MusicEvent)
The first parameter is name of the game sync, the second the value and third the associated game_object.
For AkEvent nodes, you can pass directly the node as this parameter.
If you are manually posting events in GDScript, you can set RTPC values by passing the registered game_object as the third parameter to Wwise.set_rtpc_value. In this example, the node in which the script resides is registered as the game_object:
func _ready():
Wwise.register_game_obj(self, "Music GameObject")
Wwise.post_event("Music", self)
func _process(delta):
Wwise.set_rtpc_value("Volume", randf_range(0, 100), self)
If you need to set a global RTPC value simply pass null as the third game_object parameter to Wwise.set_rtpc_value:
func _process(delta):
Wwise.set_rtpc_value("Volume", randf_range(0, 100), null)
- Wwise 24.1, 25.1, 26.1 / Godot 4.3+
- Getting Started
- Posting Events
- Loading SoundBanks
- Setting RTPC Values
- Setting Switches
- Setting States
- Exporting a Godot Project
- Building the GDExtension Library
- Plugin Support
- macOS-specific information
- Linux-specific information
- Web-specific information
- Version Control
- Important Migration Notes 24.1