[][src]Function smash::app::lua_bind::WorkModule::set_flag

pub unsafe extern "C" fn set_flag(
    arg1: *mut BattleObjectModuleAccessor,
    arg2: bool,
    arg3: c_int
)

sets the specified flag on/off depending on the specified bool (I.E. false = off, true = on)

Arguments

Example

// if you are doing an aerial and input a fast fall, set the fast fall flag on (enables fast falls at all points in an aerial)

            //if your are doing an aerial                                                                                  and you input a fast-fall
if StatusModule::status_kind(module_accessor) == *FIGHTER_STATUS_KIND_ATTACK_AIR && (ControlModule::get_command_flag_cat(module_accessor, 1) & *FIGHTER_PAD_CMD_CAT2_FLAG_FALL_JUMP) != 0 {
    WorkModule::set_flag(module_accessor, true, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE);
}