// // AICTPGameGameMode::BeginPlay // void AICTPGameGameMode::BeginPlay() { Super::BeginPlay(); bHasLevelEndTriggered = false; PlayerControllerClass = RobotPlayerControllerClass; Players.Add( InitialisePlayerController( EPlayerID::One ) ); Players.Add( InitialisePlayerController( EPlayerID::Two ) ); Players.Add( InitialisePlayerController( EPlayerID::Three ) ); Players.Add( InitialisePlayerController( EPlayerID::Four ) ); auto World = GetWorld(); if( World == nullptr ) { return; } if( RobotCameraActorClass != nullptr ) { RobotCameraActor = World->SpawnActor<ARobotCameraActor>( RobotCameraActorClass ); auto PlayerOne = Cast<ARobotPlayerController>( UGameplayStatics::GetPlayerController( World, static_cast<int32>( EPlayerID::One ) ) ); if( RobotCameraActor != nullptr && PlayerOne != nullptr ) { PlayerOne->SetViewTarget( RobotCameraActor ); } } }
func Attack_9() { Attack_ClonkDirs(); SetPlayerZoomByViewRange(NO_OWNER, 200,100, PLRZOOM_Set | PLRZOOM_LimitMax); SetViewTarget(npc_newton); return ScheduleNext(40); }
func Attack_5() { if (this.planes[0]->GetX() > 880) return ScheduleSame(5); MessageBoxAll("$Attack3$", npc_lara, true); // oh god! for (var i=0; i<3; ++i) { this.planes[i]->StartInstantFlight(270, 15); this.planes[i]->SetXDir(-15); this.planes[i]->SetYDir(0); } SetViewTarget(g_flagpole); // NPCs go nuts RemoveEffect("NewtonHammering", npc_newton); RemoveEffect("LaraWalking", npc_lara); RemoveEffect("WoodyWalking", npc_woody); AddEffect("Attack_Panic", npc_newton, 1, 30, this); AddEffect("Attack_Panic", npc_lara, 1, 35, this); AddEffect("Attack_Panic", npc_woody, 1, 40, this); AddEffect("Attack_Panic", npc_lisa, 1, 45, this); // Update dialogues; remove attention markers for (var npc in [npc_newton, npc_lara, npc_woody, npc_lisa, npc_rocky]) { var dlg = Dialogue->FindByTarget(npc); if (dlg) { dlg->RemoveAttention(); dlg->SetDialogueProgress(100); } } // Start dropping bombs immediately return CallNext(); }
void AMouseController::OnCameraChanged(UProjectTapCameraComponent* newCamera) { currentCamera = newCamera; if(newCamera != nullptr) { SetViewTarget(currentCamera->GetAttachmentRootActor()); } }
func Rift_Warp_4() { SetAmbientBrightness(20); this.hero->SetLightRange(100, 30); SetViewTarget(this.hero); SetPlrView(this.hero->GetOwner(), this.hero, true); return ScheduleNext(30); }
func Rift_Warp_Start(object hero, object dimension_vector) { this.vehicle = dimension_vector; this.hero = hero; SetViewTarget(dimension_rift); return ScheduleNext(1); }
func Attack_Start(chopping_clonk) { this.hero = chopping_clonk; g_attack_started = true; SetPlayerZoomByViewRange(NO_OWNER, 200,100, PLRZOOM_Set | PLRZOOM_LimitMax); SetViewTarget(chopping_clonk); MessageBox_last_pos = true; // force first message right side of screen MessageBoxAll("$Attack1$", this.hero, true); // tree down return ScheduleNext(30); }
func Outro_Start(object plane) { // Player closest to plane becomes outro protagonist this.plane = plane; this.hero = plane->FindObject(Find_ID(Clonk), Find_Not(Find_Owner(NO_OWNER)), plane->Sort_Distance()); SetPlayerZoomByViewRange(NO_OWNER, 200,100, PLRZOOM_Set | PLRZOOM_LimitMax); SetViewTarget(this.hero); npc_pyrit.has_sequence = true; // Pyrit stops hammering return ScheduleNext(5); }
func Intro_Start(object flagpole) { // Intro starts at flagpole; some time before plane drops this.flagpole = flagpole; SetViewTarget(this.flagpole); SetPlayerZoomByViewRange(NO_OWNER, 800,600, PLRZOOM_Set); // zoom out from plane return ScheduleNext(80); }
func Rift_Appear_Start(object dialogue, object hero) { this.dialogue = dialogue; this.hero = hero; this.camera->SetPosition(g_DimensionRift_X, g_DimensionRift_Y); SetViewTarget(this.camera); return ScheduleNext(70); }
func Outro_Start(object goal, object plane) { this.goal = goal; this.plane = plane; this.hero = plane->FindObject(Find_Not(Find_Owner(NO_OWNER)), Find_ID(Clonk), plane->Sort_Distance()); SetViewTarget(this.plane); MessageBoxAll("$Outro1$", this.hero, true); return ScheduleNext(150); }
func Intro_Start(object hero) { this.hero = hero; this.plane->StartInstantFlight(90, 15); SetViewTarget(this.pilot); SetPlayerZoomByViewRange(NO_OWNER, 200,100, PLRZOOM_Set); // zoom out from plane // Lava goes crazy during the intro var lava = FindObject(Find_ID(BoilingLava)); if (lava) lava->SetIntensity(500); return ScheduleNext(80); }
void APlayerCameraManager::InitializeFor(APlayerController* PC) { CameraCache.POV.FOV = DefaultFOV; PCOwner = PC; SetViewTarget(PC); // set the level default scale SetDesiredColorScale(GetWorldSettings()->DefaultColorScale, 5.f); // Force camera update so it doesn't sit at (0,0,0) for a full tick. // This can have side effects with streaming. UpdateCamera(0.f); }
func Outro_Start(object plane) { // Player closest to plane becomes outro protagonist this.plane = plane; GetHero(npc_pyrit); SetPlayerZoomByViewRange(NO_OWNER, 200,100, PLRZOOM_Set | PLRZOOM_LimitMax); SetViewTarget(GetHero()); npc_pyrit.has_sequence = true; // Pyrit stops hammering this.plane->SetR(90); // in case Pyrit isn't done yet this.plane.MeshTransformation=Airplane.MeshTransformation; var max_unstick = 10; while (this.plane->Stuck() && max_unstick--) this.plane->SetPosition(this.plane->GetX(), this.plane->GetY()-1); return ScheduleNext(5); }
void AShooterPlayerController::ClientGameEnded_Implementation(class AActor* EndGameFocus, bool bIsWinner) { Super::ClientGameEnded_Implementation(EndGameFocus, bIsWinner); // Allow only looking around SetIgnoreMoveInput(true); bAllowGameActions = false; // Make sure that we still have valid view target SetViewTarget(GetPawn()); // Show scoreboard AShooterHUD* ShooterHUD = GetShooterHUD(); if (ShooterHUD) { ShooterHUD->SetMatchState(bIsWinner ? EShooterMatchState::Won : EShooterMatchState::Lost); if (IsPrimaryPlayer()) { ShooterHUD->ShowScoreboard(true); } } }
func Intro_Start() { // Intro starts high up in the clouds Music("TheSkylands"); LoadScenarioSection("Intro"); SetWind(-100); this.intro_skyscroll_xdir = -10; SetSkyParallax(0, 20, 20, this.intro_skyscroll_xdir, 0); this.plane = CreateObjectAbove(Airplane, 500, 200); this.plane->SetColor(0xa04000); this.pilot = CreateObjectAbove(Clonk, 100, 100, NO_OWNER); this.pilot->MakeInvincible(); this.pilot->SetSkin(2); this.pilot->Enter(this.plane); this.pilot->SetAction("Walk"); this.pilot->SetName("Pyrit"); this.pilot->SetColor(0xff0000); this.pilot->SetAlternativeSkin("MaleBrownHair"); this.pilot->SetDir(DIR_Left); this.pilot->SetObjectLayer(this.pilot); this.pilot->AttachMesh(Hat, "skeleton_head", "main", Trans_Translate(5500, 0, 0)); // Hat is seen in the cockpit! this.plane->PlaneMount(this.pilot); this.plane.FxIntPlaneTimer = this.Intro_PlaneTimer; RemoveEffect("IntPlane", this.plane); AddEffect("IntPlane",this.plane,1,1,this.plane); this.plane->FaceRight(); this.plane->StartInstantFlight(90, 0); g_intro_sky_moving = true; SetViewTarget(this.plane); return ScheduleNext(100, 1); }
void AKinectPlayerController::ClientSetSpectatorCamera_Implementation(FVector CameraLocation, FRotator CameraRotation) { SetInitialLocationAndRotation(CameraLocation, CameraRotation); SetViewTarget(this); }
void AFPSGPlayerController::clientSetDeathCamera_Implementation(const FVector& cameraLocation, const FRotator& cameraRotation) { SetInitialLocationAndRotation(cameraLocation, cameraRotation); SetViewTarget(this); }
func Rift_Appear_Stop() { SetViewTarget(this.hero); return true; }
func Attack_4() { SetViewTarget(this.planes[0]); SetPlayerZoomByViewRange(NO_OWNER, 600,500, PLRZOOM_Set | PLRZOOM_LimitMax); return ScheduleNext(50); }
func Intro_Start(object hero) { SetPlayerZoomByViewRange(NO_OWNER, 200,100, PLRZOOM_Set | PLRZOOM_LimitMax); SetViewTarget(hero); return ScheduleNext(5); }