Reloadable Automag

From Oldunreal-Wiki
Revision as of 17:44, 21 August 2009 by Gizzy (talk | contribs) (Created page with '==Manually reloading the Automag== It's actually really simple, and only requires a small block of code to be added to the end of the Automag script. Start by opening UnrealED an…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Manually reloading the Automag

It's actually really simple, and only requires a small block of code to be added to the end of the Automag script. Start by opening UnrealED and subclassing Automag. Package and class name doesn't matter. Copy and paste the following into your new Automag:

state Idle
{
function AnimEnd()
{
PlayIdleAnim();
}
function bool PutDown()
{
GotoState('DownWeapon');
return True;
}
function Timer()
{
if (FRand()>0.8) PlayAnim('Twiddle',0.6,0.3);
else if (AnimSequence == 'Twiddle') LoopAnim('Sway1',0.02, 0.3);
}
Begin:
bPointing=False;
if ( (AmmoType != None) && (AmmoType.AmmoAmount<=0) )
Pawn(Owner).SwitchToBestWeapon();  //Goto Weapon that has Ammo
Disable('AnimEnd');
LoopAnim('Sway1',0.02, 0.1);
SetTimer(1.5,True);
if ( /*bFireMem ||*/ Pawn(Owner).bFire!=0 ) Global.Fire(0.0);
if ( /*bAltFireMem ||*/ Pawn(Owner).bAltFire!=0 ) Global.AltFire(0.0);
Looper:
if ( Pawn(Owner).bExtra3!=0) GotoState('NewClip');
Sleep(0.05);
Goto('Looper');
}

Compile and save. Once you are in a game, summon your new Automag, bind a key to the command "Button Bextra3" and hit it.