- Home /
Question by
erda123 · Jul 16, 2013 at 09:38 PM ·
javascriptgameobjecttext
Quest Script Help
why dosent it work?, it is supposed to change the text when the game object does not exist (elfboss), but when i kill it it says the same :/
var target: Transform;
var healthtext : GUIText;
function Update ()
{
if(GameObject.Find("elfboss") != null)
{
healthtext.text = "Current Quest:" + "" + " Kill the Elf Boss ";
}
else
{
healthtext.text = "Quest" + "" + " Completed";
}
}
Comment
Your answer
Follow this Question
Related Questions
Activate/Deactivate Script from another Object. 3 Answers
Can someone help me fix my Javascript for Flickering Light? 6 Answers
Array problem -3 Answers
How to make text appear when moving next to an object? 3 Answers
Setting Scroll View Width GUILayout 1 Answer