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 /
This question was closed Jan 01, 2015 at 12:16 PM by Landern for the following reason:

Too subjective and argumentative, this requires a lot of data, this is not the place, please post it on http://forum.unity3d.com/ for a design discussion.

avatar image
0
Question by Bokaii · Jan 01, 2015 at 11:49 AM · timeclockschool

Unity3d School

I'm making a game where the character you are is in school. But I don't know how to check if I got to class in time. I have a clock so I know what time it is.

I'm not asking for a full script, I just need help to an idea on how to check if I made it to class before it began.

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 HarshadK · Jan 01, 2015 at 11:51 AM 0
Share

Check clock time against class start time and decide if you came on time or not based off that?

avatar image Bokaii · Jan 01, 2015 at 12:01 PM 0
Share

Yeah, but I wan't to have multiple classrooms so how do I check that?

avatar image HarshadK · Jan 01, 2015 at 12:04 PM 0
Share

Check comment by @Landern below his answer.

1 Reply

  • Sort: 
avatar image
0

Answer by Landern · Jan 01, 2015 at 11:51 AM

As the time is ticking down, i'm sure you have some event where if the player doesn't do X by some Time N, fail.

You could create a collider at the door of the class room, as the character enters the class room before Time N happens, success, otherwise fail. After which the game goes on.

This collider could be attached to cube, or just an empty game object and attach relevant scripts that check for collisions.

Comment
Add comment · Show 6 · 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 Bokaii · Jan 01, 2015 at 11:56 AM 0
Share

I could do that yes... But I'm not the best at scripting.

For the game I'm making, i wan't a whole day filled with classes.

for example:

at 9 am I have one class then at 11 am I have another class another place.

How do I check if I'm at the right place at the right time?

avatar image Landern · Jan 01, 2015 at 12:02 PM 1
Share

Is this like a persona thing... anyways.

Lets say you use the method mentioned, in the school each usable door has a collider and when you enter the collider a script method is invoked, OnCollisionEnter. You would have some game manger script that is tracking against some data structure that contains your classes, time of the classes(when you need to flag the class as entered), etc. You would iterate over that collection of that custom type checking against the clock.

avatar image Bokaii · Jan 01, 2015 at 12:07 PM 0
Share

I have a clock with:

  • Hours

  • $$anonymous$$inutes

  • Seconds

  • Days

Would I need to use the clock as a string?

avatar image Landern · Jan 01, 2015 at 12:10 PM 0
Share

@$$anonymous$$r$$anonymous$$elonPie, this question is probably better suited for the forums. Questions should be objective, this is beco$$anonymous$$g very subjective and enter the design/full coding area. The forum is for continuous back and forth. UA is not.

avatar image HarshadK · Jan 01, 2015 at 12:13 PM 1
Share

@Landern you can move ahead and close the question for the same reason.

Show more comments

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Clock Trigger 2 Answers

Javascript beginner here: how do I implement time such as hours and days? 2 Answers

Start my Clock script at 6am? 2 Answers

In game clock/Time 1 Answer

animation control by time/clock 2 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