missing avatar


https://forum.reallusion.com/Topic286090.aspx
Print Topic | Close Window

By samusam - 10 Years Ago
Hi, some time ago in my project the avatar was displayed correctly. Now i don't know because my avatar speack but  it is not show. Why? i don't apported modify
By Snarp Farkle - 10 Years Ago
Can you provide some pics of this issue, it's not clear to me what is happening.
By samusam - 10 Years Ago
of course. My is this:
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
   
public class CTAnimationTalkTrigg : MonoBehaviour {
   public CTPluginAPI CTApi;
   public CTPluginAPI CTApi2;
   //public GameObject contaDialoghi;
   public GameObject[] bottone;
   private int numDialog;
   private int triggerDiIngresso;
   public GameObject[] oggettiComparsa;
   private GameObject appari;
   private GameObject checkStatua;
   private int IDialogo;
   private int perDialogo;
   public int appoggio;
   private int immagazzina; 

   //Qui in base ai valori passati da contatore quest attivare
   // il rispettivo crazy talk
   //Devo aggiungere inoltre  le risposte di Arisguard sempre con Crazy talk
   // Use this for initialization
   //AAA devo vedere perchè all'avvio .siQuest è sempre vera
   void Start () {
      appari = oggettiComparsa[0];
      checkStatua = oggettiComparsa [1];
      //mettere un if
      if(ES2.Load<int>("cambioAbilita")== 0)
      checkStatua.SetActive (false);
        //contatoreProgress.progressoDialogo;
        appoggio = ES2.Load<int>("attivaQuestMiss"); 

    }
   void Awake(){
      immagazzina = ES2.Load<int>("sparizioneOK");
      //print (immagazzina);
      GameObject appoggio2 = GameObject.Find("SparizioneGiullare");
      if (immagazzina == 5) {
                  appoggio2.SetActive (true);
                  GameObject.Find ("Grande statua").GetComponent<triggerDialogo> ().enabled = true;
                  GameObject.Find ("giullare").SetActive (false);
            } else {
            appoggio2.SetActive(false);
            }
   }
   
