Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by shadowpuppet · Jul 01, 2016 at 03:47 PM · doorsrandomization

door with keycode entry - random

ok I have the main stuff in place. Player finds a slip of paper that has the keycode password to open the safe. No problem. BUT, the game lacks replay ability because once you know the code there is no point in playing any of the rest of the level. Any ideas on how to make this not a one time shot. I'm thinking randomizing won't work if used like most randomizing as the piece of paper and the actual code to open need to match. SO some kind of array with maybe 10 variables, 10 different textures on the slip of paper that correspond to the 10 different combinations to open the safe? maybe 10 different textures on the paper - 9 of which are disabled and 9 different keypad scripts with 9 disabled. and a master script that controls them both? For instance, a randomizing script that will pick a set and disable the rest and a set will consist of the keypad code to open the door and the corresponding texture on the piece of paper that displays the code? If I can get this far then randomizing where the piece of paper is hidden will be the next step which won't be hard. So my question is simply does this sound like the way to go about it or anyone have better ideas. i guess another option is to have 10 identical scenes except for the texture and keycode then just have the game load a random scene. that would be easiest as far as not having to figure out how to randomize and match the texture to the keycode but seems like an awfully big hit performance wise - or at least file size of the game

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by andrew_2992 · Jul 01, 2016 at 07:57 PM

I dont know if this has something to do with an ongoing topic but i have no idea what you're trying to make so I don't know what to suggest.

...What is the point of the game? You collect a key code to open a safe, but if youre collecting one key code to open one safe then it should always be the same key, it doesnt even matter what the key is, it just opens the safe.

Maybe pick up 3 different key codes that all have part of a problem leading to the answer which opens the safe.

For example,. create a class called safe. When the level loads and the safe object has its start function, call another function inside of start which will calculate something, maybe 53, then divide it into 3 different sized parts... 10 + 30 + 13. Your safe class could have a reference to 3 other scripts, and take the 3 numbers and put load them into some variable or function which will end up displaying that part of the sequence visually in your game. then when the player collects all 3 they go to the safe and unless they actually know the 3 numbers theyre going to have a hard time guessing a number between one and 100,000 for example... Thats one way...

Comment
Add comment · 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

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

59 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Moving between scenes like an adventure game 1 Answer

Customizable sprite character using multiple layers (hair, eyes, equipment, etc.)? Full tutorial needed 0 Answers

HubDoor in 2D Game kit- Trying to make a door open after collecting 3 items 1 Answer

Trying to draw a line between two randomly generated point 0 Answers

Floating point precision and random generated content 0 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