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 /
avatar image
0
Question by AmanteMartin · May 09, 2018 at 11:01 PM · scrpting

Roleplay Engine that decides outcomes based on variables

I want to create a simple roleplay engine for me and my friends that basically is used for sports, or war matchups, and I want to ask for how i go on doing this, i want it to look something like this.

Subject: (ex. War, Sports Matchup) the subject is just asthetic and anything would be able to be put as a subject


Teams: (ex.) Blue Red Green Yellow


there should be an infinite amount of sides you may insert, and all can have different names. and from this example, blue should have a 25 percent chance of winning, and depending on how many sides there are, the chance of winning is equal, but smaller since there are more teams, and same vise versa


Matches?: (Ex: 3) any amount of matches is possible


Match 1: Red Wins


Match 2: Yellow wins


Match 3: Yellow Wins


Outcome: Yellow Wins (ex. War) whatever was the subject would be displayed here

if it is a tie, then it would display tie.

But yeah its just a simple app i want to create and i have no coding experience, so how would i go and start this. it is basically a more advanced flip a coin, dice or spin the wheel, and would be made for roleplay matchups.

Comment
Add comment · Show 5
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 thunderbuns · May 09, 2018 at 11:10 PM 0
Share

Just to be clear you have no coding experience at all?

avatar image AmanteMartin thunderbuns · May 09, 2018 at 11:13 PM 0
Share

yeah im new to this whole unity thing

avatar image thunderbuns AmanteMartin · May 09, 2018 at 11:26 PM 0
Share

Alright then my recommendation would be to take a few unity courses first; to learn the basics. Before trying to build a game of this magnitude. Ben Tristen has some really good stuff https://www.udemy.com/unitycourse2/

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Hassurunous · May 10, 2018 at 12:48 AM

What you seem to be getting at is building a dice roller, at least if all "teams" have an even chance of winning.

If all you care about is determining which of a random number of values is selected, you could use a simple Random.Range(1, X) where X is the number of "teams" you are using.

Now if you want a visual interface and everything for this, it will take a bit more time, but the gist is that you appear to be asking for a random number in a range of numbers, and there's already a nice function built for that. Hope that helps!

Comment
Add comment · Show 1 · 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 AmanteMartin · May 10, 2018 at 02:15 AM 0
Share

thanks ill use that

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

82 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 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

what is wrong whis this? 1 Answer

FPS Ai help 1 Answer

Can't add script to anything error 1 Answer

Pause game without using timeScale 3 Answers

Distance between two objects Unity 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