   // Update is called once per frame
   void Update () {
        numDialog = ES2.Load<int>("progressoDig");
        print(numDialog + "ciao ciao");
        ES2.Save(appoggio, "attivaQuestMiss");

        //Per attivare le missioni
        if (appoggio  == 0)
         GameObject.Find ("Distruggi quattro non morti").GetComponent<contatoreNemici> ().siQuest = true;
      else if(appoggio  == 1)
      GameObject.Find ("Distruggi quattro elfi").GetComponent<contatoreNemici> ().siQuest = true;
      else if(appoggio  == 2)
         GameObject.Find ("Distruggi quattro orchi").GetComponent<contatoreNemici> ().siQuest = true;
      else if (appoggio == 3)
         GameObject.Find ("Distruggi quattro Troll").GetComponent<contatoreNemici> ().siQuest = true;   





      if (triggerDiIngresso == 0) {
         CTApi.ShowActor (false, 0.0f, 0.2f);
         CTApi.Stop (0.0f);
         CTApi2.ShowActor (false, 0.0f, 0.2f);
         CTApi2.Stop (0.0f);
         StopCoroutine("OnTriggerEnter");
         bottone [1].GetComponent<CanvasGroup> ().alpha = 0;
         bottone [1].GetComponent<CanvasGroup> ().blocksRaycasts = false;
         bottone[0].GetComponent<CanvasGroup> ().alpha = 0;
         bottone[0].GetComponent<CanvasGroup> ().blocksRaycasts = false;


      }

   }
   IEnumerator OnTriggerEnter (Collider collusion) {
        print(numDialog);
            CTApi.ShowActor (true, 0.0f, 0.2f);
            CTApi.SetIdleMotion ("Friendly");

      triggerDiIngresso = 1;
            if (numDialog == 0) {
         IDialogo = 0;
                  CTApi.Play ("giullare2", false, 0.0f);
         bottone[0].GetComponent<CanvasGroup> ().alpha = 1;
         bottone[0].GetComponent<CanvasGroup> ().blocksRaycasts = true;




            } else if (numDialog == 20) {
                  CTApi.Play ("giullareBlocca", false, 0.0f);
         bottone[0].GetComponent<CanvasGroup> ().alpha = 1;
         bottone[0].GetComponent<CanvasGroup> ().blocksRaycasts = true;
         
            }
            else if (numDialog == 1) {
         IDialogo = 1;
                  CTApi.Play ("giullare3", false, 0.0f);
         bottone[0].GetComponent<CanvasGroup> ().alpha = 1;
         bottone[0].GetComponent<CanvasGroup> ().blocksRaycasts = true;
         
                  // e così via. Devo mettere la frase ritorna in missione quest non completata
      
            }
            else if (numDialog == 2) {

         IDialogo = 2;
         bottone[0].GetComponent<CanvasGroup> ().alpha = 1;
         bottone[0].GetComponent<CanvasGroup> ().blocksRaycasts = true;
         //Qui devo fare pure le risposte di arisguard magari creando un bottone chiarimenti 

            CTApi.Play ("giullare4", false, 0.0f);
            
         yield return new WaitForSeconds(18f);
         //Questo visualizza il bottone dei chiarimenti
         gameObject.GetComponent<BoxCollider> ().isTrigger = false;
         GameObject.Find ("nuovaAnimazioneArisguard 3").GetComponent<CharacterController> ().enabled = false;
         bottone[1].GetComponent<CanvasGroup> ().alpha = 1;
         bottone[1].GetComponent<CanvasGroup> ().blocksRaycasts = true;
         yield return new WaitForSeconds(32f);
         bottone[0].GetComponent<CanvasGroup> ().alpha = 0;
         bottone[0].GetComponent<CanvasGroup> ().blocksRaycasts = false;
         bottone[1].GetComponent<CanvasGroup> ().alpha = 0;
         bottone[1].GetComponent<CanvasGroup> ().blocksRaycasts = false;
         GameObject.Find ("nuovaAnimazioneArisguard 3").GetComponent<CharacterController> ().enabled = true;


         
            }

      else if (numDialog == 3) {
         IDialogo = 3;
         bottone[0].GetComponent<CanvasGroup> ().alpha = 1;
         bottone[0].GetComponent<CanvasGroup> ().blocksRaycasts = true;
         //Qui devo fare pure le risposte di arisguard magari creando un bottone chiarimenti 
         CTApi.Play ("giullare61", false, 0.0f);

         
      }
      if (numDialog == 90) {
         gameObject.GetComponent<BoxCollider> ().isTrigger = false;
         GameObject.Find ("nuovaAnimazioneArisguard 3").GetComponent<CharacterController> ().enabled = false;
         CTApi2.ShowActor (true, 0.0f, 0.2f);
         CTApi2.SetIdleMotion ("Affirmative");
         CTApi.Play ("giullare7", false, 0.2f);
         //yield return new WaitForSeconds(15.8f);

         CTApi2.Play ("Arisguard 3",false,16f);
         //yield return new WaitForSeconds(8.3f);

         CTApi.Play ("giullare8", false, 24.5f);
         //yield return new WaitForSeconds(9.6f);

         CTApi2.Play ("Arisguard 4",false,34.1f);
         //yield return new WaitForSeconds(4.2f);
         yield return new WaitForSeconds(35.0f);
         //CTApi.ShowActor (false, 0.0f, 0.2f);
         //CTApi.Stop (0.0f);




         yield return new WaitForSeconds(5f);
         GameObject.Find ("nuovaAnimazioneArisguard 3").GetComponent<CharacterController> ().enabled = true;

         //Vedere perchè nn si attivano questi bottoni
         bottone[1].GetComponentInChildren<Text>().text = "Addio";
         bottone[1].GetComponent<CanvasGroup> ().alpha = 1;
         bottone[1].GetComponent<CanvasGroup> ().blocksRaycasts = true;



         //Ci metto il bottone a fine dialogo con il testo cambiato
         // Se accettato va a finire le istruzioni di sotto


            }


   }

