Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

Problems with java script.

$
0
0
Hello people, I'm still learning coding (i know basic HTML5 scripting, but i find javascript a bit more complicated than it (but less than C# or boo) I made this script so an object follows the player but stops following it when the player sees it. IDK what my mistake is, and i what to know your opinion. I'm not asking you to do all the script for me (If you do that i will never learn :P) i just want to know where my mistake is. #pragma strict var leader : Transform; var follower : Transform; var speed : float =5; function Start () { } function Update(){ function OnBecameVisible() { enabled = true; follower.LookAt(leader); follower.Translate(speed*Vector3.forward*Time.deltaTime); } }

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>