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

Legacy:Viewport

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 16:03, 6 April 2006 by El Muerte (Talk) (*revert)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Object >> Player >> ViewPort
See UnrealEd Viewport for the viewports in the UnrealEd interface.

This class represents a real Player playing on this (where unreal is running that is) computer. Useful if you wish to detect if a PlayerPawn or PlayerController is controlled locally.

This is a native class without any UnrealScript source code.

Usage[edit]

Here's how you can check the type of connection of a player:

if ( Viewport(SomePlayerPawn.Player) != None ) {
  //This player is controlled locally.
}
else if ( NetConnection(SomePlayerPawn.Player) != None ) {
  // This player is controlled remotely.
}
else {
  // This player is not controlled by anybody.
  // The player might be in the process of connecting or this
  // could be a script-spawned PlayerPawn/PlayerController.
}