I don't see the problem. I rewrote all of Knockout for 1.40. The only difference is all the scripts and function names have been renamed, removed, or changed.
GameBinds::SetMap( "actionMap.sae" );
GameBinds::addBindCommand( "MyBind", "Shit::Do();" );
I'm a newb.
I've rewritten all the scripts I want.
But, maybe you can answer this for me NoFix. To add binds to the options screen I'm editing binds.cs in \base\scripts\gui\options
My question is why can't I have a script in config/modules that has a line like?
Code:GameBinds::SetMap( "actionMap.sae" ); GameBinds::addBindCommand( "MyBind", "Shit::Do();" );
I get some error "Unable to locate ActionMapList OptionsGui::actionMap"
Is it just impossible to do outside of binds.cs?
function After::GameBinds::Init()
after GameBinds::Init
{
GameBinds::GetActionMap2( "inventoryMap.sae" );
GameBinds::addBindCommand( "NEW BIND", "AutoBuy::litterItem( \"Repair Pack\" );" );
}
bliss is a faggot
looks like someone needs a time out from admin
I don't see the problem. I rewrote all of Knockout for 1.40. The only difference is all the scripts and function names have been renamed, removed, or changed.
Thanks NoFix. Small change to get it working
Code:function After::GameBinds::Init(%bind, %make, %break, %map) after GameBinds::Init { $GameBinds::CurrentMapHandle = GameBinds::GetActionMap2( %map @ ".sae"); GameBinds::addBindCommand( %bind, %make, %break); }
After::GameBinds::Init("My Bind", "BindMake", "BindBreak", "PlayMap");
////////////////////////////////////////////////////////////
// File: snipe.acs.cs
// Version: 1.0
// Author: Poop Snipe modified by Zlex for 1.40
// Credits:
// Info: Switch to Laser Rifle and crouch on zoom
//
////////////////////////////////////////////////////////////
Event::Attach(EventZoomIn, Snipe::On);
Event::Attach(EventZoomOut, Snipe::Off);
$Snipe::Weapon = "Laser Rifle";
//Turn zoomSnipe on/off
$pref::zoomSnipe == "TRUE"
function Snipe::On() {
if(GetItemCount($Snipe::Weapon) != 0 && $pref::zoomSnipe=="TRUE") {
$Snipe::On = "TRUE";
$Snipe::PrevWep = getMountedItem(0);
use($Snipe::Weapon);
postAction( 2048, IDACTION_CROUCH,1);
// schedule("Event::Trigger(SnipeZoom);",0.5);
}
}
function Snipe::Off() {
if($Snipe::On == "TRUE" && $pref::zoomSnipe=="TRUE") {
$Snipe::On = "";
useItem ($Snipe::PrevWep);
postAction( 2048, IDACTION_STAND,1);
// schedule("Event::Trigger(SnipeUnZoom);",0.5);
}
}
// this has to be done in script because zoom events are saved to demos and we
// can't alter how that's handled for backward compat reasons
Event::Attach( eventConnectionAccepted, Zoom::onJoin );
Event::Attach( eventClientDied, Zoom::onClientDied );
function Zoom::onJoin() {
// T1 zoom defaults to at 5x
$Zoom::Zoom = 1;
Zoom::Reset();
}
function Zoom::In() {
postAction( 2048, IDACTION_SNIPER_FOV, 1 );
Event::Trigger(EventZoomIn);
}
function Zoom::Out() {
postAction( 2048, IDACTION_SNIPER_FOV, 0 );
Event::Trigger(EventZoomOut);
if( $pref::resetZoom )
Zoom::Reset();
}
function Zoom::Cycle() {
postAction( 2048, IDACTION_INC_SNIPER_FOV, 1 );
if( $Zoom::Zoom < 3 )
$Zoom::Zoom++;
else
$Zoom::Zoom = 0;
}
function Zoom::Reset() {
if ( !$pref::resetZoom )
return;
$pref::defaultZoom = clamp( $pref::defaultZoom, 0, 3 );
while( $Zoom::Zoom != $pref::defaultZoom )
Zoom::Cycle();
}
function Zoom::onClientDied( %cl ) {
if ( %cl == getManagerId() )
Zoom::Reset();
}
Photoshop. What needs to be figured out is how to remove green lines from HUDs (unless Evita's patcherGui still works?) :sunny: