Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Jesus_Freak · Oct 24, 2010 at 02:38 PM · stringguitexttypepassword

GUI password check question

what script should i use to check if a string has been typed?

would it look something like:

var Text : String = "Level3";

 function OnGui()
 {

//code for identifying string here

     if(Text)
     {
      Application.LoadLevel("Level3");
     }
    }

thanks in advance!

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Juri · Oct 24, 2010 at 03:26 PM 1
Share

dude no one will give a script that will do something like this!! thats advanced stuff ur asking for! maybe u should learn the basic GUI scripting. and i think that if u ask for Input.Get$$anonymous$$ey.Sting the engine will print everything that tip!!! because u cant make the script sensible to key words, that would kill the whole idea behind the game, right!!! so no one will help u! one game has done this before and they nailed it!!! so don't try it, u will always just be a rip off with such a game!

avatar image IJM · Oct 24, 2010 at 03:43 PM 1
Share

I'm sorry young gentleman, it's very rude to ask from other programmers to write your code for you.

In addition: "that's what i want, a full script on how to make a gui show up when you type the word" isn't a question but a request, you can pay someone and he/she will do it for you.

Using google you can find plenty of tutorials for free, If you don't like it you can buy books on program$$anonymous$$g/Unity engine for relatively small price.

avatar image Jesus_Freak · Oct 25, 2010 at 04:42 PM 0
Share

for anyone reading this for the first time, i changed the question to tell you what i really need help with.

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by IJM · Oct 24, 2010 at 03:29 PM

Unity GUI Scripting Guide: http://unity3d.com/support/documentation/Components/GUI%20Scripting%20Guide.html

p.s.

I'm sorry young gentleman, it's very rude to ask from other programmers to write your code for you.

In addition: "that's what i want, a full script on how to make a gui show up when you type the word" isn't a question but a request, you can pay someone and he/she will do it for you.

Using google you can find plenty of tutorials for free, If you don't like it you can buy books on programming/Unity engine for relatively small price.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jesus_Freak · Oct 24, 2010 at 04:24 PM 0
Share

thanks for the link, that's all i wanted to know. just that little script in that reference link.

avatar image IJM · Oct 24, 2010 at 04:45 PM 1
Share

=) Ididn't want to be rude...

avatar image Jesus_Freak · Nov 02, 2010 at 11:36 PM 0
Share

nah, you were right. i learned that i'm supposed to give you a script i made, and ask what i need to fix, or add. but i just needed ideas because i didnt know as much about scripting then as i do now.

avatar image IJM · Nov 03, 2010 at 05:57 AM 1
Share

$$anonymous$$y friend, each day you will realize how little you knew yesterday. I'm a programmer for ~8 years,and I'm using Unity for about a month now. ;)

avatar image
1
Best Answer

Answer by Grune · Oct 24, 2010 at 06:23 PM

Hello, put this script on a object with it's collider set to trigger. When you walk into the Object the text is shown.

var showtext : boolean = false;

function OnTriggerEnter(other:Collider) { showtext = true; }

function OnGUI () { if(showtext == true){ GUI.Box (Rect (Screen.width / 2 -100,Screen.height - 60,200,50), "Blah Blah Bla, Kryptic Message!"); } }

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jesus_Freak · Oct 24, 2010 at 08:02 PM 0
Share

thanks, that was helpful. im working on modifying the GUI functions that you can find on the unity scripting reference. and im trying to figure out how to check if a person types a certain thing in the GUI password field. like if they type "next level please" they go to "Level2".

avatar image Jesus_Freak · Oct 25, 2010 at 04:43 PM 0
Share

this is good for adventure games, so when you get near an object or an enemy, you could tell the player anything you want.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Problem with accent characters in a GUIText 1 Answer

Filling GuiText with contents from a string array 2 Answers

Dialogue & GUI Text String 1 Answer

I can't print a int.ToString() variable in a guiText.text 1 Answer

why doesn't this script work 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges