Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

UTGame.SeqEvent_DemoInput


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
/**
 *
 * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.
 */


/**
 * Demonstrates how to write a kismet event which should be activated by some input event.
 */
class SeqEvent_DemoInput extends SequenceEvent;

/** the ID of the controller that must press the button, or -1 if anybody can do it */
var() int ControllerID;
/** the name of the button that must be pushed */
var() name ButtonName;
/** the action the user must perform with that button */
var() EInputEvent InputEvent;
/** whether or not we should eat a matching keypress or let it continue on in the input chain */
var() bool bTrapInput;

/** checks if the given input matches what we're looking for, and if so activates
 * @return true if the input should be discarded now or false if it should be allowed to continue through the input chain
 */
function bool CheckInput(PlayerController Player, int CheckControllerID, name CheckButtonName, EInputEvent CheckInputEvent)
{
	if ( CheckButtonName == ButtonName && CheckInputEvent == InputEvent && (ControllerID == -1 || CheckControllerID == ControllerID) &&
		CheckActivate(Player, Player) )
	{
		return bTrapInput;
	}
	else
	{
		return false;
	}
}

defaultproperties
{
   ControllerId=-1
   bTrapInput=True
   ObjName="Input"
   ObjCategory="DemoGame"
   Name="Default__SeqEvent_DemoInput"
   ObjectArchetype=SequenceEvent'Engine.Default__SequenceEvent'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: tr 31-1-2018 17:18:36.000 - Creation time: sk 18-3-2018 10:01:13.350 - Created with UnCodeX