[−][src]Function smash::app::lua_bind::ControlModule::get_stick_x
pub unsafe extern "C" fn get_stick_x(
arg1: *mut BattleObjectModuleAccessor
) -> f32
Returns the current x-axis position of the main control stick in a -1 to 1 range. (I.E. -1 = all the way left, 1 = all the way right, 0 = neutral)
Arguments
module_accessor
- Pointer to BattleObjectModuleAccessor
Example
// if you are holding left during a taunt, take 2 points of damage if ControlModule::get_stick_x(module_accessor) < -0.5 && StatusModule::status_kind(module_accessor) == *FIGHTER_STATUS_KIND_APPEAL { DamageModule::add_damage(module_accessor, 2.0, 0); }