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

JBToolbox2.JBAction_WaitForEvent


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
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
// ============================================================================
// JBAction_WaitForEvent
// Copyright (c) 2007 by Wormbo <wormbo@online.de>
// $Id: JBAction_WaitForEvent.uc,v 1.1 2007-04-28 10:57:28 wormbo Exp $
//
// Works around a bug in ScriptedController which causes the ScriptedSequence
// to skip over actions if the event of an Action_WaitForEvent is triggered
// more than once in the same tick.
// ============================================================================


class JBAction_WaitForEvent extends Action_WaitForEvent;


// ============================================================================
// Variables
// ============================================================================

var bool bWaitsForTrigger;


// ============================================================================
// PostBeginPlay
//
// Makes sure bWaitsForTrigger is unset.
// ============================================================================

function PostBeginPlay(ScriptedSequence Parent)
{
  bWaitsForTrigger = False;
}


// ============================================================================
// InitActionFor
//
// Sets bWaitsForTrigger (if necessary), so ScriptedController listens for
// Trigger events.
// ============================================================================

function bool InitActionFor(ScriptedController C)
{
  bWaitsForTrigger = Super.InitActionFor(C);
  return bWaitsForTrigger;
}


// ============================================================================
// CompleteWhenTriggered
//
// This action completes on trigger only when it did not yet complete.
// (Sounds stupid, but due to the implementation in ScriptedController a
// LatentAction can "complete again" after it was already completed, causing
// the ScriptedSequence to skip over following actions.)
// ============================================================================

function bool CompleteWhenTriggered()
{
  return bWaitsForTrigger;
}


// ============================================================================
// ActionCompleted
//
// Unsets bWaitsForTrigger, so ScriptedController stops listening for Trigger
// events.
// ============================================================================

function ActionCompleted()
{
  bWaitsForTrigger = False;
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Sa 28.4.2007 12:57:28.000 - Creation time: Do 14.8.2014 09:58:41.591 - Created with UnCodeX