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 /
avatar image
0
Question by jetty112 · Oct 12, 2012 at 06:25 AM · guiobjectdragslot

How to create skills and drag them to slots.

Hello.

So i am trying to create a loadout scene where the player can drag 4 skills of 18 to the 4 slots at the bottom right corner of the screen. I want the 3*6 skills to all be completely different skills like in a DOTA style game. When draging from the 18 skills to the 4 slots i want the skill thumbnails to be dragged with the mouse. How should i approach this. All i have right now is what you can see on the picture below.

Thank you!

Edit:

Also how should i implement different cooldowns for the skills as well as a global cooldown that triggers whenever a skill is casted? And second thing: how to make the 4 selected skills carry over to the actual arena scene where the fighting takes place?

alt text

unity.jpg (298.0 kB)
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by jetty112 · Oct 19, 2012 at 04:46 PM

Bump. Still waiting for an answer.

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
Wiki

Answer by Dealzu-The-Wikid · Jun 30, 2014 at 10:56 PM

I will attempt to give a basic answer, I think the reason you havent been answered yet is because you asked for way too many different solutions at once. For cooldowns, you want to use a simple counter inside of its own function that gets called each time you use an ability. Make sure to use Time.deltaTime as you count down, and call it at the end of each ability to make it global or you could pass it to a script or function that manages if anything has been cast.
If you are loading a new scene where you do not want skills to be destroyed, you would use DontDestroyOnLoad function, or simply DontDestroyOnLoad everything on the player, but create a script that manages whether or not other scripts are turned off currently in that scene. To drag and drop abilities in only certain slots, you really need to spend some time looking into events. You can turn the Texture into the cursor onMouseDrag and drop it if its clicked over a slot its "allowed" to go into. You can declare an enum "drop down box to create the different types the item could belong to" for say a spell, ability. Or just create each one as its own type of class. These are basic ideas to help you start to wrap your head around what to do to get on the right path. P.S. This post is editable by the community if someone can think of a better way to explain it, please feel free to modify.

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

10 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

Related Questions

Trying to Destroy Object when Wave starts 1 Answer

[CLOSED] Render priority of gameObjects 0 Answers

How to Touch Drag 3D Objects 2 Answers

Drag Camera Around an Object With Kinect (Official Plug-In) 0 Answers

Display Press E to Pickup when mouse over object 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