Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////---------------------MY GAMEINFO CLASS---------------------/////////////
- class TDSGameInfo extends GameInfo;
- var TDSSpawner Spawner;
- var vector SpawnLocation;
- var int Lives, Multiplier, Bombs, Score, Difficulty;
- var PlayerController PC;
- var TDSPlayerController MainController;
- simulated function PostBeginPlay()
- {
- super.PostBeginPlay();
- Lives = 5;
- foreach WorldInfo.AllControllers(class'PlayerController', PC)
- {
- if(PC.IsLocalPlayerController())
- {
- MainController = TDSPlayerController(PC);
- break;
- }
- }
- Spawner = Spawn(class'TDSSpawner', , , MainController.Pawn.Location, , ,);
- }
- function Tick(float DeltaTime)
- {
- // Game director code here
- `log(MainController.Pawn.Location);
- }
- defaultproperties
- {
- DefaultPawnClass=class'TDSPlayer'
- PlayerControllerClass=class'TDSPlayerController'
- bDelayedStart=false
- }
- /////////////---------------------MY CAMERA CLASS---------------------/////////////
- class TDSCamera extends Camera;
- var vector CamLocation, CLoc, CapLocation;
- var rotator CamRotation, CapRotation;
- var TDSPlayerController PController;
- var TPOV TDSPov;
- //var SceneCapture2DActor Cap;
- var Actor A;
- simulated event PostBeginPlay()
- {
- super.PostBeginPlay();
- CamRotation.Pitch = -16384;
- CamRotation.Roll = 0;
- CamRotation.Yaw = 0;
- PController = TDSPlayerController(Owner);
- //Cap = Spawn(class'TDSSceneCapture2DActor');
- }
- function UpdateViewTarget(out TViewTarget OutVT, float DeltaTime)
- {
- DebugPlayerCoords();
- CamLocation.X = (0 + PController.Pawn.Location.X) / 1.3;
- CamLocation.Y = (0 + PController.Pawn.Location.Y) / 1.3;
- //CamRotation.Pitch = -16384 + (0 + PController.Pawn.Location.X) * 3;
- //CamRotation.Roll = (PController.Pawn.Location.Y) * 3;
- //CapRotation.Pitch = -16384;
- //CapRotation.Roll= -16384;
- CLoc = CamLocation;
- CLoc.Y = CamLocation.Y + 15000;
- CamLocation.Z = (PController.Pawn.Location.Z + 1000);
- //CapLocation = CamLocation;
- //CapLocation.X = (0 + PController.Pawn.Location.X) / 3;
- //CapLocation.Y = (0 + PController.Pawn.Location.Y) / 3;
- //CapLocation.Z += 400;
- //Cap.SetLocation(CamLocation);
- //Cap.SetRotation(CapRotation);
- TDSPov.Location = CamLocation;
- TDSPov.Rotation = CamRotation;
- OutVT.POV = TDSPov;
- }
- function DebugPlayerCoords()
- {
- //`log("X = " @ PController.Pawn.Location.X);
- // `log("y = " @ PController.Pawn.Location.Y);
- // `log("z = " @ PController.Pawn.Location.Z);
- // `log("direction = " @ normal(PController.Pawn.Velocity);
- // `log("velocity = " @ PController.Pawn.Velocity);
- }
- defaultproperties
- {
- }
- /////////////---------------------MY PLAYER PAWN CLASS---------------------/////////////
- class TDSPlayer extends Pawn;
- var vector NewLoc;
- var rotator MoveDir;
- var rotator NewRotation;
- simulated event PostBeginPlay()
- {
- super.PostBeginPlay();
- }
- function Tick(float DeltaTime)
- {
- }
- defaultproperties
- {
- bAllowFluidSurfaceInteraction=TRUE
- Physics=PHYS_None
- Components.Remove(Sprite)
- Begin Object Class=DynamicLightEnvironmentComponent Name=MyLightEnvironment
- ModShadowFadeoutTime=0.25
- MinTimeBetweenFullUpdates=0.2
- AmbientGlow=(R=.01,G=.01,B=.01,A=1)
- AmbientShadowColor=(R=0.15,G=0.15,B=0.15)
- LightShadowMode=LightShadow_ModulateBetter
- ShadowFilterQuality=SFQ_High
- bSynthesizeSHLight=TRUE
- End Object
- Components.Add(MyLightEnvironment)
- Begin Object Class=SkeletalMeshComponent Name=InitialSkeletalMesh
- CastShadow=true
- bCastDynamicShadow=true
- bOwnerNoSee=false
- LightEnvironment=MyLightEnvironment;
- BlockRigidBody=true;
- CollideActors=true;
- BlockZeroExtent=true;
- SkeletalMesh=SkeletalMesh'TopDownShooter.SkeletalMeshes.ship'
- End Object
- Mesh=InitialSkeletalMesh;
- Components.Add(InitialSkeletalMesh);
- Begin Object Class=PointLightComponent Name=PointLightComponent0
- Brightness=20
- Radius=300
- LightingChannels=(BSP=TRUE,Static=TRUE,Dynamic=TRUE,bInitialized=TRUE)
- End Object
- Components.Add(PointLightComponent0)
- }
- /////////////---------------------MY ENEMY CLASS---------------------/////////////
- class TDSEnemy extends UTProjectile;
- var vector DefaultLocation;
- simulated function PostBeginPlay()
- {
- Super.PostBeginPlay();
- SeekTarget = ...TheMainController.PawnToChase...
- }
- defaultproperties
- {
- ProjFlightTemplate=ParticleSystem'WP_RocketLauncher.Effects.P_WP_RocketLauncher_RocketTrail'
- ProjExplosionTemplate=ParticleSystem'WP_RocketLauncher.Effects.P_WP_RocketLauncher_RocketExplosion'
- ExplosionDecal=MaterialInstanceTimeVarying'WP_RocketLauncher.Decals.MITV_WP_RocketLauncher_Impact_Decal01'
- DecalWidth=128.0
- DecalHeight=128.0
- speed=1350.0
- MaxSpeed=1350.0
- Damage=100.0
- DamageRadius=220.0
- MomentumTransfer=85000
- MyDamageType=class'UTDmgType_Rocket'
- LifeSpan=8.0
- AmbientSound=SoundCue'A_Weapon_RocketLauncher.Cue.A_Weapon_RL_Travel_Cue'
- ExplosionSound=SoundCue'A_Weapon_RocketLauncher.Cue.A_Weapon_RL_Impact_Cue'
- RotationRate=(Roll=50000)
- bCollideWorld=true
- CheckRadius=42.0
- bCheckProjectileLight=true
- ProjectileLightClass=class'UTGame.UTRocketLight'
- ExplosionLightClass=class'UTGame.UTRocketExplosionLight'
- bWaitForEffects=true
- bAttachExplosionToVehicles=false
- }
- /////////////---------------------MY PLAYERCONTROLLER CLASS---------------------/////////////
- class TDSPlayerController extends PlayerController;
- var rotator NewRotation;
- simulated event PostBeginPlay()
- {
- super.PostBeginPlay();
- }
- function Tick(float DeltaTime)
- {
- //NewRotation = Rotation;
- //NewRotation.Pitch = -16384;
- //SetRotation(NewRotation);
- NewRotation.Pitch = -16384 + Rotation.Pitch - (Pawn.Velocity.X * 10);
- NewRotation.Roll = Rotation.Roll - (Pawn.Velocity.Y * 10);
- NewRotation.Yaw = Rotation.Yaw;
- SetRotation(NewRotation);
- `log(Velocity);
- }
- defaultproperties
- {
- CameraClass=class'TDSCamera'
- }
- /////////////---------------------MY ENEMYSPAWNER CLASS---------------------/////////////
- class TDSSpawner extends Actor;
- var TDSEnemy Enemy;
- var vector NewLocation;
- simulated function PostBeginPlay()
- {
- super.PostBeginPlay();
- NewSpawn();
- }
- function NewSpawn()
- {
- NewLocation = Location;
- NewLocation.Z += 300;
- Enemy = Spawn(class'TDSEnemy', , , NewLocation, , ,);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement