[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vr / w / wg] [i / ic] [r9k] [s4s] [cm / hm / lgbt / y] [3 / aco / adv / an / asp / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / qst / sci / soc / sp / tg / toy / trv / tv / vp / wsg / wsr / x] [Settings] [Home]
Board
Settings Home
/3/


File: Planet_Texture_03_by_Qzma.jpg (1.72 MB, 2000x2000)
1.72 MB
1.72 MB JPG
using UnityEngine;
using System.Collections;

// This script is designed to have the cube use a NavigationMesh search and locate the target, which is, in this case, the camera.

// A navigation mesh is generated by the engine and tells the bot what it can walk on.

public class AIscriptv2 : MonoBehaviour {

Transform tr_Player;
float f_RotSpeed=3.0f,f_MoveSpeed = 3.0f;


// Use this for initialization
void Start () {

tr_Player = GambeObject.FindGameObjectWithTag ("Player").transform

}

// Update is called once per frame
void Update () {

// Look at target destination

transform.rotation = Quaternion.Slerp (transform.rotation, Quaternion.LookRotation (tr_Player.position - Transform.position), f_RotSpeed * Time.deltaTime);

// This line of code tells the bot to move towards the target.

transform.position += transform.forward * f_MoveSpeed * Time.deltaTime;

}
}


>Assets/Standard Assets/AIscriptv2.cs(19,9): error CS1525: Unexpected symbol `}', expecting `;'

>confuse.jpg

>please help

>pic unrelated, have a planet texture for your troubles
>>
>>497408
the line with "tr_Player = GambeObject.FindGameObjectWithTag ("Player").transform" needs a semicolon at the end.

Also, the error literally told you exactly what the problem was.

Also, this isn't a programming board and you got lucky.
>>
Also, use pastebin for code. forums shit up code formatting.
>>
>>497422
>>497421
Also, if he can't figure out an error as simple as this, why the fuck does he think he should be teaching kids how to code?
>>
>>497426
>Oh, trust me, there are worse, who teach adults

Also, funny thing is, here you can graduate as a teacher, and go on to teach coding, without ever having written a single line of code.

And sometimes its not a question of choice, you might be forced to do so.
>Kek
>>
>>497408
What the fuck. I dropped out of highschool when I was a freshman and have been neet for the past 10 years but can code better than someone who actually is in the position to teach it? Fuck this world.
>>
is there a high-res version of that map with a heightmap as well ?



Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.