Hi.
The Debug.Log in this code returns ‘0’. I am tearing my hair out.
Look for ‘// Station’ which is a Vector 3. It is definitely the correct part of the constructor ‘Station’.
I really hope someone can help me because I have absolutely no idea how to solve this. I thought I’d learnt something about programming after 6 months. Many thanks in advance.
InnkeeperJim = new Townsfolk (
// Name.
"Innkeeper Jim",
// Transform.
InnkeeperJimTrans,
// Target.
InnkeeperJimTarget,
// Station.
new Vector3 (-250, 0, 110),
// ToolType.
Anvil.Pan,
// Tool.
new Tool ("Old Pan", Inventory.Copper, Anvil.Pan, 0.3f, 25, 4, 1, 3),
// Rapport.
0,
// Gold.
10,
// Flavour.
"The local Innkeeper. He will introduce you to lots of clients and his food heals Heroes.",
// Log.
"",
// Chat.
"Hi",
// Activity.
"On Duty",
// Dismissed.
false,
// Sprite.
InnkeeperJimSpr,
// Animator.
InnkeeperJimAnim,
// Collider.
InnkeeperJimCol
);
TFList.Add (InnkeeperJim);
Debug.Log ("Jim " + InnkeeperJim.Station.x);
I’m trying to tell Jim to go to his ‘Station’ (behind the bar at the Inn) in another script but he seems to think this is 0, 0, 0.