   void OnTriggerExit (Collider collusion) {

      CTApi.ShowActor (false, 0.0f, 0.2f);
      CTApi.Stop (0.0f);
      CTApi2.ShowActor (false, 0.0f, 0.2f);
      CTApi2.Stop (0.0f);
      bottone[0].GetComponent<CanvasGroup>().alpha = 0;
      bottone[0].GetComponent<CanvasGroup>().blocksRaycasts = false;
      bottone[1].GetComponent<CanvasGroup>().alpha = 0;
      bottone[1].GetComponent<CanvasGroup>().blocksRaycasts = false;
      //L'errore è in questo test uscita, non so perchè ma mi esce dal trigger

      triggerDiIngresso = 0;

      //CTApi.SetIdleMotion ("Friendly");
      }



   public void AttivaQuest(){



      if (IDialogo == 0) { 
         appoggio  = 0;
         }
      else if (IDialogo  == 1) 
         appoggio  = 1;
         
      else if (IDialogo  == 2) 
         appoggio  = 2;
            
      else if (IDialogo  == 3)
         appoggio  = 3;
            
         
         
         

   }


   public void DialogoConferma(){
            //defo fare l'animazione dialogo di Arisguard
            if (numDialog == 2) {
         //Devo ritestare questo ma penso che funzionera'
                  CTApi.Stop (0.0f);
                  CTApi2.ShowActor (true, 0.0f, 0.2f);
                  CTApi2.SetIdleMotion ("Affirmative");
                  CTApi2.Play ("Arisguard01", false, 0.2f);
                  //StartCoroutine(Attendi(17f));

                  //CTApi2.Stop (0.0f);
                  CTApi.Play ("giullare5", false, 7f);
                  //StartCoroutine (Attendi (17f));
                  //CTApi.Stop (0.0f);
                  CTApi2.Play ("Arisguard 1", false, 24f);


            }
            if (numDialog == 90) {

         GameObject.Find ("Grande statua").GetComponent<triggerDialogo>().enabled  =true;
         CTApi.Stop(0.0f);
         CTApi.ShowActor (false, 0.0f, 0.2f);
         CTApi2.Stop(0.0f);
         CTApi2.ShowActor (false, 0.0f, 0.2f);
         //attivaStatua.SetActive(true);
         //GameObject.Find("TextDemo").GetComponent<CanvasGroup>().alpha =1;
         //GameObject.Find("TextDemo").GetComponent<CanvasGroup>().alpha =1;
         bottone[0].GetComponent<CanvasGroup> ().alpha = 0;
         bottone[0].GetComponent<CanvasGroup> ().blocksRaycasts = false;

         appari.SetActive(true);
         contatoreProgress.progressoDialogo = 100;
         gameObject.SetActive(false);
         ES2.Save(5,"sparizioneOk");
         GameObject.Find("Salva").SendMessage("CreaSalvataggio");
         //Devo vedere quando si attiva il si quest degli orchi capi





            }
      }


   

   private IEnumerator Attendi(float secondi){
      yield return new WaitForSeconds(secondi);

      }


}
There are dome picturehttps://forum.reallusion.com/uploads/images/12f6008f-03d7-4b30-bef5-d6f5.pnghttps://forum.reallusion.com/uploads/images/3e3934d2-12e8-4748-a655-e09e.pnghttps://forum.reallusion.com/uploads/images/88a0b61b-4765-4a12-90dd-6cde.pnghttps://forum.reallusion.com/uploads/images/01d9f1b4-1406-4997-84b3-b015.png
By samusam - 10 Years Ago
there is somybody that help me?