Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
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 |
//============================================================================= // SoundSlotTimerListInterf.uc // $Author: Mbaldwin $ // $Date: 9/20/02 10:49p $ // $Revision: 1 $ //============================================================================= class SoundSlotTimerListInterf extends Actor abstract; /*============================================================================= How this class works: There are basically 2 ways to use this class: 1) In most cases, leave SlotOdds=0.0 and set MinSecsToNextSound and MaxSecsToNextSound so a sound from the slot will be played after at least MinSecsToNextSound seconds, and after at most MaxSecsToNextSound seconds. This is useful for random idle (waiting) sounds for example. 2) In some cases, if the above method is used, when the time comes to play the sound, at least MaxSecsToNextSound seconds will usually have passed, so the sound will always be played. For example, a waiting NPC may see an enemy after waiting for several minutes or longer. In this case, set the SlotOdds to a non-0 value and these odds will determine whether or not the sound is played the first time the slot is checked. If bReset is set, as soon as the slot is used for the first time, the SlotOdds will be cleared and the MinSecsToNextSound and MaxSecsToNextSound settings will be used thereafter. If the SlotOdds are used and bReset is false and the Min/MaxSecsToNextSound are set (non-zero), then these will also be respected, that is, the sound will only be played if the odds are met and MinSecsToNextSound seconds have passed. Set MaxSecsToNextSound to the same value as MinSecsToNextSound in this case or whether the sound is played will be controlled by both the SlotOdds and the random time between the Min and Max values (not generally useful). =============================================================================*/ struct SoundSlotTimerT { var() SoundSlotInterf.ESoundTableSlot SoundSlot; // name of sound category (slot) var() float SlotOdds; // see above var() float MinSecsToNextSound; // min time between playing sound from sound slot var() float MaxSecsToNextSound; // max time between playing sound from sound slot var() bool bReset; // see above var float NextSoundTime; // level time after which next sound can be played }; const NullSlotIndex = -1; // value returned to caller when slot should not be reset function Initialize( Actor ContextActor ); // should be called after creating function bool TimeToDoSound( Actor ContextActor, SoundSlotInterf.ESoundTableSlot SoundSlot, out int SlotIndex ); function RandomizeSoundSlotTimer( Actor ContextActor, int SoundSlotIndex ); function RandomizeSoundSlotTimerList( Actor ContextActor ); defaultproperties { UseReticleOnEvents(0)="UseReticleText" UseReticleOnEvents(1)="UseReticleCorners" UseReticleOnEvents(2)="UseReticleTopBars" ProximityReticleOnEvents(0)="ProximityReticleCorners" ProximityReticleOnEvents(1)="ProximityReticleTopBars" } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |