If - Script
Level 2
Script:
If input1.text = "Hi" Then label.text = "Yes"
Else
label.text = "No"
So this script is from a button in a quiz (i just changed the object names). So basicly what this script is saying if textbox1 (input1) has the word Hi in it. Then it will change the label's text to "Yes" or (Else) if textbox1 doesn't have Hi in it then it will change the text to "No". Its that simple.
Else
label.text = "No"
So this script is from a button in a quiz (i just changed the object names). So basicly what this script is saying if textbox1 (input1) has the word Hi in it. Then it will change the label's text to "Yes" or (Else) if textbox1 doesn't have Hi in it then it will change the text to "No". Its that simple.
Description:
One of the simplest scripts you can get. Can be used anywhere.
Copyright ©2010-2011 Jam Ware. All Rights Reserved.