Hey guys I have the player pressing Enter to load a scene based on which trigger they’re standing in. But for some reason you need to press enter anywhere from 10-50 times before it finally works. Yet it works fine when playing from within the engine. Only once I build the game does this happen. Can anyone help? Heres some example of my code.
//these check which world were standing on, then tells us which direction we can move
void OnTriggerStay(Collider other)
{
if(other.collider.name == "WorldOneTrigger")
{
worldOneGUIOn = true;
if(Input.GetKeyDown(KeyCode.Return))
{
Application.LoadLevel("Desert1");
}
if(PlayerPrefs.GetInt("Desert1Cleared") == 1)
{
canMoveDown = true;
}
Debug.Log("WorldOne Hit");
}
same thing happens with this script too
void OnTriggerStay(Collider other)
{
if(other.collider.name == "player")
{
if(Input.GetKeyUp (KeyCode.E))
{
guiOn = true;
audio.PlayOneShot(ConvoSound);
}
}
}