Mostly Harmless

Unreal Wiki:Scratchpad

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 11:23, 2 May 2008 by Shambler (Talk | contribs)

Jump to: navigation, search

This page is for pasting code you want to show someone as an example or to get assistance with. This allows you to easily collaborate with someone to solve a problem, and allows easy comparisons of the edits.

You are free to remove any existing code from below, and paste your code between the <uscript> </uscript> tags. If the page hasn't been edited in 24 hours, you can assume it isn't needed anymore and can be removed. A full edit history will be available, so don't worry about losing anything.


BattleTeamArena.BattleBotController:

state Reboot
{
ignores SeePlayer, EnemyNotVisible, HearNoise, ReceiveWarning, NotifyLanded, NotifyPhysicsVolumeChange,
		NotifyHeadVolumeChange, NotifyLanded, NotifyHitWall, NotifyBump, ExecuteWhatToDoNext;
 
	event DelayedWarning() {}
	function DoRangedAttackOn(Actor A) {}
	function WhatToDoNext() {}
	function Celebrate() {}
	function bool SetRouteToGoal(Actor A) {	return true; }
	function SetAttractionState() {}
	function EnemyChanged(bool bNewEnemyVisible) {}
	function WanderOrCamp() {}
	function Timer() {}
 
	function BeginState(Name PreviousStateName)
	{
		if ((DefensePoint != None) && (UTHoldSpot(DefensePoint) == None)) FreePoint();
		if (NavigationPoint(MoveTarget) != None) {
          NavigationPoint(MoveTarget).FearCost = 2 * NavigationPoint(MoveTarget).FearCost + 600;
		  WorldInfo.Game.bDoFearCostFallOff = true;
		}
		PendingMover = None;
		Enemy = None;
		StopFiring();
		bFrustrated = false;
		BlockedPath = None;
		bInitLifeMessage = false;
		bPlannedJump = false;
		bInDodgeMove = false;
		bReachedGatherPoint = false;
		bFinalStretch = false;
		bWasNearObjective = false;
		bPreparingMove = false;
		bPursuingFlag = false;
		bHasSuperWeapon = false;
		bHasTranslocator = false;
		ImpactJumpZ = 0.f;
		RouteGoal = None;
		NoVehicleGoal = None;
		SquadRouteGoal = None;
		bUsingSquadRoute = true;
		bUsePreviousSquadRoute = false;
		MoveTarget = None;
		ImpactVelocity = vect(0,0,0);
		LastSeenTime = -1000;
		bEnemyInfoValid = false;
	}
 
Begin:
	if ( WorldInfo.Game.bGameEnded )
		GotoState('RoundEnded');
	Sleep(0.1);
TryAgain:
	if (UTGame(WorldInfo.Game) == None) {
      destroy();
	} else {
      Sleep(0.1);
	  LastRespawnTime = WorldInfo.TimeSeconds;
	  WorldInfo.Game.ReStartPlayer(self);
	  Goto('TryAgain');
	}
 
MPStart:
	Sleep(0.1);
	WorldInfo.Game.ReStartPlayer(self);
	Goto('TryAgain');
}