Skip to main content

advanced_random_trigger

Function advanced_random_trigger 

Source
pub fn advanced_random_trigger(
    config: &GDObjConfig,
    probabilities: Vec<(i16, i32)>,
) -> GDObject
Expand description

Returns an advanced random trigger

ยงArguments

  • config: General object options, such as position and scale
  • probabilities: List of tuples: (target group, chance to trigger this group).

Chances are considered relative to each other, meaning that they are not precentage-based. Two groups with the same relative chance will have the same (50-50) chance to be triggered