I hope I can explain this well! I managed to figure out how to get the achievement page to work, which is great. The problem I'm facing is getting the things that trigger during a conversation to apply to the new script that holds all the achievement information.
Here's an example of the achievement script I'm using. Where this basic setup would be applied for each achievement:
Code: Select all
using System.Collections;
using System.Collections.Generic;
using System.Security.Cryptography;
using UnityEngine;
using UnityEngine.UI;
public class AchievementHold : MonoBehaviour
{
//L1 Dead
public int L1Act;
public GameObject L1A;
public GameObject L1B;
public int L1Code;
public int L1Did;
void Start()
{
L1Code = PlayerPrefs.GetInt("L1");
L1Act = PlayerPrefs.GetInt("L1On");
if (L1Act == 1 && L1Code == 12345)
{
L1A.SetActive(true);
L1B.SetActive(false);
}
else L1A.SetActive(false);
L1B.SetActive(true);
}
IEnumerator L1go()
{
L1Code = 12345;
PlayerPrefs.SetInt("L1", L1Code);
L1Act = 1;
PlayerPrefs.SetInt("L1On", L1Act);
yield return new WaitForSeconds(1);
}
}
Thank you in advance <3