Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 rooster2 · Apr 28, 2016 at 02:32 PM · battle-systempokemon

pokemon battle start

hi i would like to know how can i initiate battle like pokemon using triggers?

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 Scribe · Apr 28, 2016 at 02:39 PM

Well I'm pretty sure if you have a gridbased system like pokemon, you would just have an OnMove method, that checks the the tile you are moving to for a 'probability' of triggering an attack. Then if some random number is less than that probability, you initiate the attack sequence.

If you want to do it with triggers, you would give each 'attack' square a trigger with some tag like 'attackTrigger' and then do something like:

 void OnTriggerEnter(Collider c){
     if(c.CompareTag("attackTrigger")){
         if(someProbability < Random.value){
             Debug.Log("attack!");
         }
     }
 }
Comment
Add comment · Show 3 · 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 rooster2 · Apr 28, 2016 at 06:10 PM 0
Share

Sorry was ment to say its 3d based

avatar image rooster2 · Apr 28, 2016 at 06:12 PM 0
Share

And thanks and could you email me as your script knowledge might be helpful and you will get credited in the game

avatar image Scribe rooster2 · Apr 29, 2016 at 08:20 AM 0
Share

I am not currently in a position where I can offer that kind of help, however if you put a little more effort into the asking of the question, there is no end to the help you receive here. SOme tips for getting good answers:

  1. Show us code, perhaps several examples of what you have tried and written yourself.

  2. Tell us which part is not working correctly, ask about a specific part, 'why is this method not working'.

  3. If you find it hard to explain the issue, draw some pictures.

If you really want some personalised coding help then you should probably post in Commercial job offering if you are willing to pay, or Non-Commercial collaboration though I think it is unlikely you will find anyone there willing to give free tutoring. There are thousands of tutorials online as well, it is likely that you can find one very similar to what you wish to achieve.

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

57 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

Related Questions

looking for a way to register Input from the UI canvas and such 0 Answers

Character Battle Menu 0 Answers

How would one go about creating a rolling HP text like Earthbound 0 Answers

how to make a battle system 0 Answers

Most efficient way to store information in an inspector dropdown menu? 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