ID:175798
 
I need the code that makes it so you can only have 1 sword at a time 1 shield at a time 1 plate and 1 helm if you could help me it would be greatly appreciated.

O and the code so you can drop equiped items
Just create a variable for each mob for right hand, left hand, head, body, etc...

<code>var right_hand left_hand head body</code>

Then when you equip something, either let the player choose where to equip it, or give the item a variable that determines to which variable it must be equipped. Then point that variable to the equipped object, and set the object to equipped with yet another variable.

<code>var/obj/sword/sword = new() right_hand = sword</code>

If you want to unequip it when its dropped, just have the drop action check to see if its equipped, and unequip it if it is.
Vegeta54367 wrote:
I need the code that makes it so you can only have 1 sword at a time 1 shield at a time 1 plate and 1 helm if you could help me it would be greatly appreciated.

O and the code so you can drop equiped items

The Code
In response to Alathon
No, no, NO! You're ALWAYS supposed to not have a space between "the" and "code." It loses all meaning then! And besides, I posted it first.
In response to Triste
that dosent help
In response to Vegeta54367
Sorry, nobody is going to give you a fully-working equipment system. You'll have to make it yourself.
In response to Garthor
i got the system how to equip <font color=red>[stuff]</font> and unequip get and all that i jsut dont know the var to stop me form equipping 21 diffrent swords
In response to Vegeta54367
if(usr.sword)
In response to Vegeta54367
Vegeta54367 wrote:
i got the system how to equip <font color=red>[stuff]</font> and unequip get and all that i jsut dont know the var to stop me form equipping 21 diffrent swords

What good is it to have this system, if you do not understand it?