TreW_SoulJa
01-11-2004, 10:58 AM
// Sensitivity with Zoom controls for chaining
// * Normal FOV (90 is default)
$Chain::NormFov = "105";
// * Chain FOV (I use the same as above, ie. no change..)
$Chain::ZoomFov = "70";
// * Sensitivity factor, 0.5 = 50%, 1.0 means no difference
$Chain::Factor = 1.2;
// Don't touch this line
editactionmap("playmap.sae");
// * Bind mouse button 1 to our own fire function
bindCommand(mouse0, make, button0, TO, "Viking::Fire(1);");
bindCommand(mouse0, break, button0, TO, "Viking::Fire(0);");
$pref::PlayerFov = $Chain::NormFov;
$Chain::nSense = Client::getMouseSensitivi ty("playMap.sae");
function Viking::Fire(%fire)
{
if(%fire)
{
postAction(2048,IDACTION_ FIRE1, -0);
if(getMountedItem(0) == 13)
{
$pref::PlayerFov = $Chain::ZoomFov;
Viking::Sense($Chain::nSe nse * $Chain::Factor, 0, "Chain");
$Chain::ChgSens = "True";
}
}
else
{
postAction(2048,IDACTION_ BREAK1, -0);
$pref::PlayerFov = $Chain::NormFov;
if($Chain::ChgSens)
Viking::Sense($Chain::nSe nse, 0, "Chain");
}
}
function Viking::Sense(%sense, %flip, %script)
{
if(Client::getMouseXaxisF lip("playMap.sae"))
{
editActionmap("playmap.sae");
bindAction(mouse0, xaxis0, TO, IDACTION_YAW, Scale, %sense);
}
else
{
editActionmap("playmap.sae");
bindAction(mouse0, xaxis0, TO, IDACTION_YAW, Flip, Scale, %sense);
}
if(Client::getMouseYaxisF lip("playMap.sae"))
{
editActionmap("playmap.sae");
if(%flip)
bindAction(mouse0, yaxis0, TO, IDACTION_PITCH, Flip, Scale, %sense);
else
bindAction(mouse0, yaxis0, TO, IDACTION_PITCH, Scale, %sense);
}
else
{
editActionmap("playmap.sae");
if(%flip)
bindAction(mouse0, yaxis0, TO, IDACTION_PITCH, Scale, %sense);
else
bindAction(mouse0, yaxis0, TO, IDACTION_PITCH, Flip, Scale, %sense);
}
}
^^ make the zoom toggle-able (in-game of course)
and/or make the whole script toggleable
and/or make a seperate script that has push-button zooming, so i can start chaining and tap zoom and cg someone and tap zoom again to stop zooming
// * Normal FOV (90 is default)
$Chain::NormFov = "105";
// * Chain FOV (I use the same as above, ie. no change..)
$Chain::ZoomFov = "70";
// * Sensitivity factor, 0.5 = 50%, 1.0 means no difference
$Chain::Factor = 1.2;
// Don't touch this line
editactionmap("playmap.sae");
// * Bind mouse button 1 to our own fire function
bindCommand(mouse0, make, button0, TO, "Viking::Fire(1);");
bindCommand(mouse0, break, button0, TO, "Viking::Fire(0);");
$pref::PlayerFov = $Chain::NormFov;
$Chain::nSense = Client::getMouseSensitivi ty("playMap.sae");
function Viking::Fire(%fire)
{
if(%fire)
{
postAction(2048,IDACTION_ FIRE1, -0);
if(getMountedItem(0) == 13)
{
$pref::PlayerFov = $Chain::ZoomFov;
Viking::Sense($Chain::nSe nse * $Chain::Factor, 0, "Chain");
$Chain::ChgSens = "True";
}
}
else
{
postAction(2048,IDACTION_ BREAK1, -0);
$pref::PlayerFov = $Chain::NormFov;
if($Chain::ChgSens)
Viking::Sense($Chain::nSe nse, 0, "Chain");
}
}
function Viking::Sense(%sense, %flip, %script)
{
if(Client::getMouseXaxisF lip("playMap.sae"))
{
editActionmap("playmap.sae");
bindAction(mouse0, xaxis0, TO, IDACTION_YAW, Scale, %sense);
}
else
{
editActionmap("playmap.sae");
bindAction(mouse0, xaxis0, TO, IDACTION_YAW, Flip, Scale, %sense);
}
if(Client::getMouseYaxisF lip("playMap.sae"))
{
editActionmap("playmap.sae");
if(%flip)
bindAction(mouse0, yaxis0, TO, IDACTION_PITCH, Flip, Scale, %sense);
else
bindAction(mouse0, yaxis0, TO, IDACTION_PITCH, Scale, %sense);
}
else
{
editActionmap("playmap.sae");
if(%flip)
bindAction(mouse0, yaxis0, TO, IDACTION_PITCH, Scale, %sense);
else
bindAction(mouse0, yaxis0, TO, IDACTION_PITCH, Flip, Scale, %sense);
}
}
^^ make the zoom toggle-able (in-game of course)
and/or make the whole script toggleable
and/or make a seperate script that has push-button zooming, so i can start chaining and tap zoom and cg someone and tap zoom again to stop zooming