Setting RTPC Values (24.1) - alessandrofama/wwise-godot-integration GitHub Wiki

Setting RTPC values for AkEvent Nodes

Consider this simple Scene Tree example:


Screenshot 2023-08-30 at 16 32 57

We want to set the RTPC value of a Game Parameter named RTPC to a desired value for the AkEvent3D.

To do this, we attach a script to the parent node of the AkEvent and export a WwiseRTPC type variable. We can select the desired RTPC from the Wwise Picker:


Screenshot 2023-08-30 at 16 32 58

After doing that, we can call set_value on the exported WwiseRTPC variable with a reference to the AkEvent3D Node (the game_object) and the desired value as arguments:

extends Node3D

@export var rtpc:WwiseRTPC

func _ready() -> void:
	rtpc.set_value($AkEvent3D, 1200)

To set a global RTPC value, call set_global_value on the exported WwiseRTPC variable.

If you are posting an Event with the WwiseEvent type, you can use the game_object you passed to WwiseEvent.post to set the RTPC value of that GameObject:

extends Node3D

@export var event:WwiseEvent
@export var rtpc:WwiseRTPC

func _enter_tree() -> void:
	event.post(self)

func _ready() -> void:
	rtpc.set_value(self, 1200)
⚠️ **GitHub.com Fallback** ⚠️