I don't need to test my programs. I have an error-correcting modem.

Difference between revisions of "Unreal Wiki:Scratchpad"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
Line 5: Line 5:
 
----
 
----
  
 +
BattleTeamArena.BattleBotController:
 
<uscript>
 
<uscript>
simulated function MonitorVehicleSpawnBlocking()
+
state Reboot
 
{
 
{
  local HUD myHUD;
+
ignores SeePlayer, EnemyNotVisible, HearNoise, ReceiveWarning, NotifyLanded, NotifyPhysicsVolumeChange,
  local HUD.HudLocalizedMessage Message;
+
NotifyHeadVolumeChange, NotifyLanded, NotifyHitWall, NotifyBump, ExecuteWhatToDoNext;
  
  myHUD = PlayerOwner.myHUD;
+
event DelayedWarning() {}
  Message = myHUD.LocalMessages[0];
+
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');
 
}
 
}
 
</uscript>
 
</uscript>

Revision as of 11:23, 2 May 2008

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');
}