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 00072 00073 00074 |
class ACTION_PlayAnnouncement extends ScriptedAction; var(Action) sound Sound; var bool bSoundsPrecached; function bool InitActionFor(ScriptedController C) { local PlayerController P; local name SoundName; if ( C.Level.NetMode == NM_StandAlone ) SoundName = LastMinuteHack_ShipIt( C ); else SoundName = Sound.Name; //log("ACTION_PlayAnnouncement Sound:" @ Sound @ "SoundName:" @ SoundName @ "Title:" @ C.Level.Title @ "Tag:" @ C.Tag @ "C.MyScript.Tag:" @ C.MyScript.Tag ); ForEach C.DynamicActors(class'PlayerController', P) P.QueueAnnouncement( SoundName, 1, AP_Normal); return false; } /* beautiful... */ function Name LastMinuteHack_ShipIt( ScriptedController C ) { local PlayerController LocalPlayer; local name SoundName; LocalPlayer = C.Level.GetLocalPlayerController(); if ( Sound != None ) SoundName = Sound.Name; // MotherShip Hack for Spanish translation (viva Madrid!) if ( Sound == None && C.Tag == 'Play_Intro3' && C.MyScript.Tag == 'Hack_RIP_Epic_MegaCar' ) SoundName = 'MotherShip_intro'; else if ( C.MyScript.Tag == 'Hack_I_Love_Mina' ) { if ( C.Tag == 'Play_Brief4' && LocalPlayer.StatusAnnouncer.GetSound('Junkyard_brief4a') != None ) SoundName = 'Junkyard_brief4a'; else if ( Sound == None ) { if ( C.Tag == 'Play_Brief5' ) SoundName = 'Junkyard_brief5a'; else if ( C.Tag == 'Play_Brief6' ) SoundName = 'Junkyard_brief6a'; else if ( C.Tag == 'Play_Brief7' ) SoundName = 'Junkyard_brief7a'; } } return SoundName; } function string GetActionString() { return ActionString@Sound; } simulated function PrecacheAnnouncer(AnnouncerVoice V, bool bRewardSounds) { if ( !bRewardSounds && !bSoundsPrecached ) { bSoundsPrecached = true; if ( Sound != None ) V.PrecacheSound(Sound.Name); } } defaultproperties { ActionString="play announcement" } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |