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 Kristijan · Dec 29, 2010 at 02:55 PM · guitexttimerquest

How can I make a quest system?

This question is still not fully answered


Please tell me how to make a simple script that allows certain text to appear and dissapear after some time. I would also need a checkpoint script. This is an example:


  • Add following text: "Private what are you doing? Come back to the ship this instant... Ahh! Stay away, no!"
  • Wait 2.5
  • Remove the text
  • Wait 0.5
  • Add following text: "Private, you're on your own from now on. I've hidden in the ship's cargo storage and will try to start contact with you again once I will found a safer place."
  • Wait 3.5
  • Remove the text
  • Wait 0.5
  • Add a text that says "Missions: find a secured area on apparently abandoned planet"
  • Place a preset mark on the map and give the player a set amount of time to reach it
  • Delete the timer when player reached mark and add more text


I know this is possible but please, give me something to work on, I'm rather new to scripting but if I have a template I could work on it. Please?

Comment
Add comment · Show 5
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 Justin Warner · Dec 29, 2010 at 03:30 PM 0
Share

Statement gave you a template, which is kind of what you're asking for... I'd recommend giving him the green check mark... $$anonymous$$aybe ask the other part in another question, grouping questions is a bad habit...

avatar image Kristijan · Dec 29, 2010 at 03:31 PM 0
Share

Please, if you're gonna copy & paste a script as an example, do explain a bit? XD

avatar image Kristijan · Dec 29, 2010 at 03:32 PM 0
Share

Hmm you're right Justin, I gave him the green mark, but this is not all I needed. I didn't really group it, I only asked several questions, and he asnwered only a single question.

avatar image Justin Warner · Dec 29, 2010 at 03:37 PM 0
Share

That's what I mean though, you need to seperate your questions, even if it means you have 3-5 different questions lined up on the page... I've seen it done multiple times =). Have a good day man!

avatar image Statement · Dec 29, 2010 at 03:44 PM 0
Share

Actually, I don't feel my answer ought to be marked as accepted answer. I only addressed the first issue. If you can uncheck it I'll delete the answer.

2 Replies

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

Answer by Statement · Dec 29, 2010 at 03:07 PM

A simple solution might be to use co-routines.

private var text : String = String.Empty;

function Narrative() { text = "Private what are you doing? ... (cut out)"; yield WaitForSeconds(2.5f); text = String.Empty; yield WaitForSeconds(0.5f);

 text = "Private, you're on your own ... (cut out)";
 yield WaitForSeconds(3.5f);
 text = String.Empty;
 yield WaitForSeconds(0.5f);

}

function OnGUI() { if (GUILayout.Button("Start Narrative")) { StartCoroutine("Narrative"); } GUILayout.Label(text); }

Comment
Add comment · Show 3 · 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 Kristijan · Dec 29, 2010 at 03:15 PM 0
Share

Nice, but doesn't cover all what I need. Still thx this is a nice start

avatar image Kristijan · Dec 29, 2010 at 03:30 PM 0
Share

Again, thank's, but not all I needed

avatar image Statement · Dec 29, 2010 at 03:35 PM 0
Share

Well, what do you need? "Please tell me how to make a simple script that allows certain text to appear and dissapear after some time."

avatar image
-3

Answer by Kristijan · Dec 29, 2010 at 03:14 PM

Hmm

I See

That's actually quite nice

What confuses me is "Narrative", as Narrator, as voice or is it just a silly name for a text command?

Anyways, what I need is to be able to actually put the text onto the screen as soon as you start the game, and then continue changing it. I've already added music and built most of the terrain etc., but I still need the conversations to actually work, can you help me a bit more plz?

Ohh ya, GUILayout, how does that function? I've always used GUItext and 3dtext for now never quite used a Layour, i'm quite new to Unity

The string.Empty, that means that the script should be located in an empty object, right? Coz I already made that and copy pasted this script inside, but I still need what I've written above

Comment
Add comment · Show 3 · 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 Statement · Dec 29, 2010 at 03:34 PM 0
Share

"What confuses me is "Narrative", as Narrator, as voice or is it just a silly name for a text command?" It's a "silly" name for a function that handle the narrative.

avatar image Kristijan · Dec 30, 2010 at 10:37 AM 0
Share

$$anonymous$$k thx lolz, why the rate? XD

avatar image Statement · Jan 08, 2011 at 08:11 PM 1
Share

Rate? Your downvote? Somebody probably didn't like you post a comment in an answer.

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

How to set text(timer) to a fixed place 1 Answer

how to reset timer when score hits an increment of 50 1 Answer

Help with making a triggered gui message 1 Answer

GUI & GUI Text Disappear When Publishing 6 Answers

GUIText not working properly with a timer. 1 Answer


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