Scripts

TR_m2_445_sc_ordinator_v

TR_Mainland.esm
Variables 14
Local Variables
TR_Map
control
TR_NecromOrd
TR_ArmedPC
TR_SpelledPC
TR_RunningPC
TR_JumpingPC
TR_NecromOrdAct
TR_NecromOrdGateGuard
isRight
isClose
PCisInGatedArea
T_Local_NPC
NoLore
Source
1Begin TR_m2_445_sc_ordinator_v 2; vault gate ordinators 3 4short TR_Map 5short control 6short TR_NecromOrd ;this is what tells the Dialogue system to use Ordinator voices 7short TR_ArmedPC ;these will make sure that the Ordinators police the players conduct: 8short TR_SpelledPC 9short TR_RunningPC 10short TR_JumpingPC 11short TR_NecromOrdAct ;prevents the Ordinators from firing off error-causing dialogue until MenuMode has been properly cleared 12short TR_NecromOrdGateGuard 13short isRight 14short isClose 15short PCisInGatedArea 16short T_Local_NPC 17short NoLore 18 19if ( MenuMode == 0 ) 20 if ( TR_NecromOrdAct > 0 ) 21 set control to ( control + 1 ) 22 endif 23else 24 set TR_NecromOrdAct to 1 25 if ( control > 0 ) 26 set control to 0 27 endif 28endif 29 30If ( control >= 2 ) ;out of MenuMode for two consecutive frames == if MenuMode was dialogue, we're now out of dialogue 31 set control to 0 32 set TR_NecromOrdAct to 0 33Endif 34 35if ( GetDistance, player <= 512 ) ;none of this fires unless the player is close enough 36 37 if ( TR_ArmedPC != 1 ) 38 if ( player->GetWeaponDrawn == 1 ) 39 set TR_ArmedPC to 1 40 endif 41 else 42 if ( player->GetWeaponDrawn == 0 ) 43 set TR_ArmedPC to 0 44 endif 45 endif 46 47 if ( TR_SpelledPC != 1 ) 48 if ( player->GetSpellReadied == 1 ) 49 set TR_SpelledPC to 1 50 endif 51 else 52 if ( player->GetSpellReadied == 0 ) 53 set TR_SpelledPC to 0 54 endif 55 endif 56 57 58 if ( TR_RunningPC != 1 ) 59 if ( GetPCRunning == 1 ) 60 set TR_RunningPC to 1 61 endif 62 else 63 if ( GetPCRunning == 0 ) 64 set TR_RunningPC to 0 65 endif 66 endif 67 68 if ( TR_JumpingPC != 1 ) 69 if ( GetPCJumping == 1 ) 70 set TR_JumpingPC to 1 71 endif 72 else 73 if ( GetPCJumping == 0 ) 74 set TR_JumpingPC to 0 75 endif 76 endif 77 78endif 79 80if ( isRight == 0 ) 81 if ( getPos X > 4400 ) 82 set isRight to 1 83 else 84 set isRight to -1 85 endif 86endif 87 88if ( isClose == 0 ) 89 if ( GetDistance TR_i2_445_vaultdoors < 400 ) 90 set isClose to 1 91 endif 92else 93 if ( GetDistance TR_i2_445_vaultdoors > 450 ) 94 set isClose to 0 95 endif 96endif 97 98if ( PCisInGatedArea == 0 ) 99 if ( player->GetPos Y > 5400 ) 100 if ( player->GetPos X > 4145 ) 101 if ( player->GetPos X < 4625 ) 102 set PCisInGatedArea to 1 103 endif 104 endif 105 endif 106else 107 if ( player->GetPos X < 4145 ) 108 set PCisInGatedArea to 0 109 elseif ( player->GetPos X > 4625 ) 110 set PCisInGatedArea to 0 111 elseif ( player->GetPos Y < 5400 ) 112 set PCisInGatedArea to 0 113 endif 114endif 115 116if ( TR_Map > 0 ) 117 return 118endif 119 120set TR_Map to 2 121 122End