Always snap to grid
Legacy:Defx
Contents
Who am i[edit]
Noob coder with minor experience in scripting and map making
Projects[edit]
my goal is to make a gundam seed mod for ut2004 i know thats gonna take a while so im actually learning how first
Extended Shock Rifle (needs better name)[edit]
This is a mutator for the Shock Rifle (duh), it is supposed to change the shock ball properties according to the amount of time you hold the button, better features in the future
modified classes
class xShockrifle extends ShockRifle; defaultproperties { FireModeClass(0)=ShockBeamFire FireModeClass(1)=xShockProjFire PickupClass=class'xShockRiflePickup' }
class xShockRiflePickup extends ShockRiflePickup; defaultproperties { PickupMessage="You got the EXT Shock Rifle." InventoryType=class'xShockRifle' }
class xShockProjectile extends ShockProjectile; var int ProjSpeed; defaultproperties { Speed=900 MaxSpeed=900 Damage=75 DamageRadius=150 MomentumTransfer=70000 ComboDamage=500 ComboRadius=350 ComboMomentumTransfer=200000 LifeSpan=20.0' DrawScale=1.5 CollisionRadius=15 CollisionHeight=15 AmbientSound=Sound'WeaponSounds.ShockRifle.ShockRifleProjectile' ComboAmmoCost=5 } <uscript> </+> <+>xShockProjFire <uscript> class xShockProjFire extends ShockProjFire; var() float mSpeedMin; var() float mSpeedMax; var() float mHoldSpeedMin; var() float mHoldSpeedMax; var() float mHoldSpeedGainPerSec; var() float mHoldClampMax; var float ClickTime; function projectile SpawnProjectile(Vector Start, Rotator Dir) //taken from AssaultGrenade { local xShockProjectile g; local vector X, Y, Z; g = Weapon.Spawn(class'xShockProjectile', instigator,, Start, Dir); if (g != None) { Weapon.GetViewAxes(X,Y,Z); if ( Bot(Instigator.Controller) != None ) g.Speed = mHoldSpeedMax; else g.Speed = mHoldSpeedMax - HoldTime*mHoldSpeedGainPerSec; g.Speed = FClamp(g.Speed, mHoldSpeedMin, mHoldSpeedMax); g.Velocity = g.Speed * Vector(Dir); g.Damage *= DamageAtten; } return g; } defaultproperties { ProjectileClass=class'xShockRifle.xShockProjectile' bFireOnRelease=true mHoldSpeedMin=850 mHoldSpeedMax=1600 mHoldSpeedGainPerSec=750 }
class MutxShockRifle extends Mutator //taken from [[Weapon Mutator Tuorial]] config(user); //============================================================================= function bool CheckReplacement( Actor Other, out byte bSuperRelevant ) { local int i; local WeaponLocker L; bSuperRelevant = 0; if ( xWeaponBase(Other) != None ) { if ( string( xWeaponBase(Other).WeaponType ) ~= "XWeapons.ShockRifle" ) { xWeaponBase(Other).WeaponType = class'xShockRifle'; return false; } } else if ( WeaponPickup(Other) != None ) { if ( string(Other.Class) ~= "XWeapons.ShockRiflePickup" ) { ReplaceWith( Other, "xShockRiflePickup" ); return false; } } else if ( WeaponLocker(Other) != None ) { L = WeaponLocker(Other); for (i = 0; i < L.Weapons.Length; i++) { if ( string( L.Weapons[i].WeaponClass ) ~= "XWeapons.ShockRifle" ) L.Weapons[i].WeaponClass = class'xShockRifle'; } } return true; } //============================================================================= defaultproperties { GroupName="EXT ShockRifle" FriendlyName="EXT ShockRifle" Description="Gives the shockrifle extra combo power." }
Seed Mode[edit]
its supposed to give the pawn some special abilities once the controller reaches 100 adrenaline
this is the current code
help would be greatly appreciated, if you want you can check my thread at BUFHere
//----------------------------------------------------------- // Seed mode mutator //----------------------------------------------------------- class MutSEEDmode extends Mutator; var int AdrenalineDecrease; // Don't call Actor PreBeginPlay() for Mutator event PreBeginPlay() { SetTimer(1.0,true); } auto state Idle { function Timer() { local Controller C; for (C = Level.ControllerList; C != None; C = C.NextController) { If(C.Adrenaline == C.AdrenalineMax) { Gotostate('Start'); } //if (C.Pawn != None && C.Adrenaline <= C.AdrenalineMax ) //{ // C.Adrenaline = Min( C.Adrenaline-AdrenalineDecrease, C.AdrenalineMax ); //} } } } state Start { local Controller C; for (C = Level.ControllerList; C != None; C = C.NextController) { if (C.Pawn != None && C.Adrenaline == 100) { PlayerController(C).ClientMessage("Seed Mode activated"); C.Pawn.Health = 199; C.Pawn.GroundSpeed = 700; Gotostate('Running') } } } state Runnning { local Controller C; for (C = Level.ControllerList; C != None; C = C.NextController) { if (C.Pawn != None && C.Adrenaline > 0) { C.Adrenaline -= -1; Sleep(1.0); Gotostate('Running') } else { Gotostate('End') } } } state End { local Controller C; for (C = Level.ControllerList; C != None; C = C.NextController) { PlayerController(C).ClientMessage("Seed Mode deactivated"); C.Pawn.Health = 100; C.Pawn.GroundSpeed = 450; Gotostate('Idle') } } defaultproperties { AdrenalineDecrease=1 IconMaterialName="MutatorArt.nosym" ConfigMenuClassName="" GroupName="SEED" FriendlyName="SEED mode" Description="Seed mode is activated upon reaching 100 adrenaline." }
//----------------------------------------------------------- // SEED mode //----------------------------------------------------------- class SeedMode extends Mutator; var int AdrenalineDecrease; // Don't call Actor PreBeginPlay() for Mutator event PreBeginPlay() { SetTimer(1.0,true); } function Timer() { local Controller C; for (C = Level.ControllerList; C != None; C = C.NextController) { If(C.Adrenaline == C.AdrenalineMax) { SeedMode(); } if (C.Pawn != None && C.Adrenaline < C.AdrenalineMax ) { C.Adrenaline = Min( C.Adrenaline-AdrenalineDecrease, C.AdrenalineMax ); } } } function SeedMode() { local Controller C; for (C = Level.ControllerList; C != None; C = C.NextController) { if (C.Pawn != None && C.Adrenaline == 100) { PlayerController(C).ClientMessage("Seed Mode (well mot yet =D)"); } } } defaultproperties { AdrenalineDecrease=1 IconMaterialName="MutatorArt.nosym" ConfigMenuClassName="" GroupName="SEED" FriendlyName="SEED mode" Description="Seed mode is activated upon reaching 100 adrenaline." }
//----------------------------------------------------------- // SEED mode //----------------------------------------------------------- class SeedMode extends Mutator; var int AdrenalineDecrease; // Don't call Actor PreBeginPlay() for Mutator event PreBeginPlay() { SetTimer(1.0,true); } function Timer() { local Controller C; for (C = Level.ControllerList; C != None; C = C.NextController) { if (C.Pawn != None && C.Adrenaline < C.AdrenalineMax ) { C.Adrenaline = Min( C.Adrenaline-AdrenalineDecrease, C.AdrenalineMax ); } } } function SeedMode() { local Controller C; for (C = Level.ControllerList; C != None; C = C.NextController) { if (C.Pawn != None && C.Adrenaline == 100) { PlayerController(C).ClientMessage("Seed Mode (well mot yet =D)"); } } } defaultproperties { AdrenalineDecrease=1 IconMaterialName="MutatorArt.nosym" ConfigMenuClassName="" GroupName="SEED" FriendlyName="SEED mode" Description="Seed mode is activated upon reaching 100 adrenaline." }
Comments[edit]
MythOpus: Tip from one unreal scripter to another... Take small steps first. They really help in the long run.
Defx: Dont worry, i am ^^
Sweavo: Howdy. A tip from someone who's just spent 8 hours learning the hard way: do just about everything on the server, and test with a network game!
Guest: do just about everything on the server? what do you mean? =]
Sweavo: Check out Replication for a brain-bender. In network play, you need to be aware of what is present on the server and what is present on the client, and of the stuff that's on the client, you need to be aware of what's getting run and what isn't. In standalone mode none of that matters much. So you can get something working great in standalone mode but have to throw heaps of it away to get to network play. If your mod doesn't work in net play then it's not going to get on the public server, and won't get you chicks*.
- I can pretty much guarantee it won't get you chicks.