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 post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by derekwsparks · May 07, 2014 at 05:51 PM · 2dlooplevelsidescrollerend

How do I end my level?

I am making a 2d sidescroller which has a terrain/sky looper so it duplicates everything. The problem is when I reach a certain point, say a sign in the ground I would like that to be the end of the level and level 2 be loaded. I have no idea how to do this. I have searched for several days looking for something that relates to my project but cant find anything.

I had considered taking the looper out and just making the whole level but would still run into the problem of not knowing how to end the level and load the next scene. I figure you would have to click a button whether IOS, Android, or pc before the level started as I know I would be annoyed if it just started without warning.

If anyone could shed some light on this for me I would greatly appreciate it.

If I wasnt specific enough please let me know and I will try to answer your questions as best I can. This would be my first Unity game once done.

Comment
Add comment · Show 2
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 AlucardJay · May 07, 2014 at 05:58 PM 0
Share
  • Enter a trigger collider at the end of the level

  • This brings up a gui message and a button "End of Level! Proceed?"

  • user clicks button, Application.LoadLevel

avatar image Kiwasi · May 15, 2014 at 12:50 AM 0
Share

For an infinite looping level you could use a timer to trigger the end.

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Maskerov · May 15, 2014 at 07:03 PM

I think it can also be used coordinates so when the character passes a possition, you load the next scene. However, using invisible cubes or planes are also good ways to do it.

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
avatar image
0

Answer by MrBearHat · Sep 19, 2014 at 09:12 AM

ok here is the simple way make a cube (make sure it aligns with the player or it wont work) turn of the mesh renderer for the cube then you need a script here is the javascript to do it

 #pragma strict
 var Level = "";
 function OnTriggerEnter(other : Collider){
     if(other.tag == "Player"){
             Application.LoadLevel(Level);
     }
 }

and add it to the cube then enter the level to load in the components of the cube

and when you hit the cube you will be put in the next level/scene

NOTE: make sure your scene/level is added to your build settings. Also make sure that your player has the tag Player

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

26 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

Related Questions

2D side-scrolling Level Design 3 Answers

2D Animation does not start 1 Answer

Falling Bomb Script Not Working Right 0 Answers

Draw 2d level with tile set and export to png? 1 Answer

Creating a 2D sidescroller, anyone know any sprite sheet tutorials? 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