3 skills for player to use

hi i am making a game right now and im trying to make my character attack in magic, range or melee(depend on the weapon using) its a game where when you clik on some one you will attack him/her/it and follow him if hes running(kinda like runescape)im not asking for some code but more for indication on who do i start, where can i get some tutorial/help. plz help me

P.S.: if you whant to give me the full code i will be very happy but i wont learn anything this way.

What you need to do is use if statements in your function to tell the script if the player is holding this weapon then do this…

You also need to tell the script what kind of weapon the player has before anything else. The way you would do that is to tag each weapon and have the script see if a gameobject with that certain tag returns true.

So here’s a mockup Script to show what I mean :

function WhatEver(){
        var sword = GameObject.FindWithTag("sword");
        var bow = GameObject.FindWithTag("bow");
        var wand = GameObject.FindWithTag("wand");
        if (sword){
        //Do this...
        }
            
        if (bow){
        Do this...
        }
        
        if (wand){
        Do this...
        }
    )