|
Hyper.nl Unreal Services The forum of Hyper.nl Unreal Services and the semi-offical resource for Winged Unicorn's Unreal mods
|
View previous topic :: View next topic |
Author |
Message |
[DK]blade_the_merc.
Joined: 09 Aug 2007 Posts: 6 Location: somewhere in the year A.D. 2101
|
Posted: Thu Aug 09, 2007 7:29 pm Post subject: automag problems |
|
|
hey it's me blade i'm having problems modding a automag (including the minigun)
well i managed to change the standard projectile but is there a way to change the alt fire to something else i've been changing the projectile class in the alt class and yet still fires standard bullets
also would anyone know how to disable the dispersion pistols charging?
also in three weeks hopefully i will be returning to the unreal world _________________ ===ALERT===
NAME:Guardian's Knight
from whom is the sword drawn?
|
|
Back to top |
|
|
mental-HunteR
Joined: 05 May 2006 Posts: 363 Location: The Netherlands
|
Posted: Fri Aug 10, 2007 12:20 am Post subject: |
|
|
Code: |
function Fire( float Value )
{
GotoState('NormalFire');
if ( PlayerPawn(Owner) != None )
PlayerPawn(Owner).ShakeView(ShakeTime, ShakeMag, ShakeVert);
bPointing=True;
PlayFiring();
if ( !bRapidFire && (FiringSpeed > 0) )
Pawn(Owner).PlayRecoil(FiringSpeed);
ProjectileFire(class'MonsterPack.P1', \\ <- ProjectileCLass ProjectileSpeed, bWarnTarget);
if ( Owner.bHidden )
CheckVisibility();
}
function AltFire( float Value )
{
GotoState('AltFiring');
if ( PlayerPawn(Owner) != None )
PlayerPawn(Owner).ShakeView(ShakeTime, ShakeMag, ShakeVert);
bPointing=True;
PlayAltFiring();
if ( !bRapidFire && (FiringSpeed > 0) )
Pawn(Owner).PlayRecoil(FiringSpeed);
ProjectileFire // AltProjectileClass ->(class'MonsterPack.QuadProj', AltProjectileSpeed, bAltWarnTarget);
if ( Owner.bHidden )
CheckVisibility();
}
function PlayFiring()
{
Owner.PlaySound(FireSound, SLOT_None, 1.8*Pawn(Owner).SoundDampening,,,1.2);
if ( PlayerPawn(Owner) != None )
PlayerPawn(Owner).ShakeView(ShakeTime, ShakeMag, ShakeVert);
PlayAnim('Shoot1',0.4,0.2);
}
function PlayAltFiring()
{
Owner.PlaySound(FireSound, SLOT_None, 1.8*Pawn(Owner).SoundDampening,,,1.2);
if ( PlayerPawn(Owner) != None )
PlayerPawn(Owner).ShakeView(ShakeTime, ShakeMag, ShakeVert);
PlayAnim('Shoot1',0.4,0.2);
}
function PlayIdleAnim()
{
TweenAnim('Idle1',0.5);
}
function TweenDown()
{
if ( GetAnimGroup(AnimSequence) == 'Select' )
TweenAnim( AnimSequence, AnimFrame * 0.4 );
else
PlayAnim('Down1', 1.0, 0.05);
}
function TweenSelect()
{
TweenAnim('Select1',0.001);
}
function PlaySelect()
{
Owner.PlaySound(SelectSound, SLOT_None, Pawn(Owner).SoundDampening);
PlayAnim('Select1',0.5,0.0);
}
| It also doenst use any ammo.
Ok now about the Automag. I got here a resource from a Monsterpack automag that fires a projectile for primary and Instant hits for altfire.
Code: |
var int NumFire;
function float RateSelf( out int bUseAltMode )
{
if ( AmmoType.AmmoAmount <=0 )
return -2;
bUseAltMode = 0;
return AIRating;
}
function AltFire( float Value )
{
GoToState('AltFiring');
}
///////////////////////////////////////////////////////
state NormalFire
{
function Fire(float F)
{
}
function AltFire(float F)
{
}
Begin:
FinishAnim();
Finish();
}
function Timer()
{
local actor targ;
local float bestAim, bestDist;
local vector FireDir;
bestAim = 0.95;
if ( Pawn(Owner) == None )
{
GotoState('');
return;
}
FireDir = vector(Pawn(Owner).ViewRotation);
targ = Pawn(Owner).PickTarget(bestAim, bestDist, FireDir, Owner.Location);
if ( Pawn(targ) != None )
{
SetTimer(1 + 4 * FRand(), false);
bPointing = true;
Pawn(targ).WarnTarget(Pawn(Owner), 200, FireDir);
}
else
{
SetTimer(0.4 + 1.6 * FRand(), false);
bPointing = false;
}
}
function PlayAltFiring()
{
if ( PlayerPawn(Owner) != None )
PlayerPawn(Owner).shakeview(ShakeTime, ShakeMag, ShakeVert);
Owner.PlaySound(FireSound, SLOT_None,Pawn(Owner).SoundDampening*3.0,,,0.9 + 0.2 * FRand());
PlayAnim('Fire', 7.6);
}
function PlayFiring()
{
Owner.PlaySound(FireSound, SLOT_None, Pawn(Owner).SoundDampening*3.0);
PlayAnim('Fire', 8.9);
}
function ProcessTraceHit(Actor Other, Vector HitLocation, Vector HitNormal, Vector X, Vector Y, Vector Z)
{
local shellcase s;
if ( PlayerPawn(Owner) != None )
{
PlayerPawn(Owner).ClientInstantFlash( -0.4, vect(650, 450, 190));
if ( PlayerPawn(Owner).DesiredFOV == PlayerPawn(Owner).DefaultFOV )
bMuzzleFlash++;
}
s = Spawn(class'ShellCase',Pawn(Owner), '', Owner.Location + CalcDrawOffset() + 30 * X + (2.8 * FireOffset.Y+5.0) * Y - Z * 1);
if ( s != None )
{
s.DrawScale = 2.0;
s.Eject(((FRand()*0.3+0.4)*X + (FRand()*0.2+0.2)*Y + (FRand()*0.3+1.0) * Z)*160);
}
if (Other == Level)
Spawn(class'MercFlare0',,, HitLocation+HitNormal*9, Rotator(HitNormal));
else if ( (Other != self) && (Other != Owner) && (Other != None) )
{
if ( Other.IsA('Pawn') && (HitLocation.Z - Other.Location.Z > 0.62 * Other.CollisionHeight)
&& (instigator.IsA('PlayerPawn') || (instigator.skill > 1))
&& (!Other.IsA('ScriptedPawn') || !ScriptedPawn(Other).bIsBoss) )
Other.TakeDamage(4500, Pawn(Owner), HitLocation, 35000 * X, 'decapitated');
else
Other.TakeDamage(201, Pawn(Owner), HitLocation, 30000.0*X, 'shot');
if ( !Other.IsA('Pawn') && !Other.IsA('Carcass') )
spawn(class'ParticleBurst0',,,HitLocation+HitNormal*9);
}
}
function Finish()
{
//bMuzzleFlash = 0;
if ( ((Pawn(Owner).bFire!=0) || (Pawn(Owner).bAltFire!=0)) && (FRand() < 0.6) )
Timer();
Super.Finish();
}
state Idle
{
function AltFire( float Value )
{
GoToState('AltFiring');
}
function Fire( float Value )
{
if (AmmoType.UseAmmo(1))
{
GotoState('NormalFire');
if ( PlayerPawn(Owner) != None )
PlayerPawn(Owner).ShakeView(ShakeTime, ShakeMag, ShakeVert);
bPointing=True;
TraceFire(0.0);
PlayFiring();
CheckVisibility();
}
}
function BeginState()
{
if (Pawn(Owner).bFire!=0) Fire(0.0);
bPointing = false;
SetTimer(0.4 + 1.6 * FRand(), false);
Super.BeginState();
}
function EndState()
{
SetTimer(0.0, false);
Super.EndState();
}
Begin:
bPointing=False;
if ( (AmmoType != None) && (AmmoType.AmmoAmount<=0) )
Pawn(Owner).SwitchToBestWeapon(); //Goto Weapon that has Ammo
if ( Pawn(Owner).bFire!=0 ) Fire(0.0);
Disable('AnimEnd');
PlayIdleAnim();
}
///////////////////////////////////////////////////////
state AltFiring
{
function Timer()
{
if (Pawn(Owner).bAltFire == 0)
{
if (PlayerPawn(Owner) != None)
PlayerPawn(Owner).StopZoom();
SetTimer(0.0,False);
GoToState('Idle');
}
}
Begin:
if ( Owner.IsA('PlayerPawn') )
{
PlayerPawn(Owner).ToggleZoom();
SetTimer(0.075,True);
}
else
{
Pawn(Owner).bFire = 1;
Pawn(Owner).bAltFire = 0;
Global.Fire(0);
}
}
///////////////////////////////////////////////////////////
function PlayIdleAnim()
{
PlayAnim('Loading',1.2);
PlaySound(sound'EightRLoad', SLOT_Interface);
}
|
As you see it uses some part of the stinger script. If your planning to use this id will be that nice if your giving me credit.. _________________
|
|
Back to top |
|
|
[DK]blade_the_merc.
Joined: 09 Aug 2007 Posts: 6 Location: somewhere in the year A.D. 2101
|
Posted: Fri Aug 10, 2007 12:30 am Post subject: |
|
|
i've actually been doing the work from it's properties but i'll try those i just need to transfer them via flash-drive form this laptop to my main computer
i was going to make three
one that shoots pulse guns shots standard
and shockrifle alt. for alt. fire
2nd automag will use flak-shells normal fire
and the alt.fire was going to be a rocket
3rd automag would fire razor blades standard fire
alt.fire is dammo2. _________________ ===ALERT===
NAME:Guardian's Knight
from whom is the sword drawn?
Last edited by [DK]blade_the_merc. on Fri Aug 10, 2007 6:12 am; edited 1 time in total |
|
Back to top |
|
|
[DK]blade_the_merc.
Joined: 09 Aug 2007 Posts: 6 Location: somewhere in the year A.D. 2101
|
Posted: Fri Aug 10, 2007 12:42 am Post subject: |
|
|
well this is getting confusing.
mind giving me a low down on how to work this?
my modding is only limited to what i've read from cheese tutorial -_- _________________ ===ALERT===
NAME:Guardian's Knight
from whom is the sword drawn?
|
|
Back to top |
|
|
[DK]blade_the_merc.
Joined: 09 Aug 2007 Posts: 6 Location: somewhere in the year A.D. 2101
|
Posted: Fri Aug 10, 2007 1:27 am Post subject: |
|
|
to make things clearier
i create a testmag.testmag
then i hit f7
then i go select the testmag.testmag and click default.
i then change both projectile class and the alt class
i set the instanthits to false and the projectile class works whlie the altprojectile class doesn't. _________________ ===ALERT===
NAME:Guardian's Knight
from whom is the sword drawn?
|
|
Back to top |
|
|
mental-HunteR
Joined: 05 May 2006 Posts: 363 Location: The Netherlands
|
Posted: Fri Aug 10, 2007 11:14 pm Post subject: |
|
|
Send IT to me and i will fix it. _________________
|
|
Back to top |
|
|
[DK]blade_the_merc.
Joined: 09 Aug 2007 Posts: 6 Location: somewhere in the year A.D. 2101
|
Posted: Fri Aug 10, 2007 11:29 pm Post subject: |
|
|
alright hang on _________________ ===ALERT===
NAME:Guardian's Knight
from whom is the sword drawn?
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|