FmodEventEmitter2D

Inherits: Node2D

Emits Fmod Events and places them in the 2d world

Description

FmodEventEmitter2D can be triggered with signals. Sounds will be played at the

emitters transform or it's parents.

Properties

bool

allow_fadeout

true

bool

attached_to_rigidbody

false

float

attenuation_max

100.0

float

attenuation_min

1.0

Vector4i

event

Vector4i(0, 0, 0, 0)

bool

non_rigid_body_velocity

false

bool

one_shot

true

bool

override_attenuation

false

bool

paused

true

bool

preload_sample_data

false

bool

trigger_once

false

float

volume

1.0

Methods

float

get_parameter(name: String) const

float

get_parameter_by_id(id: Vector2i) const

bool

is_playing() const

void

set_parameter(name: String, value: float)

void

set_parameter_by_id(id: Vector2i, value: float)

void

start()

void

stop()


Property Descriptions

bool allow_fadeout = true 🔗

  • void set_allow_fadeout(value: bool)

  • bool is_allow_fadeout()

if true sounds will fadeout


bool attached_to_rigidbody = false 🔗

  • void set_attached_to_rigidbody(value: bool)

  • bool is_attached_to_rigidbody()

if true the event instance will attach to the parent rigidbody node.


float attenuation_max = 100.0 🔗

  • void set_attenuation_max(value: float)

  • float get_attenuation_max()

if override_attenuation is true sets the event's maximum attenuation distance


float attenuation_min = 1.0 🔗

  • void set_attenuation_min(value: float)

  • float get_attenuation_min()

if override_attenuation is true sets the event's minimum attenuation distance


Vector4i event = Vector4i(0, 0, 0, 0) 🔗

  • void set_event(value: Vector4i)

  • Vector4i get_event()

The Fmod event to play


bool non_rigid_body_velocity = false 🔗

  • void set_non_rigid_body_velocity(value: bool)

  • bool is_non_rigid_body_velocity()

If not attached_to_rigidbody event instance tracks the velocity of the object


bool one_shot = true 🔗

  • void set_one_shot(value: bool)

  • bool is_one_shot()

If true events will be played as one shots.


bool override_attenuation = false 🔗

  • void set_override_attenuation(value: bool)

  • bool is_override_attenuation()

If true the sound will attenuate with the values of attenuation_min and attenuation_max


bool paused = true 🔗

  • void set_paused(value: bool)

  • bool is_paused()

There is currently no description for this property. Please help us by contributing one!


bool preload_sample_data = false 🔗

  • void set_preload_sample_data(value: bool)

  • bool is_preload_sample_data()

if true sample data will be preloaded


bool trigger_once = false 🔗

  • void set_trigger_once(value: bool)

  • bool is_trigger_once()

if true sound can only be played once


float volume = 1.0 🔗

  • void set_volume(value: float)

  • float get_volume()

There is currently no description for this property. Please help us by contributing one!


Method Descriptions

float get_parameter(name: String) const 🔗

gets the value of the parameter by name. returns NAN if parameter with

name does not exist.


float get_parameter_by_id(id: Vector2i) const 🔗

gets the value of the parameter by id. returns NAN if parameter with name

does not exist.


bool is_playing() const 🔗

There is currently no description for this method. Please help us by contributing one!


void set_parameter(name: String, value: float) 🔗

sets the parameter with the given name.


void set_parameter_by_id(id: Vector2i, value: float) 🔗

sets the parameter with the given id.


void start() 🔗

Starts playing the Fmod Event from the beginning. Or plays a new one shot

event.


void stop() 🔗

Stops the last played event.


User-contributed notes

Please read the User-contributed notes policy before submitting a comment.