下面是引用 [AHK]XXX 于 2010-07-15 14:54 发表的 :
那真是麻烦大大了 这是最后一个问题 如果用attack1的话太屈了 该怎修改attack1和attack2 的弹飞距离
把原本SMA里的这段内容:
velocity[0] = ( origin2[0] * (get_pcvar_float(cvar_pump_force) * 3000) ) / get_entity_distance(victim , attacker);
velocity[1] = ( origin2[1] * (get_pcvar_float(cvar_pump_force) * 3000) ) / get_entity_distance(victim , attacker);
if(velocity[0] <= 20.0 || velocity[1] <= 20.0)
velocity[2] = random_float(200.0 , 275.0);
改成:
复制程式
if (pev(attacker, pev_button) & IN_ATTACK) // attack1
{
velocity[0] = ( origin2[0] * (get_pcvar_float(cvar_pump_force) * 3000) ) / get_entity_distance(victim , attacker);
velocity[1] = ( origin2[1] * (get_pcvar_float(cvar_pump_force) * 3000) ) / get_entity_distance(victim , attacker);
if(velocity[0] <= 20.0 || velocity[1] <= 20.0)
velocity[2] = random_float(200.0 , 275.0);
}
else if (pev(attacker, pev_button) & IN_ATTACK2) // attack2
{
velocity[0] = ( origin2[0] * (get_pcvar_float(cvar_pump_force) * 3000) ) / get_entity_distance(victim , attacker);
velocity[1] = ( origin2[1] * (get_pcvar_float(cvar_pump_force) * 3000) ) / get_entity_distance(victim , attacker);
if(velocity[0] <= 20.0 || velocity[1] <= 20.0)
velocity[2] = random_float(200.0 , 275.0);
}
先用这方法试试好了…不成功的话就要用更麻烦的写法了…