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?
Bump. Still waiting for an answer.
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.