Overview | Package | Class | Source | Class tree | Glossary | Deus Ex 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 |
//============================================================================= // Tree. //============================================================================= class Tree extends OutdoorThings abstract; var() float soundFreq; // chance of making a sound every 5 seconds function Timer() { if (FRand() < soundFreq) { // play wind sounds at random pitch offsets if (FRand() < 0.5) PlaySound(sound'WindGust1', SLOT_Misc,,, 2048, 0.7 + 0.6 * FRand()); else PlaySound(sound'WindGust2', SLOT_Misc,,, 2048, 0.7 + 0.6 * FRand()); } } function PostBeginPlay() { Super.PostBeginPlay(); SetTimer(4.0 + 2.0 * FRand(), True); } defaultproperties { soundFreq=0.200000 bStatic=False Mass=2000.000000 Buoyancy=5.000000 } |
Overview | Package | Class | Source | Class tree | Glossary | Deus Ex UnrealScript Documentation |
previous class next class | frames no frames |