Using the unit "weapon unit" as the weapon is how i first setup the battleship clone map until i found that u can just use an item with the right ability. I can try to explain the unit method to you but i'll also tell you that it is not the best way.
Here is how to do it, i may leave some stuff out cause i'm not good at explaining stuff to ppl but i'll try.
The fact that u cant figure this out on your tells me you probably wont be able to figure it out even if i try to explain but wtf i'm bored.
*NOTE* - Locust is a really shitty way to acheive this kind of gameplay so we wont be using it.
ANYWAY..
First create ur "weapon UNIT" give it they attack that u want the weapon to have. MAKE SURE: the unit is a flying unit and set the flying hieght to -30 collision to 0 and give it no model by giving it a no model path "there is a better way but it takes longer to explain".
Second, create a "Weapon ITEM" change the discription to that of the weapon such as the attack speed and damage it will do.
Create a couple variables:
Weapons_Group - which will be a unit group and make it an array the size of (12). These unit groups will be to hold all the "weapon units that a player_hero is carrying.
Player_Hero - which will be a unit variable and make it an array the size of (12)
*Note* assign each of the units that you want to be able to attack as they move a spot in the array, make the array size bigger if you have more.
You also need to create a weapon type group, for each player that will be carrying the weapon. such as:
Red_BasicCannon and make it an integer array of the size 6 because the hero can only be carrying a max of 6 at a time due to the size of the inventory.
make an integer array array of size 6 for each weapon also such as: NumCarrying_Basic Cannon. This is so we can keep track of all the weapon units so we can remove them if a unit drops, or pawns a item.
Okay to the triggers: "i'll give you the main idea of what u will need to do in each trigger, im not going into detail because i would have to recode all the triggers to make sure it worked right again, if i wanted to give it to you trigger by trigger."
First trigger will be for when the "Player_Hero" acquires an item.
*say the item is for basic cannon*
In this trigger you need to create weapon unit *the basic cannon unit* of the type that the weapon item *basic cannon item* is. You need to then assign the weapon unit *basic cannon unit* to the weapon unit group that goes to the player hero that is carrying it: thus if it was player1's hero carrying the weapon then you would assign the unit weapon to WEapons_Group(Playernumber(owner of hero minpulating item)). You also add 1 to NumCarrying_Basic Cannon, and then set the Red_BasicCannon(NumCarrying_Basic Cannon).
Second trigger would be for when the unit drops an item (event) of type basic cannon(condtion) in this we need to get the integer in NumCarrying_Basic Cannon and then remove Red_BasicCannon(NumCarrying_Basic Cannon) from the game and from the unit group WEapons_Group(Playernumber(owner of hero minpulating item)). and dont forget to subtract one the NumCarrying_Basic Cannon
third you need to copy the layout for the second trigger but make it for when a unit pawns the item, and change the references to the item such as (last dropped item, or item being munipulated which you would use to refer to the item in the second trigger) to (pawned item).
Last you need a trigger to move all the units instantly to the player_hero every .05 or whatever u want to use, the faster, the more lag and if you move the units to fast, then they wont get a shot off. I cant remember how often i was moving them i think it might have been .20. I would use the event "time periodic every .20 or somthing" and then use a for loop from 1 to the num players and then move the units in Weapons_Group (for integer A) to the player_hero.
I know i wasn't very precise but i got tired of writing this after the 5th sentence. But thats the idea.