- Home /
Question is off-topic or not relevant
Javascript code not working plz help
I have a simple project. When you enter a trigger, if the textfield contains a specific word, you would move to the next scene. And its not working even know I am not getting any errors
heres the code
function updates() {
if (inTrigger == true){
if (stringToEdit == "times");
Application.LoadLevel("Scene2");
}
}
function Start(){
}
private var inTrigger = false;
var stringToEdit : String = "";
function OnTriggerEnter(other: Collider){
if (other.CompareTag("Player")){
inTrigger = true;
}
}
function OnGUI(){ stringToEdit = GUI.TextField (Rect (10, 10, 200, 20), stringToEdit, 23); }
Answer by Julien-Lynge · Nov 16, 2013 at 12:21 AM
Looking at your other questions, you seem to constantly post your code, with little explanation, asking other users to fix it. This is not behaviour we want to support, so I'm shutting down this question.
To help you write better questions in the future, here are some things you should fix:
No discernible question has been asked or not enough information is given. We cannot help you unless you tell us what isn't working, what you've already tried, and what you expect from the community. You can find more information about what is expected here.
Question is not of interest to other Unity users. Questions on UnityAnswers should be broadly applicable beyond your specific project.
Question is a 'fix my code for me' or 'fix my scene for me' question. UnityAnswers (UA) is not Quality Assurance (QA) - it is up to you to write and bugfix your own code. You can find more information on fixing your code here.
For more information on the standard for new questions on UnityAnswers, please see the FAQ: http://answers.unity3d.com/page/faq.html
//////////////////////////////
Perhaps what would be most helpful to you is Unity training. I would suggest visiting the following training websites to find the one that best helps you move forward. In addition to the sites below, you can always search YouTube, which has a large number of user-created Unity tutorials.
3DBuzz (hover over the Unity dropdown) - http://www.3dbuzz.com/vbforum/sv_home.php
Lynda - https://www.lynda.com/
BurgZergArcade - http://www.burgzergarcade.com/
Unity3DStudent - http://www.unity3dstudent.com/
UnityGems - http://unitygems.com/
CGCookie - http://cgcookie.com/unity/
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Tutorial level 2 Answers
Pause Menu background problem 0 Answers
PlayerPrefs Help 1 Answer
Call JavaScript from c# Help! 0 Answers