Minimap Kit

General support.
User avatar
BeNjO
Member
Member
Posts: 12
Joined: Sat Aug 29, 2015 10:34 am

Ok, I did the edit's, Still finding 'None' in both where the 'Player' should be, and 'None' in the Camera script section.

Image
User avatar
Lovatto
Admin
Admin
Posts: 1834
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

You not get this debugs?
Image
How to find your Invoice Number: Here
How to find your Order Number: Here
User avatar
BeNjO
Member
Member
Posts: 12
Joined: Sat Aug 29, 2015 10:34 am

Negative, Just what I showed, a few of the missing scripts and the one at the bottom.
User avatar
Lovatto
Admin
Admin
Posts: 1834
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

Then you have not added the script to the player prefab, I have test the script and is working, please be sure that script is added in the player prefab and that this still have it in runtime (after instantiate).
How to find your Invoice Number: Here
How to find your Order Number: Here
User avatar
BeNjO
Member
Member
Posts: 12
Joined: Sat Aug 29, 2015 10:34 am

Its on the prefab, The screen shot with the MM is before and during game play.

during game play:
Image

during editor:
Image

Edit:

I think it has something to do with loading the prefab in the character screen, then in scene1, its not refreshing/adding the new player refab in scene1.

having it unticked, Then ticking it manually ingame and it works fine, Just need to figure out how to make it work without me ticking it.
User avatar
Lovatto
Admin
Admin
Posts: 1834
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

the add the code in other of your main players script, like your "PlayerMain", to ensure that the code is executed.
How to find your Invoice Number: Here
How to find your Order Number: Here
User avatar
BeNjO
Member
Member
Posts: 12
Joined: Sat Aug 29, 2015 10:34 am

Its finding the right place to use it, Is this right?

Code: Select all

var MM : boolean;

MM = true;
User avatar
Lovatto
Admin
Admin
Posts: 1834
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

BeNjO wrote:Its finding the right place to use it, Is this right?

Code: Select all

var MM : boolean;

MM = true;
Who is trying to do with that?

I mean copy the content / code of "MM" script in another script of the player as "Player Main" but I notice you use JS, so it would be useless because you could not access C#.

so, I recommend that you locate the problem that because the script "MM" does not execute, because if you do you will solve this problem.
How to find your Invoice Number: Here
How to find your Order Number: Here
User avatar
BeNjO
Member
Member
Posts: 12
Joined: Sat Aug 29, 2015 10:34 am

Hi,

I tried all last night and all today (from 7am till 13:50), I have googled answers and everything and I still cannot seem to run the MM script from anywhere since its C# and not JS. All the results I found didn't work. I cannot seem to "enable" or "tick" the MM script on the Player prefab. I will just have to not use it, Or pay someone to convert the C# script into JS to see if that helps me.

Ben
User avatar
BeNjO
Member
Member
Posts: 12
Joined: Sat Aug 29, 2015 10:34 am

Hi,

So I managed to get it working, But I ran into a problem, If I chance scenes, say Scene1 to Scene2, The camera does not update, Since I'm using the script you provided and enabling it when the scene changes, re-ticking the check box next to the script doesnt work, It works the first time but not a sec thus my problem arises.


Edit:

I changed the script a little so it looks like this:

Code: Select all

using UnityEngine;
using System.Collections;

public class Trigger : MonoBehaviour {
	
	GameObject m_Player;
	// Use this for initialization
	void Start()
	{
		Init();
	}

	public void Init()
	{
		m_Player = this.gameObject;
		bl_MiniMap m = FindObjectOfType<bl_MiniMap>();
		bl_MMCompass mc = FindObjectOfType<bl_MMCompass>();
		
		if (m != null)
		{
			m.m_Target = m_Player;
			m.ConfigureCamera3D();
			Debug.Log("Send Player To MiniMap");
		}
		if (mc != null)
		{
			mc.Target = m_Player.transform;
			Debug.Log("Send Player to Compass");
		}
		StartCoroutine(CheckAgain());
	}

	IEnumerator CheckAgain()
	{
		yield return new WaitForSeconds(3);
		m_Player = this.gameObject;
		bl_MiniMap m = FindObjectOfType<bl_MiniMap>();
		bl_MMCompass mc = FindObjectOfType<bl_MMCompass>();
		
		if (m != null && m.m_Target == null)
		{
			m.m_Target = m_Player;
			Debug.Log("Send Player To MiniMap Again");
		}
		if (mc != null && mc.Target == null)
		{
			mc.Target = m_Player.transform;
			Debug.Log("Send Player to Compass");
		}
	}
}
So I could call Init from somewhere else, But struggling to do so, Any help would be nice.
Post Reply