Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 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 ThePhantomPsychic · Jul 21, 2015 at 05:50 PM · rpgbattle-system

New Stage?

As some may know, I am making a paper mario game. If you have played/seen enough of it, you would know that when you touch an enemy, a battle scene opens up. The problem is that I don't know how to get my characters from where they are at in that point to a different stage. Or as some call it; "RPG style".

Long story short: I want a separate battle platform to show up if I touch an enemy, like in RPG's.

I don't have any coding to show, because I don't even know how to BEGIN on doing this. Does anyone know how to make this happen?

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 ThePhantomPsychic · Jul 21, 2015 at 05:52 PM 0
Share

Only problem, I only want to use enemies from that area, and If I load a new scene, It wont know what enemies to use or how many.

avatar image AlwaysSunny · Jul 21, 2015 at 05:58 PM 0
Share

There's plenty of info to research about passing information between scenes. Don't let that stop you if that is your preferred approach.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by AlwaysSunny · Jul 21, 2015 at 05:49 PM

It may be "easiest" to use a literal scene transition, but it's possible this would be more trouble than it's worth. It depends upon your preference, and several other factors we don't know about.

Here are your obvious options:

A fake scene transition
This wouldn't involve literally loading a new scene file, but instead either hiding nearly everything in the scene, or otherwise moving the focus (camera) such that the original environment is not in view. You'd then use an entity placement and referencing strategy that reflects the fact that this is a new and temporary location, and discard these elements + unhide or return focus to the overworld when it's time. Ideally, you would create a prefab for your special RPG battleground environment, so you've only got to drop in, use, and delete a single object. This prefab could know where to place entities, and could include its own UI canvas and camera (just pause the overworld, disable its camera, and use the battleground camera for the duration). Could be pretty darn slick.

A real scene transition
This involves loading a new scene file, and loading the original when the fight is over. This is a bit cleaner, except that it implies having to save and load any aspects of the overworld scene if you want it to remember what the player has done in that environment so far (unlocking doors, destroying crates, whatever). If your save system is built around this idea, it should be quite simple, and is probably the superior approach if you're going to implement any kind of save system for saving the user's progress throughout the overworld scene(s).

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 brunopava · Jul 21, 2015 at 06:04 PM

On my opnion you should begin with this aproach: (if you don't want to change scenes)

Create an "arena" (where your characters will fight) Position a camera to see this arena how you want.

Now the tricky part. You need to set the arena layer and the culling mask of the camera in order that te camera will only render the arena.

Position this arena and the camera far away from your game. Now, when you characters collide in-game. You instantiate new prefabs in the arena (the guys who will fight). Disable your main camera and activate the arena camera.

Or, if you want to change scenes.

There is a lot of ways to pass information between scenes. One of them is a Singleton. Other is DonDestroyOnLoad();

Comment
Add comment · Show 2 · 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 ThePhantomPsychic · Jul 22, 2015 at 03:07 AM 0
Share

I think I'll use the change scenes method. $$anonymous$$y question is: how do you use singleton? Could you put it in a script if it's not too confusing?

avatar image AlwaysSunny · Jul 22, 2015 at 03:38 AM 0
Share

Take a look at the "Persistent Singleton" method example here: http://unitypatterns.com/singletons/

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Refresh gameObject to original prefab, but it isn't visible 1 Answer

How can I pause one object's Update() until another class has performed its task? 2 Answers

Enemy AI/Battle system 1 Answer

Enemy Database for RPG Battle System? 1 Answer

Classic turn-based RPG battle scene question 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