T1 Help

Dragon-Fighter
07-18-2003, 01:45 PM
Does anyone one knows what line should i write at autoexec.cs for instance so my default zoom range at T1 would be x2 and not x5 ?

Nikita
07-18-2003, 06:50 PM
// // // // // // // // // //
// Zoom.cs //
// // // // // // // // // //
editActionMap("playMap.sae");
bindCommand(keyboard0, make, "e", TO, "Zoom::Zoom();");
bindCommand(keyboard0, break, "e", TO, "Zoom::UnZoom();");
bindCommand(keyboard0, make, "x", TO, "Zoom::ZoomIn();");
bindCommand(keyboard0, break, "x", TO, "");


// [meph]DooM!
//
// Regular 2/5/10/20X zoom range, but when you zoom out it will automatically reset it back to 2X.
//
//

$Zoom::Zoom = 1; // T1 zoom defaults to at 5x
$Zoom::DefaultZoom = 1;
$Zoom::ResetZoom = true;

// zooming in
function Zoom::Zoom()
{
postAction(2048, IDACTION_SNIPER_FOV, 1.000000);
}

// releasing zoom
function Zoom::UnZoom()
{
postAction(2048, IDACTION_SNIPER_FOV, 0.000000);

if( $Zoom::ResetZoom )
Zoom::resetZoom();
}

// cycling zoom levels
function Zoom::ZoomIn()
{
postAction(2048, IDACTION_INC_SNIPER_FOV, 1.000000);
if( $Zoom::Zoom < 4 )
$Zoom::Zoom++;
else
$Zoom::Zoom = 1;
}

// reset zoom to desired zoom when we zoom out
function Zoom::resetZoom()
{
while( $Zoom::Zoom != $Zoom::DefaultZoom )
Zoom::ZoomIn();
}

function Zoom::JoinResetZoom()
{
$Zoom::Zoom = 2;

Zoom::resetZoom();
}

// Events...
Event::Attach(eventConnec ted, "Zoom::JoinResetZoom();");

Dragon-Fighter
07-19-2003, 02:34 AM
thanks a lot

Nikita
07-19-2003, 02:37 PM
Oops, forgot one thing. Edited.

Dragon-Fighter
07-19-2003, 03:59 PM
Figured it out by myself ;)