![]() |
|
|
#1 |
|
Registered User
Join Date: May. 11th, 2006
Posts: 374
|
Zippy Labs War moneky beta.
Zippy kitty has a new thing to naw on , the War Monkey beta..and yes all my crap is beta.
Still working on fire modes but slower more accurate and stronger than the UT0X AR, grenade is going to be painted yellow..and be more damaged than the normal AR but I plan on having it roll the barrel firing either bullets or a fast projectile. Using the old Assault Rifle with edited skin Solved my specular/shine issues(finally!) Here's a couple screen shots ![]() ![]() Here's the pic I need to fix it, sharpen it and make the brown color alil lighter as so you can see the stitches. BTW you guys got any better monkey or banana pics? I had to do a lot to get to come out right. I do have a few bugs that have seemed to come with moving the folder to my new windows installation, first off I cannot use unreal ed to simply import my textures anymore it saves but the new texture is not in it also it seems with the new texture the animation is sticks after you fire a shot..its just odd also when I export the grenadetex I get the round grenade and not the newer one...perhaps I just need to reinstall unreal anthology and reapply my mods. Also I have a question how do I tie the grenade barrel animation with a normal bullet? I should be able to port the code sets from AssaultGrenade to something that extends assault fire it should work... I think (and before you whine about my poor coding skills why not help me by point out tutorials I can naw on :P) Updated the skin some, and yes theres a slight gamma boost to the pic. ![]() Also made the alt fire a flack chuck like bullet you can charge it like the grenade for a faster projectile, still working on damage but I want at least 1-2 hits to kill most targets ammo is grenades 12 start 24 max. -------------------------- So I have switched to making this a slow accurate primary and faster and lose alt fire but I have issues flash and wall effect on with dual mode and wall effect for the alt fire with a single weapon, its quit annoying. The old flack chunk war monkey is now named the mongoose, also going to make a War Monkey special to use mini gun ammo. -------------------------------------------- NEW Videos!(crappy videos but videos non the less) War Monkey http://www.viddyou.com/viddstream?videoid=41189 Mongoose http://www.viddyou.com/viddstream?videoid=41437
__________________
I is fuzzy braiwned mew =0-o= ------------------------------------------------------ How the fck do we implement this?!?! The voices demand it be done! -------------------- http://zippydsmlee.wordpress.com/ Last edited by ZippyDSMlee; 15th Sep 2008 at 07:17 PM. |
|
|
|
|
|
#2 |
|
Registered User
Join Date: May. 11th, 2006
Posts: 374
|
I am surprised I worked it all out by bulldogging the code until it worked right, I'll show that at the bottom here are my new skins
Old ![]() NEWEST ![]() really pound of the logo I "burned" into the side there :P man I am surprised I found and tweaked the code so bullet effects would work in both modes 0-o also found the code to adjust fire rate in dual mode even cut and pasted the same thing with it set on adjusting the alt fire mode so I can now tweak then individually! Here's the code mangled much like my grammar I am sure ![]() I am posting just the weapon and attach codes BTW as theyare the main ones to handle fire effects. Code:
//=============================================================================
// Assault Rifle
//=============================================================================
class warmonk extends weapon
config(user);
var float DualPickupTime;
var AssaultAttachment OffhandActor;
var bool bDualMode;
var bool bWasDualMode;
var bool bFireLeft;
#EXEC OBJ LOAD FILE=Zippyut4k.utx
#exec texture IMPORT NAME=warmonknew FILE=textures\warmonknew.dds
replication
{
reliable if ( Role == ROLE_Authority )
bDualMode;
}
simulated function Loaded()
{
bDualMode = true;
}
simulated function PostNetBeginPlay()
{
Super.PostNetBeginPlay();
if ( (Role < ROLE_Authority) && (Instigator != None) && (Instigator.Controller != None) && (Instigator.Weapon != self) && (Instigator.PendingWeapon != self) )
Instigator.Controller.ClientSwitchToBestWeapon();
}
simulated function bool WeaponCentered()
{
return !bDualMode && Super.WeaponCentered();
}
simulated event RenderOverlays( Canvas Canvas )
{
local bool bRealHidden;
local int RealHand;
if (Instigator == None)
return;
if ( Instigator.Controller != None )
Hand = Instigator.Controller.Handedness;
if ((Hand < -1.0) || (Hand > 1.0))
return;
RealHand = Hand;
if ( bDualMode && (Hand == 0) )
{
Instigator.Controller.Handedness = -1;
Hand = -1;
}
if ( bDualMode && (FireMode[2].FlashEmitter != None) )
{
bRealHidden = FireMode[2].FlashEmitter.bHidden;
if ( bFireLeft )
FireMode[2].FlashEmitter.bHidden = true;
Super.RenderOverlays(Canvas);
FireMode[2].FlashEmitter.bHidden = bRealHidden;
}
else
Super.RenderOverlays(Canvas);
if ( bDualMode )
RenderDualOverlay(Canvas);
if ( Instigator.Controller != None )
Instigator.Controller.Handedness = RealHand;
}
simulated function RenderDualOverlay(Canvas Canvas)
{
local vector NewScale3D;
local rotator WeaponRotation;
local bool bRealHidden;
Hand *= -1;
newScale3D = Default.DrawScale3D;
newScale3D.Y *= Hand;
SetDrawScale3D(newScale3D);
PlayerViewPivot.Roll = Default.PlayerViewPivot.Roll * Hand;
PlayerViewPivot.Yaw = Default.PlayerViewPivot.Yaw * Hand;
RenderedHand = Hand;
if ( class'PlayerController'.Default.bSmallWeapons )
PlayerViewOffset = SmallViewOffset;
else
PlayerViewOffset = Default.PlayerViewOffset;
PlayerViewOffset.Y *= Hand;
SetLocation( Instigator.Location + Instigator.CalcDrawOffset(self) );
WeaponRotation = Instigator.GetViewRotation();
if ( bDualMode != bWasDualMode )
{
bWasDualMode = true;
DualPickupTime = Level.Timeseconds;
}
if ( DualPickupTime > Level.TimeSeconds - 0.5 )
WeaponRotation.Pitch = WeaponRotation.Pitch - 16384 - 32768 * (DualPickupTime - Level.TimeSeconds);
SetRotation( WeaponRotation );
bDrawingFirstPerson = true;
/*if ( bDualMode && (FireMode[1].FlashEmitter != None) )
{
bRealHidden = FireMode[1].FlashEmitter.bHidden;
if ( !bFireLeft )
FireMode[1].FlashEmitter.bHidden = true;
Canvas.DrawActor(self, false, false, DisplayFOV);
FireMode[1].FlashEmitter.bHidden = bRealHidden;
}
else */
Canvas.DrawActor(self, false, false, DisplayFOV);
bDrawingFirstPerson = false;
Hand *= -1;
}
/*
simulated function DetachFromPawn(Pawn P)
{
bFireLeft = true;
AssaultGrenade(FireMode[1]).ReturnToIdle();
Super.DetachFromPawn(P);
if ( OffhandActor != None )
{
OffhandActor.Destroy();
OffhandActor = None;
}
}
*/
function AttachToPawn(Pawn P)
{
local name BoneName;
if ( ThirdPersonActor == None )
{
ThirdPersonActor = Spawn(AttachmentClass,Owner);
InventoryAttachment(ThirdPersonActor).InitFor(self);
}
BoneName = P.GetWeaponBoneFor(self);
if ( BoneName == '' )
{
ThirdPersonActor.SetLocation(P.Location);
ThirdPersonActor.SetBase(P);
}
else
P.AttachToBone(ThirdPersonActor,BoneName);
if ( bDualMode )
{
BoneName = P.GetOffHandBoneFor(self);
if ( BoneName == '' )
return;
if ( OffhandActor == None )
{
OffhandActor = AssaultAttachment(Spawn(AttachmentClass,Owner));
OffhandActor.InitFor(self);
}
P.AttachToBone(OffhandActor,BoneName);
if ( OffhandActor.AttachmentBone == '' )
OffhandActor.Destroy();
else
{
ThirdPersonActor.SetDrawScale(0.3);
OffhandActor.SetDrawScale(0.3);
OffhandActor.bDualGun = true;
OffhandActor.TwinGun = AssaultAttachment(ThirdPersonActor);
if ( Mesh == OldMesh )
{
OffhandActor.SetRelativeRotation(rot(0,32768,0));
OffhandActor.SetRelativeLocation(vect(20,-10,-5));
}
else
{
OffhandActor.SetRelativeRotation(rot(0,0,32768));
OffhandActor.SetRelativeLocation(vect(40,-3,-7));
}
AssaultAttachment(ThirdPersonActor).TwinGun = OffhandActor;
}
}
}
simulated function DrawWeaponInfo(Canvas Canvas)
{
NewDrawWeaponInfo(Canvas, 0.705*Canvas.ClipY);
}
simulated function NewDrawWeaponInfo(Canvas Canvas, float YPos)
{
local int i,Count;
local float ScaleFactor;
ScaleFactor = 99 * Canvas.ClipX/3200;
Canvas.Style = ERenderStyle.STY_Alpha;
Canvas.DrawColor = class'HUD'.Default.WhiteColor;
Count = Min(0,AmmoAmount(1));
for( i=0; i<Count; i++ )
{
Canvas.SetPos(Canvas.ClipX - (0.5*i+1) * ScaleFactor, YPos);
Canvas.DrawTile( Material'HudContent.Generic.HUD', ScaleFactor, ScaleFactor, 174, 259, 46, 45);
}
if ( AmmoAmount(1) > 0 )
{
Count = Min(0,AmmoAmount(1));
for( i=0; i<Count; i++ )
{
Canvas.SetPos(Canvas.ClipX - (0.5*(i-8)+1) * ScaleFactor, YPos - ScaleFactor);
Canvas.DrawTile( Material'HudContent.Generic.HUD', ScaleFactor, ScaleFactor, 174, 259, 46, 45);
}
}
}
function byte BestMode()
{
local Bot B;
B = Bot(Instigator.Controller);
if ( (B != None) && (B.Enemy != None) )
{
if ( ((FRand() < 0.1) || !B.EnemyVisible()) && (AmmoAmount(1) >= FireMode[1].AmmoPerFire) )
return 1;
}
if ( AmmoAmount(0) >= FireMode[0].AmmoPerFire )
return 0;
return 1;
}
/*
simulated function float ChargeBar()
{
return FMin(1,FireMode[2].HoldTime/AssaultGrenade(FireMode[2]).mHoldClampMax);
}*/
function bool HandlePickupQuery( pickup Item )
{
if ( class == Item.InventoryType )
{
if ( bDualMode )
return super.HandlePickupQuery(Item);
bDualMode = true;
if ( Instigator.Weapon == self )
{
PlayOwnedSound(SelectSound, SLOT_Interact,,,,, false);
AttachToPawn(Instigator);
}
if (Level.GRI.WeaponBerserk > 1.0)
CheckSuperBerserk();
else
FireMode[0].FireRate = FireMode[0].Default.FireRate * 0.75;
FireMode[1].FireRate = FireMode[1].Default.FireRate * 0.65;
FireMode[0].Spread = FireMode[0].Default.Spread * 0.5;
FireMode[1].Spread = FireMode[1].Default.Spread * 0.5;
if (xPawn(Instigator) != None && xPawn(Instigator).bBerserk)
StartBerserk();
return false;
}
if ( item.inventorytype == AmmoClass[0] )
{
if ( (AmmoCharge[1] >= MaxAmmo(1)) && (AmmoCharge[0] >= MaxAmmo(0)) )
return true;
item.AnnouncePickup(Pawn(Owner));
AddAmmo(50, 0);
AddAmmo(Ammo(item).AmmoAmount, 1);
item.SetRespawn();
return true;
}
if ( Inventory == None )
return false;
return Inventory.HandlePickupQuery(Item);
}
simulated function int MaxAmmo(int mode)
{
if ( bDualMode )
return 2 * FireMode[mode].AmmoClass.Default.MaxAmmo;
else
return FireMode[mode].AmmoClass.Default.MaxAmmo;
}
function float GetAIRating()
{
local Bot B;
if ( !bDualMode )
return AIRating;
B = Bot(Instigator.Controller);
if ( B == None )
return AIRating;
if ( B.Enemy == None )
{
if ( (B.Target != None) && VSize(B.Target.Location - B.Pawn.Location) > 8000 )
return 0.78;
return AIRating;
}
return (AIRating + 0.0003 * FClamp(1500 - VSize(B.Enemy.Location - Instigator.Location),0,1000));
}
defaultproperties
{
FireModeClass(0)=Class'ziplabsXwarmonk.warmonklfire'
FireModeClass(1)=Class'ziplabsXwarmonk.warmonklaltlfire'
//FireModeClass(0)=Class'ziplabsXwarmonk.warmonklfire'
//FireModeClass(1)=Class'ziplabsXwarmonk.warmonklaltlfire'
PutDownAnim="PutDown"
SelectSound=Sound'WeaponSounds.AssaultRifle.SwitchToAssaultRifle'
SelectForce="SwitchToAssaultRifle"
AIRating=0.400000
CurrentRating=0.400000
bShowChargingBar=false
OldMesh=SkeletalMesh'Weapons.AssaultRifle_1st'
OldPickup="WeaponStaticMesh.AssaultRiflePickup"
OldCenteredOffsetY=0.000000
OldPlayerViewOffset=(X=-8.000000,Y=5.000000,Z=-6.000000)
OldSmallViewOffset=(X=4.000000,Y=11.000000,Z=-12.000000)
OldPlayerViewPivot=(Pitch=400)
OldCenteredRoll=3000
Description="Put war monkey bio here.... :P ."
EffectOffset=(X=100.000000,Y=25.000000,Z=-10.000000)
DisplayFOV=70.000000
Priority=5
HudColor=(B=192,G=128)
SmallViewOffset=(X=13.000000,Y=12.000000,Z=-10.000000)
CenteredOffsetY=-5.000000
CenteredRoll=3000
CenteredYaw=-1500
CustomCrosshair=11
CustomCrossHairScale=0.666700
CustomCrossHairTextureName="Crosshairs.HUD.Crosshair_Cross5"
InventoryGroup=2
PickupClass=Class'ziplabsXwarmonk.warmonkpickup'
PlayerViewOffset=(X=4.000000,Y=5.500000,Z=-6.000000)
PlayerViewPivot=(Pitch=400)
BobDamping=1.700000
AttachmentClass=Class'ziplabsXwarmonk.warmonklATT'
// IconMaterial=Texture'HUDContent.Generic.HUD'
// IconCoords=(X1=245,Y1=39,X2=329,Y2=79)
ItemName="Zippylabs:War Monkey"
LightType=LT_Pulse
LightEffect=LE_NonIncidence
LightHue=30
LightSaturation=150
LightBrightness=255.000000
LightRadius=4.000000
LightPeriod=3
Mesh=SkeletalMesh'NewWeapons2004.AssaultRifle'
DrawScale=0.800000
HighDetailOverlay=Combiner'UT2004Weapons.WeaponSpecMap2'
Skins(0)=Texture'ziplabsXwarmonk.warmonknew'
}
Code:
class warmonklATT extends xWeaponAttachment;
var byte OldSpawnHitCount;
var class<xEmitter> mMuzFlashClass;
var xEmitter mMuzFlash3rd;
var xEmitter mMuzFlash3rdAlt;
var bool bDualGun;
var AssaultAttachment TwinGun;
var float AimAlpha;
replication
{
reliable if ( Role == ROLE_Authority )
bDualGun, TwinGun;
}
simulated function Hide(bool NewbHidden)
{
bHidden = NewbHidden;
if ( TwinGun != None )
TwinGun.bHidden = bHidden;
}
simulated function Destroyed()
{
if ( bDualGun )
{
if ( Instigator != None )
{
Instigator.SetBoneDirection(AttachmentBone, Rotation,, 0, 0);
Instigator.SetBoneDirection('lfarm', Rotation,, 0, 0);
}
}
if (mMuzFlash3rd != None)
mMuzFlash3rd.Destroy();
if (mMuzFlash3rdAlt != None)
mMuzFlash3rdAlt.Destroy();
Super.Destroyed();
}
simulated function SetOverlayMaterial( Material mat, float time, bool bOverride )
{
Super.SetOverlayMaterial(mat, time, bOverride);
if ( !bDualGun && (TwinGun != None) )
TwinGun.SetOverlayMaterial(mat, time, bOverride);
}
simulated function Tick(float deltatime)
{
local rotator newRot;
if ( !bDualGun || (Level.NetMode == NM_DedicatedServer) )
{
Disable('Tick');
return;
}
AimAlpha = AimAlpha * ( 1 - 2*DeltaTime);
// point in firing direction
if ( Instigator != None )
{
newRot = Instigator.Rotation;
if ( AimAlpha < 0.5 )
newRot.Yaw += 4500 * (1 - 2*AimAlpha);
Instigator.SetBoneDirection('lfarm', newRot,, 1.0, 1);
newRot.Roll += 32768;
Instigator.SetBoneDirection(AttachmentBone, newRot,, 1.0, 1);
}
}
/* UpdateHit
- used to update properties so hit effect can be spawn client side
*/
function UpdateHit(Actor HitActor, vector HitLocation, vector HitNormal)
{
SpawnHitCount++;
mHitLocation = HitLocation;
mHitActor = HitActor;
mHitNormal = HitNormal;
}
simulated function MakeMuzzleFlash()
{
local rotator r;
AimAlpha = 1;
if ( TwinGun != None )
TwinGun.AimAlpha = 1;
if (mMuzFlash3rd == None)
{
mMuzFlash3rd = Spawn(mMuzFlashClass);
AttachToBone(mMuzFlash3rd, 'tip');
}
mMuzFlash3rd.mStartParticles++;
r.Roll = Rand(65536);
SetBoneRotation('Bone_Flash', r, 0, 1.f);
}
simulated event ThirdPersonEffects()
{
local rotator r;
local PlayerController PC;
if ( Level.NetMode != NM_DedicatedServer )
{
AimAlpha = 1;
if ( TwinGun != None )
TwinGun.AimAlpha = 1;
if (FiringMode == 0)
//=========zippy find part of alt fire effect code
{
WeaponLight();
if ( OldSpawnHitCount != SpawnHitCount )
{
OldSpawnHitCount = SpawnHitCount;
GetHitInfo();
PC = Level.GetLocalPlayerController();
if ( ((Instigator != None) && (Instigator.Controller == PC)) || (VSize(PC.ViewTarget.Location - mHitLocation) < 4000) )
{
Spawn(class'HitEffect'.static.GetHitEffect(mHitActor, mHitLocation, mHitNormal),,, mHitLocation, Rotator(mHitNormal));
CheckForSplash();
}
}
MakeMuzzleFlash();
if ( !bDualGun && (TwinGun != None) )
TwinGun.MakeMuzzleFlash();
}
else if ( Level.NetMode != NM_DedicatedServer )
AimAlpha = 1;
if ( TwinGun != None )
TwinGun.AimAlpha = 1;
if (FiringMode == 1)
//=========zippy find part of alt fire effect code
{
WeaponLight();
if ( OldSpawnHitCount != SpawnHitCount )
{
OldSpawnHitCount = SpawnHitCount;
GetHitInfo();
PC = Level.GetLocalPlayerController();
if ( ((Instigator != None) && (Instigator.Controller == PC)) || (VSize(PC.ViewTarget.Location - mHitLocation) < 4000) )
{
Spawn(class'HitEffect'.static.GetHitEffect(mHitActor, mHitLocation, mHitNormal),,, mHitLocation, Rotator(mHitNormal));
CheckForSplash();
}
}
MakeMuzzleFlash();
if ( !bDualGun && (TwinGun != None) )
TwinGun.MakeMuzzleFlash();
}
/* else if (FiringMode == 1 && FlashCount > 1)
{
WeaponLight();
if (mMuzFlash3rdAlt == None)
{
mMuzFlash3rdAlt = Spawn(mMuzFlashClass);
AttachToBone(mMuzFlash3rdAlt, 'tip2');
}
mMuzFlash3rdAlt.mStartParticles++;
r.Roll = Rand(65536);
SetBoneRotation('Bone_Flash02', r, 0, 1.f);
}*/
}
Super.ThirdPersonEffects();
}
defaultproperties
{
mMuzFlashClass=Class'XEffects.AssaultMuzFlash3rd'
bRapidFire=True
SplashEffect=Class'XGame.BulletSplash'
LightType=LT_Pulse
LightEffect=LE_NonIncidence
LightHue=30
LightSaturation=150
LightBrightness=255.000000
LightRadius=3.000000
LightPeriod=3
Mesh=SkeletalMesh'NewWeapons2004.NewAssaultRifle_3rd'
RelativeLocation=(X=-20.000000,Y=-5.000000)
RelativeRotation=(Pitch=32768)
DrawScale=0.300000
}
__________________
I is fuzzy braiwned mew =0-o= ------------------------------------------------------ How the fck do we implement this?!?! The voices demand it be done! -------------------- http://zippydsmlee.wordpress.com/ |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|