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 QTate · Jun 12, 2016 at 03:05 PM · script.

Is this possible to script?

Hello,

I've very new to Unity and I'm trying to get some pointers on where to go if I'm trying to make a trigger interaction with Boolean. Is it possible to script this idea that I'm having? I have two pressure plates and once items are resting on the two pressure plates the player can then interact with a lever to have the door open up? Any assistance would be greatly appreciated.

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 Mmmpies · Jun 12, 2016 at 03:27 PM 0
Share

Yes it is, you need to look up the scripting tutorials first.

You already know you need a trigger so OnTriggerEnter would be a good place to start. Get that to set a bool to true for your plate and OnTriggerExit set it to false.

Then when you click on the lever get a script to check the bool state on each plates script. Just do a search for accessing a variable in another script, you'll find lots of results. YouTube and google are your friends as well. Unity has an amazing user base that do 1000s of tutorials each year. You're almost always faster searching for an example than asking here but if you get stuck with a script come and ask for assistance and post your script.

Avoid just asking for scripts though as that is generally just considered lazy, although you only asked for advice on this occasion. So all good :)

avatar image QTate Mmmpies · Jun 12, 2016 at 03:38 PM 0
Share

$$anonymous$$mmpies thank you very much for the feedback and guidance I'm going to reference Youtube and see if I can find a tutorial that explains more. I'm slowly getting the hang of scripting, but I'm extremely new to Unity, as well as, coding. I can't wait until I'm able to create very basic stuff and get a better understanding of Unity because it's very cool seeing things actually work after you've started from nothing.

avatar image Mmmpies QTate · Jun 12, 2016 at 04:17 PM 0
Share

No problem and don't forget those scripting tutorials, I turned the words into a link in my original comment but it's not very clear in the comments font size.

Good luck :)

0 Replies

· Add your reply
  • Sort: 

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

error CS0120: An object reference is required to access non-static member `ScoreManager.score' 1 Answer

How to make an enemy 2d chasing player? 1 Answer

Wrong after Update? 0 Answers

warning CS0618 with unity ngui 0 Answers

Same Q as before but it has been a while and nones replyed so im reposting 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