class sampleVisClueMaster extends GameObject { private const instanceeditable var m_dependableEntities : array< NodeRef >; protected event OnRequestComponents( ri : EntityRequestComponentsInterface ) { EntityRequestComponentsInterface.RequestComponent( ri, 'vision', 'VisionModeComponent', false ); } protected event OnTakeControl( ri : EntityResolveComponentsInterface ) { m_visionComponent = ( ( VisionModeComponent )( EntityResolveComponentsInterface.GetComponent( ri, 'vision' ) ) ); } protected event OnGameAttached() { m_visionComponent.SetHiddenInVisionMode( true, gameVisionModeType.Default ); } protected event OnInteractionChoice( choice : InteractionChoiceEvent ) { var i : Int32; for( i = 0; i < m_dependableEntities.Size(); i += 1 ) { GameInstance.GetVisionModeSystem( GetGame() ).SetChildEntityVisionMode( GetEntityID(), m_dependableEntities[ i ], true ); } } private function IsModeOn() : Bool { var isFocusOn : Int32; isFocusOn = GameInstance.GetQuestsSystem( GetGame() ).GetFact( 'isFocusOn' ); if( isFocusOn == 1 ) { return true; } else if( isFocusOn == 0 ) { return false; } else { return false; } } } class sampleVisClueSlave extends GameObject { protected event OnRequestComponents( ri : EntityRequestComponentsInterface ) { EntityRequestComponentsInterface.RequestComponent( ri, 'vision', 'VisionModeComponent', false ); } protected event OnTakeControl( ri : EntityResolveComponentsInterface ) { m_visionComponent = ( ( VisionModeComponent )( EntityResolveComponentsInterface.GetComponent( ri, 'vision' ) ) ); } protected event OnGameAttached() { m_visionComponent.SetHiddenInVisionMode( true, gameVisionModeType.Default ); GameInstance.GetVisionModeSystem( GetGame() ).SetEntityVisionMode( GetEntityID(), false ); } protected event OnInteractionChoice( choice : InteractionChoiceEvent ) {} private function IsModeOn() : Bool { var isFocusOn : Int32; isFocusOn = GameInstance.GetQuestsSystem( GetGame() ).GetFact( 'isFocusOn' ); if( isFocusOn == 1 ) { return true; } else if( isFocusOn == 0 ) { return false; } else { return false; } } }